high cpu usage on a linux box - 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: high cpu usage on a linux box (
/showthread.php?tid=448872)
high cpu usage on a linux box -
dreamboxxl - 06.07.2013
Hi there, im running a samp server on linux debian.
It give a damn high cpu usage (20-25%), with 0 players on it
The plugins i'm using are: streamer.so sscanf.so Whirlpool.so
If i'm running the same samp server on windows, the cpu usage is just fine.
I've updated all the plugins and the includes already and recompiled.
But on the linux box it's still a damn high cpu usage.
I would be very pleased about help
Thank You
Greets
Re: high cpu usage on a linux box -
[FSaF]Jarno - 06.07.2013
The linux version of the server uses more CPU because the linux kernel has superstrict timers (only +-10ms falloff). At least that's what kalcor said some time in the past.
Re: high cpu usage on a linux box -
GODEX - 06.07.2013
Linux server CPU usage with maxs out is due to timers etc. How many timers do you have in your code, and how often do they loop?
Say you have a payday at 3600000 < 1 hour i think
And you have another timer for say, vehicle re spawn automatically, its best that you place both functions into that one timer to save Usage
Re: high cpu usage on a linux box -
Guest123 - 06.07.2013
change maxplayers
Re: high cpu usage on a linux box -
GODEX - 06.07.2013
Most server have timers inside of a function being called by a timer. Thats really not the way you want to go.
Re: high cpu usage on a linux box -
dreamboxxl - 06.07.2013
Thank you for the answers.
But it's only for example i'm running another samp server on this linux box and it's loaded with 150-200 players without any heavy cpu load.