Server 'stats' CPU usage going above 100

I have no idea what the problem is, but when the server goes above around 12 players. Insane lag spikes occur and the result from stats shows the server CPU usage going above 100. At first, we thought this was our dedi - so we bought a new dedicated server with 32GB of ram and a Opteron 6 Core processor (I know SRCDS isn’t multithreaded). Yet the lag seems to be even worse now.

EDIT: Just quickly running through my code to make sure that something is not looping infinatly

EDIT: Looked through my code, disabled various parts of it etc, nothing seems to have stopped lag.

Do you use multiple servers? As multiple servers can use one cpu.

No only one server atm

Have you tried basic sandbox?

Your server could be getting DoSed, Try restarting it.

Checked the stats, we’re not being DDoSed. We also have a 1GBit port. Also I doubt that it is a DDoS attack as it’s the Server FPS that is dropping from 35 to 3

Well you know a restart may be what you need anyways, let it cool off.

The server was restarted earlier this morning, Didn’t help anything. Also what should I be looking for in my scripts that would make this intense lag happen.


I don’t know,
just look over it and see if something is just not meant to be there.

I’m not the person you should be talking to, I have problems of my own to solve.

Good luck.

Thanks for your help so far. Also, if it helps the “var” is spiking and turning red at the same time as the SV FPS Drops.

Get something more powerful then that Opteron. It may be a powerful CPU but it’s not powerful enough per-core for Garry’s Mod.

Would an Intel Xeon i7 W3520 4x2(HT)x2.66+ be any better? - By the way I fixed it a little - by removing some dodgy code and adjusting some rates

[editline]31st July 2012[/editline]

Also, Since I made those fixes it’s been crashing like every 10 mins, What’s better for GMod: 33 ticks or 66 ticks.

[editline]31st July 2012[/editline]

Nevermind, the crashing was a lua error.

bump , Sorry I really want to make sure that a Intel Xeon i7 W3520 would do the trick before I go and buy it