Can you post your server.cfg?

momcilosystemmomcilosystem Join Date: 2010-03-15 Member: 70965Members
<div class="IPBDescription">... for unexpirienced user :)</div>Hi everybody!

Can anyone please post their working/actual server.cfg file for hlds Natural Selection 3.2 server? I am trying (and loosing my mind) to set up server for me and my friends (about 8 players) but no matter what I do there is just too much lag when alien enters well guarded marine base (a lot of turrets).

I have very very bad upload (256Kbits/s) but I should be able to enter marine base without laging like hell when I am alone (with bots) on server. 32KB/s must be enough for one player. And server horse power is enough to sustain me and 3 bots (It's Dual Xeon on 2.8GHz with 1GB RAM running Fedora 11 with no gui - CPU usage never reaches over 30% with sys_ticrate 100).

So, please just let me look at someone's working settings just to start from there and then see where the problem is.

I would like to see server.cfg and also command for starting hlds so I could see which command line options are included.


Please help me with this - I am loosing it at this point... :(

Thanks in advance!

Comments

  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    I recommend using Vadakill's Guide for setting stuff up.

    Linux:
    <a href="http://www.vadakill.com/nsguides/linux/steam_ns_32.php" target="_blank">http://www.vadakill.com/nsguides/linux/steam_ns_32.php</a>
    Windows:
    <a href="http://www.vadakill.com/nsguides/win32/steam_ns_32.php" target="_blank">http://www.vadakill.com/nsguides/win32/steam_ns_32.php</a>

    I run with the default server.cfg setup, minor changes like the Server name, password, etc.

    Something to look into is setting the max update rates. Make sure your clients aren't flooding the server with update requests.

    Other than that, it feels like your server's hardware is a bit underwhelming to host a game server. I'm assuming you're using it dedicated, but I've experienced lag with 20 players on a server with CPU loads under 20%.

    I'll post my server.cfg if it's still around when I get home.
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    edited April 2010
    Oh for ###### sake, I had a reply here but accidentally closed my browser.

    Ok check stats. It shows your FPS. Make sure FPS is atleast over 80. Then disable metamod, bots, and all plugin ###### they lag your server.

    Next thing. You're out of bandwidth, check stats again for out-column. It should be below 32kB/s. Simply 256kbit/s is not enough for NS. With 8 players, you should set sv_maxrate to 4000 (which is 4kB/s per player) and set your sv_maxupderate to 30 because even with updaterate 30, you should be getting around 4kB/s (check net_graph 3 out column) when nobody's on the server and nothing's going on. With turretspam this is going to rise to 8kB/s or so. You might wanna increase this a bit (6000 and 40) because not everyone on the server is going to get that much at the same time even though you'd choke up if everyone was getting as much.

    Just rent a proper server, they don't cost much.
  • momcilosystemmomcilosystem Join Date: 2010-03-15 Member: 70965Members
    edited April 2010
    First of all, thank you both for your quick reply.

    @spellman23

    I did follow Vadakill's guide to install dedicated server on linux and it was very helpful. But there is nothing on Vadakill's guide about rates and alot of other guides contradict themselfs.

    Now I am at the point that I don't even know what were default values for server.cfg or even if they were in my server.cfg or did hlds just used default values.

    I would like to see your rates/server.cfg if you don't mind to see where the difference is.

    And another thing - underwhelming? English is not my native language but I deduced that what are you saying is that my hardware is not enough?
    I saw somewhere that people used to run multiple servers on that kind of machine. But please do elaborate about where the clog may be.


    @Jiriki

    My stats show fps fluctuate a little around sys_ticrate - if I set sys_ticrate 150 it is around that (130-145) and if I set it to 500 it is around that too (400-450) so it will be over 80 if I set it to - which I did :)
    And about bandwidth: like I said in my first post, I know it is horrible but at least one player should be able to play on 32KB/s of upload.

    Two things left for me to try is: disabling metamod and rcbot to see if there are improvements and to monitor 'out' part of the stats command (didn't know it showed values in KB/s - I will pay more attention on that).

    I know renting server is not that expensive but I live in Serbia and everything here costs more than it should and salaries are less than they should be...


    Thanks again in advance,
    Momcilo.
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    edited April 2010
    <a href="http://wiki.fragaholics.de/index.php/EN:Linux_Kernel_Optimization" target="_blank">Check this guide</a> if you really want get high stable FPS. But I warn you, compiling your own Kernel is a not a simple thing if you don't know what you're doing because there're about 20 things that can cause you not to be able to boot. IF your server is local, the server is a hobby and you have long patience, then its not a problem. Just don't delete your old Kernel and check Fedora guides how to compile custom kernel because for example initrd-image creation might be different from distribution to another. And Fedora has probably tool to automatically compile Kernel and install it to bootloader, atleast Debian has.

    FPS stability is imo. more important than high FPS.

    Also check what's the the FPS and bandwidth out when you are playing there AND you are getting that lag. Put it to fpsmeter.org.

    free -m will show memory statistics, make sure the 2nd column value at 2nd row (excluding the header row) is like above 100. And make sure you don't swap, 2nd value on 3rd row. You can use sysctl to tune swappiness if you have memory.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->// Use this file to configure your DEDICATED server.
    // This config file is executed everytime the server changes levels.
    //
    // Please visit the server ops forum on www.natural-selection.org if you have any questions about any of these settings.
    //

    hostname "******"
    sv_password "*****"

    // disable autoaim and mad gibs
    sv_aim 0
    violence_hgibs 0
    violence_agibs 0

    // player bounding boxes (collisions, not clipping)
    sv_clienttrace 3.5

    // disable clients' ability to pause the server
    pausable 0

    // default server name. Change to "Bob's Server", etc.
    hostname "*********"

    // maximum client movement speed (needed for commander mode)
    sv_maxspeed 1500
    sv_cheats 0
    sv_allowdownloads 1
    sv_lan 0

    mp_consistency 0
    mp_countdowntime .2
    mp_latejointime 1
    mp_logdetail 0
    mp_assert 0
    mp_tournamentmode 0
    //mp_networkmeterrate 1500
    mp_networkmeterrate 100000
    mp_falldamage 1
    mp_serverscripts 0
    mp_teamresourcehandicap 1
    mp_spawninvulnerabletime 0
    mp_autoconcede 4

    // 60 minute timelimit
    mp_timelimit 60

    // Commander voting
    mp_votedowntime 180
    mp_votecasttime 2
    mp_votepercentneeded .4
    mp_minvotesneeded 3

    mp_logfile 0
    log off
    mp_networkdebug 0
    mp_flashlight 1
    mp_footsteps 1

    // List server op WON ids here, delimited by semi-colons (eg, "12345;23223;123123"). mp_authicons must be 1 for this to work.
    mp_serverops ""
    mp_authicons 1<!--QuoteEnd--></div><!--QuoteEEnd-->
  • That_Annoying_KidThat_Annoying_Kid Sire of Titles Join Date: 2003-03-01 Member: 14175Members, Constellation
    you can ask in the subforum specifically designed for ns server operators! Alot of the OG server operators check it out from time to time and might have something keen
  • momcilosystemmomcilosystem Join Date: 2010-03-15 Member: 70965Members
    I want to thank you all for your effort.

    I disabled rcbot and metamod and it was stable. It lagged a little - up to 250ms but playable, not even close to 700-800 that I was getting with rcbot and metamod turned on.

    My FPS fluctuated as usual, here is fpsmeter.org test:
    <a href="http://img222.imageshack.us/i/graphw.png/" target="_blank"><img src="http://img222.imageshack.us/img222/7374/graphw.png" border="0" class="linked-image" /></a>

    and here are rcon stats to see upload speeds (it is way below internet speed limit):
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->CPU   In    Out   Uptime  Users   FPS    Players
    14.33  4.47  4.96      42     4  217.01       2

    CPU   In    Out   Uptime  Users   FPS    Players
    12.50  7.25  9.18      43     4  217.91       2

    CPU   In    Out   Uptime  Users   FPS    Players
    13.33  7.53  9.36      43     4  223.41       2

    CPU   In    Out   Uptime  Users   FPS    Players
    13.33  7.85  9.50      43     4  214.45       2

    CPU   In    Out   Uptime  Users   FPS    Players
    13.75  7.99  9.55      43     4  218.77       2

    CPU   In    Out   Uptime  Users   FPS    Players
    14.20  8.19  9.60      43     4  220.31       2

    CPU   In    Out   Uptime  Users   FPS    Players
    15.00  8.37  9.62      43     4  235.63       2

    CPU   In    Out   Uptime  Users   FPS    Players
    16.00  8.29  9.63      43     4  220.26       2

    CPU   In    Out   Uptime  Users   FPS    Players
    15.50  8.06  9.58      43     4  206.57       2

    CPU   In    Out   Uptime  Users   FPS    Players
    12.00  7.09  8.99      44     4  228.41       2

    CPU   In    Out   Uptime  Users   FPS    Players
    13.50  7.40  9.26      44     4  211.10       2

    CPU   In    Out   Uptime  Users   FPS    Players
    16.50  8.33  9.62      44     4  205.13       2

    CPU   In    Out   Uptime  Users   FPS    Players
    12.20  7.45  9.32      44     4  216.26       2

    CPU   In    Out   Uptime  Users   FPS    Players
    15.00  8.19  9.60      44     4  207.00       2

    CPU   In    Out   Uptime  Users   FPS    Players
    15.80  8.23  9.60      44     4  215.61       2

    CPU   In    Out   Uptime  Users   FPS    Players
    16.33  8.32  9.61      45     4  216.40       2

    CPU   In    Out   Uptime  Users   FPS    Players
    14.00  8.31  9.60      45     4  222.42       2

    CPU   In    Out   Uptime  Users   FPS    Players
    12.25  7.44  9.31      46     4  221.09       2

    CPU   In    Out   Uptime  Users   FPS    Players
    13.50  7.87  9.56      46     4  220.99       2

    CPU   In    Out   Uptime  Users   FPS    Players
    16.50  8.30  9.61      46     4  251.57       2<!--c2--></div><!--ec2-->


    I will try to reduce lag even more by adjusting rates, but with my low upload speed I am not hoping too much.

    To sum: what I tested is worst case scenario, a bunch of Onoses are trying to get through marine base with around 20 turrets firing at them and marines firing as well; and get up to 250ms lag which is playable and acceptable. My friends and I already planned a match in two weeks and that will be true test.

    I'll let you know how it went.

    Thanks again for all your help.
  • momcilosystemmomcilosystem Join Date: 2010-03-15 Member: 70965Members
    Oh and that sudden drop in FPS is not servers fault - I tried lowering sys_ticrate just to see if it can be done while the server is running. :)
Sign In or Register to comment.