Linux And Lag

zippyzippy Forum Police. Join Date: 2003-01-06 Member: 11956Members, Constellation
I have a linux server (2Ghz 1GB RAM) redhat 7.2 running NS

i can't play bast or hera on it, dam annoying, cpu usage <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->

also in smalled standard maps turrets are a major lag whether it's alien's or marine's.

what tweaks can i do to sort this out.

zippy

Comments

  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    edited March 2003
    Linux and "Lag" are two words that don't belong together as if one causes the other, especially after the 1.04 patch. There are several reasons for "lag" and they are not specifically Linux related. Your definition of "lag" isn't very descriptive; Are pings going up? Are things jumping around? Is your client computer turning into a slide show? Are things going in fits and starts?

    Look at your system setup and try to figure out where the "lag" is coming from. For that, try answering these questions:

    1) Is your Maxplayers set to more then your CPU can handle. (2Ghz CPU shouldn't have more then 14-16 players for "low" ping)
    2) Do you have more maxplayers then your bandwidth can handle, both upstream and downstream.
    3) Do you have other applications running in the background taking up CPU cycles such as messageboard systems, etc.
    4) Is your maxrate set too low not allowing the server to send more then xxxx amount of data. When there are a lot of things in a confined area bandwidth usage for updating goes up.
  • badmoonbadmoon Join Date: 2002-11-05 Member: 7212Members, Reinforced - Shadow
    edited March 2003
    Hera and Bast have, as far as I know, always been high cpu usage. There are modified versions of the map out there I think.

    You can get optimized map from <a href='http://www.joe.to/ns/' target='_blank'>http://www.joe.to/ns/</a>

    Also, when you installed redhat did you install everything or just the essentials. I believe full redhat can be more cpu intensive then windows.
  • zippyzippy Forum Police. Join Date: 2003-01-06 Member: 11956Members, Constellation
    all the essentials are there - as for bandwidth 100mbits ok?

    currently it's on 18+reservered

    pings are fine at start like any normal server, it's gotta be something to do with ns arghhh the pain.

    don't make me have to turn it into a dod and cs server

    or a nice 32 player dod <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    zippy
  • FamFam Diaper-Wearing Dog On A Ball Join Date: 2002-02-17 Member: 222Members, NS1 Playtester, Contributor
  • Scum_of_the_UniverseScum_of_the_Universe Join Date: 2003-02-06 Member: 13174Members
    If it's dedicated just to ns, you could up the priority of the hlds process. (anyone tried this?). Are you watching the activity on the box during games?
  • JarlaxleJarlaxle Join Date: 2002-11-21 Member: 9546Members
    Its mostly CPU usage thats causing the problem I believe. Pings go up into the 200-300 range for some players. I had not set a maxrate by accident, so everyone was running at whatever they wanted. I changed it to 7500. Whats a good setting for that?

    Also, there is nothing else running on the box but apache to serve up a stats page.

    (I admin the server in question for zippy. =))
  • str0ngb4dstr0ngb4d Join Date: 2003-03-02 Member: 14216Members
    First of all, if its only those 2 maps I suggest you head over to the NS Downloadable files at www.joe.to - joe has posted customized server-side versions of those 2 maps that take out a lot of unnecessary ambience sounds and entities (the hologram projection for example in Holo room on hera). That should help performance a bit. However, I don't know how serious the issue is so read the below for a fairly detailed description of what your problems could be:

    You forgot to tell us your connection, but just in case thats the problem keep in mind you should allow at least 3-4kbps per person (both up and down) and 5-10 for a bit more comfort in my experience. The average Cable and DSL connection is capped at ~50k or ~128k respectively. Thats ~8 players comfortably on the Cable and and a bit less then double that on the DSL. Just in case thats the problem...

    Now it seems more likely that CPU-usage is the problem. Disable XWindows and Gnome/Sawfish/KDE (whatever you chose). Your average GUI + XWindows is a resource hog, although the new Mandrakes and Redhats do look awful perdy <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->. Disable them and boot directly to the comm line where you have to open up a new term. If you end up needing Xwin/a GUI you can still start 'em up from the term using start xwin or something like that (its been ages since I've used a GUI *nix side, let alone had to start one manually).

    Also, someone suggested upping the priority of the hlds process. Try it, can't hurt. Those 2 things together should increase performance.

    A last issue, make sure you don't have dual processors! I don't know if your 2Ghz is from a one processor, or multiples. If its the latter, remember as of current HLDS releases, HLDS can only be run with one processor. Meaning, if you have 2 1Ghz processors, HLDS can really only use 1 Ghz.

    Keep all that in mind, try it all out, I almost guarantee performance increases.
  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    edited March 2003
    100mbits doesn't mean anything, that's the speed your ethernet card can transmit. What you need to know is how much bandwidth you have to the internet. If you are running X on the machine try going to DSL reports and run the bandwidth test.
  • JarlaxleJarlaxle Join Date: 2002-11-21 Member: 9546Members
    The internet connection is at Rackshack.net so its not to shabby. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    How do I go about upping the priority of HLDS?

    I don't run any X-windows etc on teh box, just SSH in.

    And I got those maps from joe.to I will see if that helps.
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    edited March 2003
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->NAME
        renice - alter priority of running processes

    SYNOPSIS
        renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->


    AS ROOT, regaurdless of what you run hlds as.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->renice -20 4993<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    just so you know
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->  Range
          goes from -20 (highest priority) to 19 (lowest).<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
  • JarlaxleJarlaxle Join Date: 2002-11-21 Member: 9546Members
    Thanks Cracker, I will try that tomorrow when the server is full =)
  • zippyzippy Forum Police. Join Date: 2003-01-06 Member: 11956Members, Constellation
    no te internet connection is on a 100mbits

    i ain't talking ethernet here boy <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->

    zippy
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    you can't have a 100Mbps Internet connection because WAN is multiplexed across 64K channels. thats why T1s are 1.544Mbps, T3 is 45.xxxMbps (i don't remember the exact # and i'm too damn lazy).

    it maybe close to 100mbs (thats 1562.5 64K channels) but i seriously doubt that an hosting company would pay for all that for what you pay a month <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • JarlaxleJarlaxle Join Date: 2002-11-21 Member: 9546Members
    Well, its not slow <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    I really don't think bandwidth is the issue. Its CPU. =/ Just did that renice thing on my hlds process to test it.
  • MonsieurEvilMonsieurEvil Join Date: 2002-01-22 Member: 4Members, Retired Developer, NS1 Playtester, Contributor
    edited March 2003
    The number one, hands-down, main way to reduce NS CPU utilization is to drop your max player count. When 1.1 comes out, there will a lot of improvements in this area for the Win32 and Linux servers, but for now, if you want to see large reduction, just remove 2 player slots, and re-test.

    HOWEVER: With a 2Ghz CPU, you should be hosting 20-player games with some left over cycles for sure and no perceptable user 'lag'. The Fist of Ra test servers run more players than that in your config, and they are silky. I'd advise getting some more advice from Jack and others here about possible Linux tuning options. If it was a Win32 server, I'd suggest talking to... me. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    And I'll wager you're getting this idea about the 100Mbit interface from looking at what speed your NIC is reporting back that it's capable of, or the bogus 'connected at 100/full duplex' value that win32 NIC's often reply with when jacked into broadband. Jack is right that there is no such thing in WAN terms. Maybe if they bonded 2 SONET OC-1's? You'd get 100.224 CIR in that scenario...
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    <!--QuoteBegin--MonsieurEvil+Mar 3 2003, 12:59 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MonsieurEvil @ Mar 3 2003, 12:59 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Maybe if they bonded 2 SONET OC-1's? You'd get 100.224 CIR in that scenario... <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    even if they did that, i doubt he has full access to it <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • SuicideDogSuicideDog Join Date: 2002-11-10 Member: 8104Members
    At my co-lo I have a true 100mb/FD ethernet connection. It's connected to the backbones with multiple oc-12's. ON MY BEST DAY I once saw it get up to about 32 megabits's a second when I was downloading Staroffice from Sun. Just cuz you have 100mb connection doesn't mean you get all of it. It' just the way ethernet works.
  • verboseverbose Join Date: 2002-11-25 Member: 9968Members, Constellation
    <!--QuoteBegin--cracker jackmac+Mar 3 2003, 12:18 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (cracker jackmac @ Mar 3 2003, 12:18 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><!--QuoteBegin--MonsieurEvil+Mar 3 2003, 12:59 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MonsieurEvil @ Mar 3 2003, 12:59 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Maybe if they bonded 2 SONET OC-1's? You'd get 100.224 CIR in that scenario... <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    even if they did that, i doubt he has full access to it <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--><!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->telnet my.big.router
    Trying some.ip.add.ress...
    Connected to my.big.router
    Escape character is '^]'.


    User Access Verification

    Username: verbose
    Password:

    This is a private computer facility. Any unauthorized access is
    strictly prohibited and may be a violation of respective local and/or
    federal laws.

    Unauthorized access will be prosecuted to the fullest extent allowed
    by applicable laws.

    big.router

    big.router>en
    Password:

    big.router#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    big.router(config)#int ser 1/0
    big.router(config)#dsu bandwidth 105266<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Voila. 100 megabit connection. Well, DOWN to 100 megabit, which isn't very cool, but...
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->big.router(config)#int ser 1/0
    big.router(config)#dsu bandwidth 105266<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    wouldn't they use subinterfaces instead? i mean, thats kinda pricey to limit an emtire serial link to 100mbit just for him <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • zippyzippy Forum Police. Join Date: 2003-01-06 Member: 11956Members, Constellation
    i have cenceled the linux server and am looking for a decent one <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->

    oh btw we used shell access to make the server dl NS for it's self, 1070kbps <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    zippy
  • verboseverbose Join Date: 2002-11-25 Member: 9968Members, Constellation
    <!--QuoteBegin--cracker jackmac+Mar 3 2003, 07:50 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (cracker jackmac @ Mar 3 2003, 07:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->big.router(config)#int ser 1/0
    big.router(config)#dsu bandwidth 105266<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    wouldn't they use subinterfaces instead? i mean, thats kinda pricey to limit an emtire serial link to 100mbit just for him <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--><!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    To limit to 100Mbit...take away his gig card, and hand him a $15 Linksys. Why do it in software when you can do it in hardware <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • JarlaxleJarlaxle Join Date: 2002-11-21 Member: 9546Members
    Yea, the server is just not cutting it. 2ghz, 1 gig ram, and no bandwidth restrictions other than the limit on total of 400GB end of the month. =/
  • ZdroneZdrone Join Date: 2002-11-02 Member: 3914Members, Constellation
    Wow...

    Im running 2, 18 person servers on a dual 1.266ghz IBM X330 on a 1.1mb SDSL line. I do (finally) have each of the servers bound to an individual CPU.

    I get between 40-80ms (straight ping to the server gives me about 30-35ms). There is the occasional spike to 250ms when someone goes nuts with a turret farm or 6 hmg's go off on a hive at once, but its typically quite decent.

    All running on a W2K server. I was looking at Linux (lots of questions in the nsserver channel) but haven't had the time to go back to it. I really would like to go to Linux once the CPU utilization gets down somewhat. Im a bit afraid after hearing that a 2ghz system cant handle an 18 person server.

    /me stares dreamily in the distance for v1.1.

    On an off topic, I got a lovely new tool to monitor cpu/bandwidth. Going to set it up for my servers as soon as I get a chance (leaving the country for a week).
Sign In or Register to comment.