Problem with CPU load after some time of running
#1

Hello,

I'm running a server with an average of 88 players even maximum of 220 at some hours.

My load is fine when I start the server, but after a day of running it gets laggy and CPU load rises very much.
I would kind of need to rise the slot limit, but when I rise it, it get's even higher load.


Some details:

I've changed MAX_PLAYERS to 220 in a_samp
I'm using C++ streamer by Incognito for objects, pickups, map icons.
I'm using foreach for the loops.
I'm not using samp.ban for storing bans because my bans are stored to mysql database.
ZCMD + sscanf(pawn not the plugin) for 85% of the commands (hadn't have the time to convert all of them yet)
This plugin for mysql databases.
I'm using mysql_free_result after every mysql_store_result
My mod it's almost full mysql (players, faction spawns, faction weapons, skins, vehicles, bans, houses, biz, etc) - will be when I'll finish the rewrite.
I'm using a shared VPS environment with DualCore 2x2100 Mhz CPU 512 MB ram
MySQL Server is on a different PC but in the same network so there is no latency.

There's a graph(explaining a case):
You can see the load with 210 connected players and then, after a server restart at 15:00 even when all players have reconnected (so it's the same amount of players) the load drops to let's say a normal value, and after some time of running, it rises again.

If I don't restart the server every day, the load gets even higher.

Is anyone experiencing the same problem? any suggestions ?


Thank you in advance.

Mike.
Reply
#2

You are probably using to much timers. Check to see if the Timers are really low (in milliseconds).
Reply
#3

Quote:
Originally Posted by HydraX
You are probably using to much timers. Check to see if the Timers are really low (in milliseconds).
Well, isn't that suppose to be a constant load with the same amount of players all the time ? I mean, It only gets high load after some time of running.. like there's a memory leak in the plugins or overcrowding arrays.. which only occurs in time
Reply
#4

Memory leak's have been a cause for CPU overload also. Check to see if any plugins/includes/gamemode are not working correctly. Debug them if nessacary.
Reply
#5

Memeory leak most likely. Try using G-sTyLeZzZ's MySQL plugin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)