Server Lags due to high CPU

Hello,
I own a DarkRP Server with an average of 32 players online.
The problem is, that the server is laging quite hard.
I checked some things and it seems to be the CPU Usage.
One second Core 8 is 100% used, the other second everything is fine and then Core 2 is 100% used for example.

Do you have any ideas what I can do to get a better performance?

-tickrate 33 or 16

What exactly is the difference when playing on a 33 or 16 tick server?

[editline]25th August 2015[/editline]

Oh and thanks for the tip, I will try it out :slight_smile:

it basically means the server will calculate things 33 or 16 times per second instead of the default 66 which takes a lot of strain off your cpu when you have lots of people playing

i would start with 33 and see if that works first, in my experience it’s plenty for a gmod server, but if you go lower you will start seeing the effects ingame

I’ll try it and post the result here tomorrow. :slight_smile:

I will close this thread for now. As far as I can see, anything is without lags now. Thanks for your help! :slight_smile:
(I think I accidently left -tickrate to 64) :3

I needed to change tickrate to 16 now, because lags started again… My TTT Server (on the same machine) has no lags, but darkrp does. Is there any way to check what is taking much CPU on the server?

As gangleider said, lowering the trickrate decreases the CPU usage, but at the cost of more lag.

Alternatively, set up cpu affinity and lock each server to cpu 1+ depending on if you have enough cores. Or restrict the one that lags the most to one core on its own.

If you’re using linux, you can use “htop” to see what is causing the most usage, or on windows, taskmanager.

I would suggest if you’re running Gmod DayZ on the same server, that it is on it’s own core until next update due to the nextbot integration being bad.

I’m on linux. And I have 8 cores. Do you mean that I should lock server 1 to core 1, server 2 to core 2, server 3 to core 3 etc for example? Can this be done with taskset?

[editline]27th August 2015[/editline]

The issue should be fixed. Phoenix helped me optmising some stuff. Thanks! <3