SA-MP Forums Archive
My server using an excessive amount of 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: My server using an excessive amount of CPU (/showthread.php?tid=435523)



My server using an excessive amount of CPU - vvhy - 07.05.2013

I am having problems with excessive CPU usage in my gamemode script. It only started crashing just recently. I cannot pinpoint when it started or what I've added that may have caused it because I've added so many things here and there. Its only gotten worse over time and I don't know what to do.

Any insight that you have would be great, I would like to know what kinds of things would cause these CPU usage spikes so suddenly I normally have a 2-4% CPU usage and now the average is around 40%. It gets worse the more players that are online.

#define MAX_PLAYERS 70
maxplayers 70

I am using Volt-Host and have already consulted them about this, it seems it has nothing to do with their servers, only my script.

Quote:

Restarted (Excessive CPU Usage - 94.1%)

Restarted (Excessive CPU Usage - 97.2%)

Restarted (Excessive CPU Usage - 91.1%)

Restarted (Excessive CPU Usage - 91.6%)

Restarted (Excessive CPU Usage - 86.8%)

Restarted (Excessive CPU Usage - 97.6%)

Restarted (Excessive CPU Usage - 84.8%)

Restarted (Excessive CPU Usage - 84.1%)

Restarted (Excessive CPU Usage - 81.1%)

Restarted (Excessive CPU Usage - 103.4%)

Restarted (Excessive CPU Usage - 83.3%)

Restarted (Excessive CPU Usage - 91.5%)

Restarted (Excessive CPU Usage - 102.5%)

Restarted (Excessive CPU Usage - 83.5%)

Restarted (Excessive CPU Usage - 83.4%)




Re: My server using an excessive amount of CPU - vvhy - 07.05.2013

Yes, I have tried that. Should have mentioned it.

I got a few of these kinds of things, all with unknown@... I guess those are like stock functions? not sure how to get them to show the name.
Quote:

TYPE---|-----NAME--------------|---Calls---|-----SELF TIME-----|--TOTAL TIME
normal | unknown@00000334 | 1089886 | 20.49% | 16.327s | 8.27% | 25.205s

Not sure if that is considered excessive usage or not
(also when I ran the profiler my server lagged grammatically, not sure if that affected any of the results)