High CPU Usage
#1

Hey,

Lately I realised my server is using A LOT of CPU: it uses 30% for 150 players online. I tried using the performance profiler plugin and got this piece of information: Click here for profiler info - this is the information I got when testing it in 10 minutes with ~20 players online.

This is the list of includes I'm using:

pawn Код:
#include <fixes>
#include <core>
#include <time>
#include <file>
#include <utils>
#include <streamer>
#include <SII>
#include <a_mysql>
#include <saveacc> // include for saving MySQL stuff
#include <foreach>
#include <zcmd>
#include <sscanf2>
#include <a_time> // include for calculating date expiry, time between dates, etc
#include <beaZone> // include for adding borders and numbers to gangzones
+ I'm using MySQL R7. The strange thing is that I'm using sleep 20 in server.cfg; when I set it to 1 the CPU usage rises up to 0.3 - 0.4% per player. The problem was even bigger before I reduced the vehicle respawn time(AddStaticVehicleEx) to 400 from 1,000,000. That fix reduced the problem partially, but I still can't hit 400-500 players online because at 300 players online the server starts to get laggy;(samp03svr uses 60% and jumps to 70%-80% while mysql process uses 20%-30% too) basically it hops to 100% cpu sometimes.

My server is hosted on a semi-dedicated server with these specs:

3.4 Ghz - 1 core
2 GB of RAM
Reply
#2

Код:
Duration	00:00:07
Are you sure it was running for 10 minutes?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)