My DarkRP server is lagging

Hello, when i have +50 players my darkrp server lag, it’s a screen of net graph with 40 players : http://prntscr.com/bx7jmi

I have a dedicated server ovh :
Intel i7-4790K
4 Cores / 8 Threads
4,0 GHz / 4,4 GHz
32 Go DDR3 1333 MHz
2 x 240 Go SSD
RAID SOFT

Could you post your addons list? Maybe you are using few unoptimized addons which effects the server performance.

It’s my workshop : http://steamcommunity.com/sharedfiles/filedetails/?id=726256113
And it’s my addons (all scriptfodder) : http://prntscr.com/bx7zrm http://prntscr.com/bx7zv1

You sir have alot of addons installed, your problem is most likely caused by one/multiple of them. Have you checked if all of those addons are compatible with each other?

Yes

Whats your server settings, like net settings, tickrate etc? also, show us a picture of your net graph (net_graph 4 in console).

M9K is resource hungry as far as i can remember.Try to remove the maximum vehicle amount by making the cars little bit more pricey.Logs addon can be issue too but i am not sure.

My tickrate is 33
and my net settings :
net_maxfilesize 64
net_splitpacket_maxrate 300000
sv_maxrate 10000
sv_minrate 100000
sv_maxupdaterate 33
sv_minupdaterate 33
sv_mincmdrate 33
sv_maxcmdrate 33
fps_max 120

idk if fps_max has any effect, but normally you should set it to 500 or so, also, do you have -condebug enabled or any of that sort? could cause it too, also, try without M9K or some sort of that.

Alternative you also could try EVEN LOWER tickrate, like 22.

Maybe its also an DDoS/Hoster overload? Are you hosting it on a private VPS, or using a server provider? If yes, wich provider? Tried contacting them of overloading? Because of your 240 ping. You alternative could try booting without addons, maybe one of the addons is badly coded/unoptimized, wich uses many hooks/functions/often contacts a database/webserver?

Because from what I can see, something sends a really high amount of net-/usermessages, so it seems an addon is causing problems.

I haven’t -condebug enabled, but some server who use M9K doesn’t have any lags. And i have a very good hoster (ovh) with a game firewall protection so i think it’s not a ddos.

It’s an other screen when we are 60 : http://prntscr.com/bxbt8l

Then its an addon, as I said, try a darkrp setup without addons atall, because I see many messages being sent between the server and players.

Can i test with bot?

Yes

I have lag :confused:

  • What did you do
  • How exactly did you test it
  • Net Graph please
  • Count of bots

It’s a netgraph when we are ~60 players : http://prntscr.com/bz5kjb

A few things to try:

  1. Make sure you have the server assigned to only 1 core, letting it jump around cores hurts performance and you can see stuttering. (Set the affinity of the process to the last core etc).

  2. Try removing widgets, on high population servers we have seen a performance increase when disabling it
    [lua]
    hook.Add(“Initialize”,“RemoveWidgets”,function()
    hook.Remove(“PlayerTick”,“TickWidgets”)
    end)
    [/lua]

  3. Lower your tickrate down to 16.

Other than that, running an addon such as FProfiler or DBugR to find the addons causing the trouble.

How can do the 1 please ?

And thx you for these two other reply i’ll test tomorrow

I have an other net _graph when we are 64 : http://prntscr.com/bzrncc

Are you running Windows or Linux?

Setting it on Windows is easy, just open task manager and right click the process and press set affinity, make sure only 1 core is ticked. If nothing else is going on in the server, you can probably just select the last core, check the usage beforehand however.

On Linux, you will need to find out the PID of the process, once done you can enter taskset -cp CPU PID
So for example, taskset -cp 7 2915 will set PID 2915 to the last core of an 8 core machine.

Yes but i have 2 servers if i assign 1 core the 2 server will be assigned to this core?