SA-MP Forums Archive
How to find cause of CPU peaking - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to find cause of CPU peaking (/showthread.php?tid=252781)



How to find cause of CPU peaking - lolumadd_ - 02.05.2011

Like once a day, or more, the server's CPU will peak up to 90% +. The high CPU causes the server to freeze/crash.

What can I try to debug to find out what is making the CPU raise that high?

Thank you.


Re: How to find cause of CPU peaking - Steven82 - 02.05.2011

Better optimized script, try to adjust the streaming rates in the server.cfg file.


Re: How to find cause of CPU peaking - captainjohn - 03.05.2011

Want better optimization?
Check here https://sampforum.blast.hk/showthread.php?tid=57018


Re: How to find cause of CPU peaking - Calgon - 03.05.2011

If you're using serverFFS, their CPU usage count/check is allegedly faulty.

If you actually want to investigate this issue, then you can add debugs in your script to parts of the script that are commonly used so you can try find a problem with your code, then look up guides on optimization to see how you can improve your current code.


Respuesta: How to find cause of CPU peaking - Siralos - 03.05.2011

We had the same problem and we have managed to fix the error.

We reviewed the code and saw we had an infinite loop in a for statement

for(j=0; j<5; i++)

Check infinite loops and maybe you got the solution!