Processing high server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Processing high server (
/showthread.php?tid=416318)
Processing high server -
Phablo - 16.02.2013
Good afternoon guys, have a good server but this occupying much CPU processing with 130 players is on average 80-90% and causing this lag, do not use the public OnPlayerUpdate
my VPS
2vCPU 3.4GHz CPU
2 GB DDR3 Memory
1Gbps Uplink
Maybe somebody knows what do you? Thank you.
Re: Processing high server -
Babul - 16.02.2013
hm... how many timers are running in the script, how fast are they? how many loops with MAX_PLAYERS?
you should have a look at the
Performance Profiler plugin, it will help you at figuring out which function exactly causes the lag.
i suspect its an inefficient algorithm somewhere..
can you provide us with the CPU usage with less, like 10,20,50,100 players? it would help at figuring out how fast the CPU usage increases - i predict its far lower wth less players: like 1/4 (20-30%) CPU only at 1/2(70-80) players hehe
Re: Processing high server -
Scenario - 16.02.2013
Remember that while loops will also hold the server up until they finish.
Re: Processing high server -
Phablo - 16.02.2013
I have several timers they are all more than 1 second above, I have only one that is 100 milliseconds to update the speedometer, but not with him for the reason you have taken for tests, I was seeing at dawn had 20 players when processing kept at 1.5 with 50% al 20% players above 80 ja is 50 to 60%, the above problem is players 100 that the processing goes up very much, and this MAX_PLAYERS reset to only 200.
I will test this plugin to see if I can find something, thank you.