A Few Questions On Creating Ns Server
Cobra5mil
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
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.
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.
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...
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).
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-->
That looks normal