Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: [COD2] Ping spikes when rounds start

  1. #11
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    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_tr...ighbour_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-proce...res-linux.html
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    Whiskas (5th February 2017)

  3. #12
    Private
    Join Date
    Dec 2016
    Posts
    30
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by kung foo man View Post
    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_tr...ighbour_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-proce...res-linux.html
    is there a compilation compiled with disableGlobalPlayerCollision ()?

    i do not understand very well..

  4. #13
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    I'd say give these guys a try:

    https://www.lowendtalk.com/discussio...arket-fr-ca-au

    i7 at 4Ghz, pretty non-overloaded servers.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #14
    Private
    Join Date
    Dec 2016
    Posts
    30
    Thanks
    5
    Thanked 5 Times in 5 Posts
    I'm trying to change a CPU.

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •