Multiple Servers on the same box queries

suttysutty Join Date: 2010-08-01 Member: 73403Members
I have a very quick question, my experience with hosting game servers, or servers in general is very limited therefore the question might seem abit basic.

I'am successfully hosting a 18 man server at the moment, I would like to host another on the same box but unsure on what I need to do.

Do I need to order more ip's from my server provider, or can I host on the same ip and change the port etc? I did look on the wiki but this wasn't covered. (its probably so basic they didn't think it was needed to be said lol)

Any help will be appreciated :)

Comments

  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    You are correct, you can do either, but its obviously cheaper and doesnt have any performance impact to just use extra ports on the same IP. By default, the server will use port 27015 (and x+1, 27016) to host. You just need to open up an additional two ports, and in the config file, or command line specify the new ports, such as -port 27025. Make sure you open up this port, and x+1 (27026) on your firewall.
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    You can run them all of the same IP address, you just need to give them different ports. Also, make sure to separate the ports by two places if your trying to make them sequential. For example, with the Team156.com | Seattle servers I have the ports setup like:
    Seattle #1 = port 27015
    Seattle #2 = port 27017
    Seattle #3 = port 27019
    Seattle #4 = port 27021

    Also, I find it useful (though not all agree) to set the affinity of each server process to a core (or two). For example, I'm currently experimenting with settings each server to run on overlapping cores (i5 2500k with four cores):
    Seattle #1 = Cores 0,1
    Seattle #2 = Cores 1,2
    Seattle #3 = Cores 2,3
    Seattle #4 = Cores 0,3

    The only other big decision is whether to split the config and install locations. Personally, I'm running four different configs off of one installation location (to make it easier to quickly update all the servers), but that's not necessarily the best solution.
  • suttysutty Join Date: 2010-08-01 Member: 73403Members
    Thanks for the quick response, last question in that case -

    if I rdp to the server and go to the following <a href="http://localhost/index.htm" target="_blank">http://localhost/index.htm</a> I get the web admin interface, what would I need to do for the second server <a href="http://localhost/index.htm%3a%70ort" target="_blank">http://localhost/index.htm:port</a>?

    Thanks :)
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    You have to set different webport for each server and the web link would be

    <a href="http://localhost:81/index.html" target="_blank">http://localhost:81/index.html</a> for server on webport 81
    <a href="http://localhost:82/index.html" target="_blank">http://localhost:82/index.html</a> for server on webport 82
    etc
  • suttysutty Join Date: 2010-08-01 Member: 73403Members
    Cheers ScardyBob! Should of just posted here in the first place rather that fumbling around on google.

    I had considered setting the affinity, although I don't think I will be hosting 4 servers as my cpu quite abit weaker than yours - intel 975x but Its held a steady 30 ticks with 18 players :)
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    With that cpu (its a 4 core?) you could comfortably host 3 servers without issue. Only memory limits would come into play, and network bandwidth.
  • suttysutty Join Date: 2010-08-01 Member: 73403Members
    Indeed 4 core, I have 24gb of ram and 100mbit up/down :) Good info thanks.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    Yes you would just want to lock each server process to their own cores.
  • AussieKidAussieKid Join Date: 2012-08-07 Member: 154896Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Shadow
    ScardyBob, I'm very keen to hear your results of setting affinity. Currently I set mine up the same as you, in that each server.exe process has access to two cores (also on an OC'd 2500K here).

    A lot of people are saying to lock each server to a single core yet I am noticing there seems to be a slight performance improvement giving them access to two cores. Are you seeing the same results? Also have you noticed this having any effect on server stability?
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I'm also getting a bit sick of people saying give your server.exe process affinity to a single core without providing any evidence of the benefits.

    By unlocking it, a process can use more than a single core, but choking it to a single core, you are reducing performance!

    Please tell me this is being done for other reasons than maximising performance.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    edited November 2012
    @endar, if it wasn't locked to a single core, wouldn't multiple servers on the same system end up using the same cores?

    I've only seen a maximum of 2 cores used on a single server instance no matter the amount of players. I personally lock each server instance to 2 cores on my i7 as I usually see around 20-25% usage on the second core by the server. (EDIT: <a href="http://unknownworlds.com/ns2/forums/index.php?s=&showtopic=123252&view=findpost&p=2008489" target="_blank">Another guy</a> sees this too)

    @AussieKid, nope no stability issues from locking to 2 cores.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    It definitely does share cores, but why is that a bad thing? Windows is mature enough to handle that, and so is Intel.

    I can understand locking to two cores, since the server would never (in my experience) use more than two cores. But as soon as you lock a single core only, its limiting.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    Well then it'd be great to know if the server operators can provide info on whether have have locked their server processes to single, dual or none. Then we can correlate that to the server performance graphs in the sticky :)
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Yeah, I wouldn't lock it to a single core since there is a small, but not insignificant, amount of multithreading going on server-side. I'm currently testing the servers without setting an affinity to compare with setting it at only two cores. I'll let you guys know what I find.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I saw usage as high as 33-35% from a single server, although this was with 48 players online, so I guess that extra usage could be coming from the networking side talking to so many people. Who knows. Imagine that on a single core though, all the networking being forced into the 25% window, stealing precious time from your lua threads!
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Its looking like setting the core affinity doesn't help with server performance anymore. Here's server performance with affinity set to two cores:
    <a href="http://imgur.com/6tSts" target="_blank"><img src="http://i.imgur.com/6tStsl.png" border="0" class="linked-image" /></a>

    Now, here it is without any core affinity set:
    <a href="http://imgur.com/fgEsV" target="_blank"><img src="http://i.imgur.com/fgEsVl.png" border="0" class="linked-image" /></a>

    I can't really see any difference between them.
  • GuspazGuspaz Join Date: 2002-11-01 Member: 2862Members, Constellation
    Well you don't see the huge drops in tickrate in the second picture, for one thing...
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    That looks like a statistical anomaly, if you are talking about the drop at the end. Entity count also dropped, so something else has happened.

    I know its statistics, but to be able to truly measure we need more data, player count and entity count are obviously important, but there needs to be a more scientific way of testing this, at least until server performance is no longer an issue.

    What happened to ever Summit-XL?
Sign In or Register to comment.