SA-MP Forums Archive
CPU - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CPU (/showthread.php?tid=384589)



CPU - Beljulji - 12.10.2012

i have a problem my cpu is 10% when theres no players but when there are about 2-3 players cpu usage jump to 50% is that normal, is there any way to lower cpu usage. i know that timers take a lot of cpu power. and btw im using linux server


Re: CPU - Roel - 12.10.2012

Well I don't know alot about that maybe you should check your onplayerupdate and timers ye.

But I wan't to thank you, because i hosted a server for somebody on my linux server, and it seems it uses 100% cpu without any players, so I took it offline, if you didn't post this i didn't even look at the processes on my server haha.


Re: CPU - Beljulji - 12.10.2012

hmm idk what to do but is there any way to low cpu usage ?


Re: CPU - 2KY - 13.10.2012

Use less cells in strings. EG: If you have any

pawn Код:
new str [ 256 ];
and are only using 'str' as a client message, put them down to 128. You're using 2x what you need.


Re: CPU - Beljulji - 13.10.2012

for what is
Код:
new str [128]
anyway?


Re: CPU - Beljulji - 13.10.2012

shit man now is cpu usage 25%

Uploaded with ImageShack.us