Results 1 to 7 of 7

Thread: COD2 core utilization problem

  1. #1
    ... connecting
    Join Date
    Aug 2018
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 2 Posts

    COD2 core utilization problem

    Linux VPS COD2 core utilization problem

    CPU core load in not equaly devided / utilized on all 3 cores.

    That makes my server LAG and cause high PING when i have more than 20 players on server running COD2 eXtreme 2.9 mod.







    On Ubuntu 14 and 16

    I downloaded gcc 3.3 from here http://icculus.org/updates/cod/gcc3-libs.tar.bz2



    First try: No 1.


    Manualy installed - unpacked that file and puted it to location on VPS: /usr/lib

    started COD2 wit this command
    Code:
    nice -n 0 ./cod2_lnxded +set dedicated 2 +set net_port 28960 +set fs_game extreme2.9 +set sv_punkbuster 0 +exec server.cfg



    Second try: No 2.


    Putted and extracted gcc 3.3 files to the same folder where i have cod2_lnxded

    Started COD2 with this command
    Code:
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. ./cod2_lnxded +set dedicated 2 +set net_port 28960 +set fs_game extreme2.9 +set sv_punkbuster 0 +exec server.cfg



    Third try: No 3.


    Code:
    sudo dpkg --add-architecture i386
    
    sudo apt-get update
    
    sudo apt-get -y install libstdc++5:i386
    COD2 starts but i always have same problem with cores:

    ... just 1 of 3 cores is utilized , second and third core is in iddle state, doing almost nothing..


    On NFO VPS (OS: Debian 7 Arch: x86_64 (64bit) Kernel: 3.2.2-am64) https://www.nfoservers.com that i had before

    it worked perfectly (all 3 cores had equal load on them), but now i can't make it work on new VPS.

    Last edited by croat1986; 16th November 2018 at 20:13.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,014
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    Yes, every lnxded server only runs in 1 thread and there isn't much you can do about it (besides learning libcod and rewrite it for multithread support e.g.)

    I'm not sure, but I guess the player-player-collision is what causes lots of CPU stress. The algorithm is totally stupid, like testing each player against every other player... might be possible to just deactivate player-player collision via libcod and tell us if that works.

    Another possibility: optimize .gsc scripts... you could add another scripting engine running in a 2nd thread like Duktape/JavaScript.

    Whatever you decide for, there is no easy road I guess, all takes some work to master.
    timescale 0.01

  3. #3
    ... connecting
    Join Date
    Aug 2018
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I tought that you ll say exactly that ...

    COD 2 camed out 6 month after first dual (multi) - core CPU was made.

    And as always software is always in delay with hardware ...

    Even now may programs and games are using only 1 Core - Thread ... for example: Word of Warcraft


    But how the f... hell it was working on NFO on their VPS on all cores ... ???




    I recompiled vorons libcod form here https://github.com/voron00/libcod

    But ... I don't know how to deactivate player-player collision via libcod ...
    Last edited by croat1986; 16th November 2018 at 21:14.

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,014
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    I don't know what voron did with this function, can't find in his repo, but in my repo you just use this function: https://github.com/kungfooman/libcod...r/gsc.cpp#L255

    PHP Code:
    disableGlobalPlayerCollision(); 
    timescale 0.01

  5. #5
    ... connecting
    Join Date
    Aug 2018
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 2 Posts
    How and where do i put that command ?

  6. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,014
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    You just call it anywhere, as often as you like (just call in gametype init once e.g.)

    There are also threads about it in the forum, just try google

    https://www.google.com/search?q=disa...3Akilltube.org
    timescale 0.01

  7. #7
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 451 Times in 305 Posts
    Quote Originally Posted by kung foo man View Post
    I don't know what voron did with this function, can't find in his repo, but in my repo you just use this function: https://github.com/kungfooman/libcod...r/gsc.cpp#L255

    PHP Code:
    disableGlobalPlayerCollision(); 
    You can use it now via the cvar 'g_playerCollision' located in https://github.com/voron00/libcod/bl...ter/libcod.cpp.

  8. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (17th November 2018),serthy (18th November 2018)

Posting Permissions

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