PDA

View Full Version : [COD2] Ping spikes when rounds start



deivis33
29th January 2017, 15:36
Hi!

i have a 1.3 cod2 server with pam mod. (linux)
when about 30 players are on the server, the ping of all spikes in the first 10 seconds of every round.

example: ~30 ping jump to 60.

yesterday, with 48 players ingame, the ping of all jump's to 100+ when the round starts. after some seconds come back to normal.

i'm trying to run the server with 64 slots. its possible to run stable? What could be causing this?


ps: dedicated server 2x x5650 3.0GHZ - 16gb ddr3

IzNoGoD
29th January 2017, 15:42
At roundstart a lot of cvars are written to clients, along with other information. This causes your connection to be loaded quite heavily. Probably some shitty connection.

deivis33
29th January 2017, 17:48
but the link is full duplex symmetric 100/100, this could not happen...
I think it might be some config on linux CentOs or punkbuster
already tried run the server without any mods and still happen
i will try with pb disabled

i can run 10 servers with 10 players each one, without any lag on this ip, but cant run 1 server with 30+ players stable
:confused:

Ni3ls
29th January 2017, 20:57
Move some cvars to a later point

IzNoGoD
29th January 2017, 23:33
https://killtube.org/showthread.php?2215-Fix-for-laggy-servers-will-also-increase-your-penis-size-by-a-factor-100000

I still love that I used the word "penis" in that thread, very easy to find it again :)

deivis33
1st February 2017, 16:37
Thx IzNoGoD, definitely is some problem with CPU.

1257

The process reached 93% of usage with 24 cores (40 players ingame with lag). I could not use the cpufrequtils, because of Vmware ESXi... The process is not using the cores properly. Incompatibility?
Maybe i will migrate the server to a VPS, it's much easier.

IzNoGoD
1st February 2017, 20:21
93% usage means 93% usage of a single core.

https://i.gyazo.com/c4df850577d247dc3d2a97f503b892d0.png

But, your cores are pretty slow. Looks like dual hexacore xeons? Try hosting it on a nice high-clock quadcore instead.

caldas
4th February 2017, 22:23
COD2 server run in single core only?

1258

2x X5650 - 24 cores
32GB RAM
RAID 1 2x 300GB SAS

voron00
5th February 2017, 03:01
COD2 server run in single core only?


What did you expected from a 2005 game?

caldas
5th February 2017, 03:12
What did you expected from a 2005 game?

Do you think this CPU does not support a 40-slot server?

kung foo man
5th February 2017, 05:44
You might be able to gain some speed by removing code/scripts which are executed for every player on every other player, since this kind of code becomes exponentially expensive, like the player collision code.

So you might try libcod and disableGlobalPlayerCollision() e.g. and optimize scripts doing that.

To avoid these O(n^2) algorithms you could implement optimized versions, e.g. to find the nearest players of a player, you can use a kd tree search or just cache some values instead of recalculating it all the time.

https://en.wikipedia.org/wiki/K-d_tree#Nearest_neighbour_search

I had the same problem of lag spikes, when I hosted NS zombies on a VPS, but I just decided to rent better suited hardware.

What you can try quickly is to change the process priority (aka nice value) of this cod2 server, so it can suck up more time slices of 1 cpu: https://en.wikipedia.org/wiki/Nice_(Unix)

In addition to that, pin the process on a specifc CPU and exclude all other processes from that core (with isolcpus), so 1 cpu is dedicated to this cod2 server only: http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html

caldas
5th February 2017, 06:07
You might be able to gain some speed by removing code/scripts which are executed for every player on every other player, since this kind of code becomes exponentially expensive, like the player collision code.

So you might try libcod and disableGlobalPlayerCollision() e.g. and optimize scripts doing that.

To avoid these O(n^2) algorithms you could implement optimized versions, e.g. to find the nearest players of a player, you can use a kd tree search or just cache some values instead of recalculating it all the time.

https://en.wikipedia.org/wiki/K-d_tree#Nearest_neighbour_search

I had the same problem of lag spikes, when I hosted NS zombies on a VPS, but I just decided to rent better suited hardware.

What you can try quickly is to change the process priority (aka nice value) of this cod2 server, so it can suck up more time slices of 1 cpu: https://en.wikipedia.org/wiki/Nice_(Unix)

In addition to that, pin the process on a specifc CPU and exclude all other processes from that core (with isolcpus), so 1 cpu is dedicated to this cod2 server only: http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html

is there a compilation compiled with disableGlobalPlayerCollision ()?

i do not understand very well..

IzNoGoD
5th February 2017, 09:26
I'd say give these guys a try:

https://www.lowendtalk.com/discussion/104121/c38-host-performance-hosting-for-the-lowend-market-fr-ca-au

i7 at 4Ghz, pretty non-overloaded servers.

caldas
5th February 2017, 17:51
I'm trying to change a CPU.

The server is mine and stays in colocation in a data center here in Brazil.