A Few Questions On Creating Ns Server

Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
<div class="IPBDescription">Read the topic.....</div> Well, I am thinking about hosting a server for a website. However, I have two questions I would like to ask before deciding. The first is how much CPU and bandwidth would be used on a 12 person server? The second is if I create a dedicated server, could I still join my server on the same computer that is running it. Or, would I have to make it a listen server in order for me to be able to host and play on the same computer. If it was a listen server, I would always be taking one of the player slots, even if I am not using it. Any help is appreciated.

Comments

  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    1. How much CPU and Bandwidth...

    This is an age old question asked many times. The real answer is...it depends. It depends on which OS (Linux or Windows) you chose to use. If you went dedicated server on windows it has shown to have less CPU load then the same server on a stock Linux install.

    With a 12 player server expect to use about 25-35K a second. This also depends on if you cap the maximum bandwidth someone is allowed to use and how much action goes on.

    Here's a link to an OLD graph I've used to illustrate differences in bandwidth usage:
    <a href='http://www.vadakill.com/files/bandwidthComparitive.png' target='_blank'>http://www.vadakill.com/files/bandwidthComparitive.png</a>


    2. Can I play on the same machine that my dedicated server is running on?

    You can, but server will lag horribly. The reason is, a dedicated server expects to have full reign on the CPU and memory. The HL client expects to have full reign on the CPU, memory and graphics card. Mixing these two things will result in fighting over resources giving you and your players a less then satisfactory playing experience.

    The only execption to this rule is multiprocessor systems, and as far as I know, only really practical on windows. You'll have to set the affinity of the HL dedicated server to one of the CPUs while your client uses the other. I don't know if a Pentium 4 with HT shares resources efficiently enough to do this.

    As for a listen server, if you run just a listen server and decide you want to leave, the server will shut down. If you keep a listen server up and running, you will still be there taking up a slot even if you are AFK.
  • Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
    Thanks for the reply. I have created a dedicated server using DOS. However, I can't seem to find the server on the master list. Also, the IP address is a 192.168.X.XX number. I thought it should start with a 69.XXX.X.XX number. I am running it on a router, although I did set it up as a DMZ Host that should forward every single port. Have any ideas of what could be wrong?
  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    Try setting the IP address as part of the command line "+ip 69.XXX.X.XX"
  • Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
    I tried that, but it just gives an error saying it was not able to allocate the server ip port 27015...
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    Rather than using DMZ, just put a forwarded port to the computer's IP of 192.168.1.xxx.

    All you need to forward is port 27015 (or whatever port you set your HLDS to use).

    As for that couldn't allocate on port 27015, sounds like something is on that port already, ie. another HLDS server that is still running.
  • Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
    <!--QuoteBegin-Boris+Mar 3 2005, 03:49 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Boris @ Mar 3 2005, 03:49 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> As for that couldn't allocate on port 27015, sounds like something is on that port already, ie. another HLDS server that is still running. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    That's what I thought too. I tried changing the port number, but it still gave the same error. I also tried to forward the port instead of using DMZ, but it did not work...
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    Okay, try this:

    Did you ever successfully start a server? Before messing with all the ports and junk, let's get the server running. You say you are running from DOS, what exactly are you referring to here? that you have it running in "-console" mode?

    Post your command that runs the HLDS (I guess it is now S(team)DS).
  • Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
    edited March 2005
    I am using the guide from Vadakill's website. Here are the commands I am using when it runs without an error....

    hlds.exe -game ns -maxplayers 12 +map co_core -console +port 27015 +mapchangecfgfile "server.cfg" +exec banned.cfg

    Of course, it says that it couldn't exec language.cfg or banned.cfg since I have not created them yet. Here is what it says when I start the server...

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->Console initialized
    Protocol version 47
    Exe version 1.1.2.0 <valve>
    Exe build: 10:30:01 Jul 28 2004 <2834>
    STEAM Auth Server
    couldn't exec language.cfg
    couldn't exec banned .cfg
    Server IP address 192.168.1.60:27015
    No auth servers parsed
    Disabling Valve Authentication.
    Adding master server 207.173.177.11:27010
    Adding master server 69.28.151.178:27010
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    When I type stat in the console, it gives me this:
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->hostname: Cobra5mil's Test Server
    Version: 47/1.1.2.0 2834 insecure
    tcp/ip: 192.168.1.60:27015
    map:co_core at: 0 x, 0 y, 0 z
    players: 0  active <12 max><!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    edited March 2005
    So it starts ok?

    That looks normal
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    If you are doing this right now, I could take some time and help you out on MSN if you want. My MSN info is on these forums
  • Cobra5milCobra5mil Join Date: 2005-03-02 Member: 43016Members
    Thanks a lot, I will send you an IM now.
Sign In or Register to comment.