Does the server use more than 1 core?

JackallJackall Join Date: 2012-11-09 Member: 168853Members
edited November 2012 in Server Discussion
I am hosting a server on Windows 2008R2 and this is my task manager:

<img src="http://freeurl.ws/task.png" border="0" class="linked-image" />

As you can see, only 1 core is being used. Of course that one core fluctuates but it only uses that one core.

Is this by design or is there a setting for using multicores?

Comments

  • krazekraze Join Date: 2012-10-26 Member: 163744Members
    NS2 wont use multiple cores, no. It is lightly multi-threaded so it will spread a little bit of the load out but not nearly enough of it to be considered as using multiple cores.
  • JackallJackall Join Date: 2012-11-09 Member: 168853Members
    <!--quoteo(post=2017904:date=Nov 9 2012, 09:55 PM:name=kraze)--><div class='quotetop'>QUOTE (kraze @ Nov 9 2012, 09:55 PM) <a href="index.php?act=findpost&pid=2017904"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->NS2 wont use multiple cores, no. It is lightly multi-threaded so it will spread a little bit of the load out but not nearly enough of it to be considered as using multiple cores.<!--QuoteEnd--></div><!--QuoteEEnd-->

    hmmm that just... sucks.

    Prob a stupid question to ask but can you run two games on one computer and have them point at different cores?
  • 101ways2pwn101ways2pwn Join Date: 2012-11-06 Member: 167792Members
    <!--quoteo(post=2018150:date=Nov 10 2012, 06:24 AM:name=Jackall)--><div class='quotetop'>QUOTE (Jackall @ Nov 10 2012, 06:24 AM) <a href="index.php?act=findpost&pid=2018150"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->hmmm that just... sucks.

    Prob a stupid question to ask but can you run two games on one computer and have them point at different cores?<!--QuoteEnd--></div><!--QuoteEEnd-->


    Go to task manager=>Processes=>Set Affinity
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    <!--quoteo(post=2017904:date=Nov 10 2012, 02:55 PM:name=kraze)--><div class='quotetop'>QUOTE (kraze @ Nov 10 2012, 02:55 PM) <a href="index.php?act=findpost&pid=2017904"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->NS2 wont use multiple cores, no. It is lightly multi-threaded so it will spread a little bit of the load out but not nearly enough of it to be considered as using multiple cores.<!--QuoteEnd--></div><!--QuoteEEnd-->
    It does use more than 1 core, lightly multi-threaded (in this case) means that its able to use multiple cores. Go to processes, and you will see server.exe using more than 25% (when tyhe server is sufficiently loaded).

    <!--quoteo(post=2018150:date=Nov 10 2012, 10:24 PM:name=Jackall)--><div class='quotetop'>QUOTE (Jackall @ Nov 10 2012, 10:24 PM) <a href="index.php?act=findpost&pid=2018150"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->hmmm that just... sucks.

    Prob a stupid question to ask but can you run two games on one computer and have them point at different cores?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Yes, as answered below, but..

    <!--quoteo(post=2018177:date=Nov 10 2012, 11:01 PM:name=101ways2pwn)--><div class='quotetop'>QUOTE (101ways2pwn @ Nov 10 2012, 11:01 PM) <a href="index.php?act=findpost&pid=2018177"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Go to task manager=>Processes=>Set Affinity<!--QuoteEnd--></div><!--QuoteEEnd-->
    That is the answer to his question, but if you do this you will limit the ability for the server process to utilize other functions on the other cores.



    Sure, the majority of the bottleneck is that the gamecode is running on 1 core, but there are other threads (networking? physic? I dont know) that can and do use the other cores. When you limit your server.exe process to one core, you are lowering the tickrate of your server. This is a fact, and cannot be reasonably debated. You can, however, limit it to two cores, and that will not limit performance, but it hasn't been shown why you would set affinity at all. Windows will handle your SMP without issues.
  • 101ways2pwn101ways2pwn Join Date: 2012-11-06 Member: 167792Members
    edited November 2012
    <!--quoteo(post=2018191:date=Nov 10 2012, 07:17 AM:name=endar)--><div class='quotetop'>QUOTE (endar @ Nov 10 2012, 07:17 AM) <a href="index.php?act=findpost&pid=2018191"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It does use more than 1 core, lightly multi-threaded (in this case) means that its able to use multiple cores. Go to processes, and you will see server.exe using more than 25% (when tyhe server is sufficiently loaded).


    Yes, as answered below, but..


    That is the answer to his question, but if you do this you will limit the ability for the server process to utilize other functions on the other cores.



    Sure, the majority of the bottleneck is that the gamecode is running on 1 core, but there are other threads (networking? physic? I dont know) that can and do use the other cores. When you limit your server.exe process to one core, you are lowering the tickrate of your server. This is a fact, and cannot be reasonably debated. You can, however, limit it to two cores, and that will not limit performance, but it hasn't been shown why you would set affinity at all. Windows will handle your SMP without issues.<!--QuoteEnd--></div><!--QuoteEEnd-->


    No multithreading on the 32-bit exe usually means there is no other processes running on different core. Hence the issues with performance on multicored systems. Close, but no cigar. <b>Setting affinity does not say you are setting the exe to 1 core only</b>! Multi-core processors like mine (6 cores) I can set 2,3,4,5,6 cores individually to handle my 2 instances of the server. "This is a fact and cannot be reasonably debated" is a <u><b>hilarious</b></u> thing to say when you are not presented with all the information. I stream and run multiple servers for multiple games on multiple Dell Poweredge servers (I own , I don't rent!) with (drum roll) multi-core processors. Setting affinity not only improves performance, it allows for multi-tasking many programs efficiently. <b>BTW, most cores are NOT arranged in order</b> - 1,2,3,4,5,6 - they have matched threading so another words affinity set to 1,3 (as opposed to 1,2) might be the most optimal. Please refer to Google to see which cores in affinity should match with which to get the most out of this process (processor dependent). So the information I gave cannot be debated or denied! LOL soo funny had to put that!

    <b>Point Being: set up using affinity / set more than 1 core per instance just to be safe / Set priority on instances to HIGH / profit!</b>
  • GuspazGuspaz Join Date: 2002-11-01 Member: 2862Members, Constellation
    edited November 2012
    Umm, except you're wrong? A multithreaded process, be it 32 or 64-bit, will automatically be scheduled onto the most available core (obviously the operating system's scheduling algorithms are more complex than this). Setting the affinity to a single core will indeed prevent the process from taking advantage of any other cores. Unless doing so to work around a specific bug with multiprocessor computing, you should not be setting the affinity on a process (this is a general rule of thumb that applies to more than just NS2).

    Setting an affinity means that you think YOU know more than the operating system about how to best use the resources available to it. And, as I said, unless you're working around a known bug, you don't.

    EDIT: There are a few scenarios in hosting or virtualization environments when you might want to do this for isolation reasons, but even then you'd be taking a performance hit by preventing the system from taking advantage of idle resources. The only time limiting the affinity would have a performance advantage is if you're dealing with an incredibly excessive number of context switches.
  • 101ways2pwn101ways2pwn Join Date: 2012-11-06 Member: 167792Members
    edited November 2012
    <!--quoteo(post=2018382:date=Nov 10 2012, 10:41 AM:name=Guspaz)--><div class='quotetop'>QUOTE (Guspaz @ Nov 10 2012, 10:41 AM) <a href="index.php?act=findpost&pid=2018382"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Umm, except you're wrong? A multithreaded process, be it 32 or 64-bit, will automatically be scheduled onto the most available core (obviously the operating system's scheduling algorithms are more complex than this). Setting the affinity to a single core will indeed prevent the process from taking advantage of any other cores. Unless doing so to work around a specific bug with multiprocessor computing, you should not be setting the affinity on a process (this is a general rule of thumb that applies to more than just NS2).

    Setting an affinity means that you think YOU know more than the operating system about how to best use the resources available to it. And, as I said, unless you're working around a known bug, you don't.

    EDIT: There are a few scenarios in hosting or virtualization environments when you might want to do this for isolation reasons, but even then you'd be taking a performance hit by preventing the system from taking advantage of idle resources. The only time limiting the affinity would have a performance advantage is if you're dealing with an incredibly excessive number of context switches.<!--QuoteEnd--></div><!--QuoteEEnd-->

    yup, for the most part. The OP was about singling out cores for use. <u>See this:</u> <a href="http://en.wikipedia.org/wiki/Processor_affinity" target="_blank">http://en.wikipedia.org/wiki/Processor_affinity</a> for a complete definition. However, I stand on what I know works and how I do it. Yes, this is a "workaround" for a program (NS2) that has no real multi-threading enabled.

    I am 100% correct in that you can (and I have on SEVERAL occasions) select cores to make the system perform better AT ITS INDIVIDUALLY ASSIGNED TASK.
    Spreading through all cores at all times when trying to run multiple instances on a program that has no multi-threading is as good as a solar powered flashlight.

    <b>Example:</b>
    I stream on Twitch.tv (1080p at 30fps and 720p at 60fps sometimes)
    X-split is VERY heavy when <u>capturing and encoding</u>
    My games lose fps when streaming
    Selecting cores to handle x-split and cores to handle just game restricts the scheduling system ON PURPOSE.
    Result: Lower FPS drop when playing and no stutter when streaming


    <b>The counter position on affinity:</b>
    I run an Avermedia c985 card now ( I got it free so why not?).... My affintiy is set to across all cores because I do not need to limit it due to the processing resources. The capture card now does the work freeing up the cores to do their other business.

    There are SEVERAL other examples on the web showing how gamers are using these settings for both serving games and running the game clients. Our DayZ server does this exact thing to get by ARMA II's demanding processes when running a 50 slot server. Result there? We can (and have) run all 50 slots with minimal lag for our players.

    That's all I can contribute for now. Make up your own mind. But more importantly, do some research for yourself. There are plenty of differing opinions on how things work or what is best on the Internet. :)
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    It gets a very tiny boost in performance by setting server.exe to 2 cores, but if you run more servers on one box, I'd say 3 servers.exe all on their own core and 1 core for the OS itself is the usual config. If you use the 2 cores per server.exe it tends add up and you need more boxes to run more servers at a neglectable performance boost for more cost

    quad core, 3 servers and 1 for OS
    hexa core, 5 servers and 1 for OS
    octa core, 7 servers and 1 for OS
    deca core, 9 servers and 1 for OS

    I take it those are the usual configs, well quad cores and hexa cores mostly :P
  • kk20kk20 Join Date: 2012-10-30 Member: 164592Members
    Setting affinity is a way of forcing an app to leave certain cores alone. If you have an app that you know can max out a system then perhaps you could set affinity to [cores -1] so you know your app wont bog your system down.

    That being said, the OS will still use your cores as it sees fit its just the app set as affinity cannot.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    <!--quoteo(post=2018234:date=Nov 11 2012, 12:03 AM:name=101ways2pwn)--><div class='quotetop'>QUOTE (101ways2pwn @ Nov 11 2012, 12:03 AM) <a href="index.php?act=findpost&pid=2018234"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Multi-core processors like mine (6 cores) I can set 2,3,4,5,6 cores individually to handle my 2 instances of the server. "This is a fact and cannot be reasonably debated" is a <u><b>hilarious</b></u> thing to say when you are not presented with all the information. I stream and run multiple servers for multiple games on multiple Dell Poweredge servers (I own , I don't rent!) with (drum roll) multi-core processors. Setting affinity not only improves performance, it allows for multi-tasking many programs efficiently.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I stated a fact, and an invitation to debate whether setting the server.exe process to a single core, will limit performance, but you appeared not to have brought up any reason or explanation of why this would or wouldn't improve performance?

    Please don't tell me you are taking about an instance where the server is highly overloaded, and you are using affinity to provide the process with enough power. I guess its open to interpretation, but I'll be more specific, and you can tell me if you agree with the following statement.

    If you have a 6 core cpu, and you run only 1 real program on the server (server.exe), with no other highly demanding services, or anything but the required components that make up a windows server, then you will limit your tickrate, and provide a sub-optimal performance to the people playing on your server by setting affinity of that process to a single core.

    Is that a statement you can agree with? I don't understand why you brought up running streaming, of course if you are doing additional work that robs power from your main process, then you will limit performance.
  • krazekraze Join Date: 2012-10-26 Member: 163744Members
    I would have to agree that limiting processes to certain affinity's can actually work against you. Windows does a pretty good job of bouncing processes around to different cores/threads and limiting that can hinder performance.


    The NS2 dedicated server will take advantage of multiple threads but not cores, the developers said they will jump at the chance to add multiple core support if the opportunity arose.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    <!--quoteo(post=2019340:date=Nov 11 2012, 07:02 PM:name=kraze)--><div class='quotetop'>QUOTE (kraze @ Nov 11 2012, 07:02 PM) <a href="index.php?act=findpost&pid=2019340"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The NS2 dedicated server will take advantage of multiple threads but not cores, the developers said they will jump at the chance to add multiple core support if the opportunity arose.<!--QuoteEnd--></div><!--QuoteEEnd-->
    The server does take advantage of multiple cores. Just not for the main LUA thread, there are other calculations running on additional cores. I've seen utilization peak at 35% (of a quad core), so an entire core, and another 40% of a 2nd core.
  • LucianLucian Join Date: 2004-01-09 Member: 25193Members, Constellation
    <!--quoteo(post=2019377:date=Nov 11 2012, 05:56 AM:name=endar)--><div class='quotetop'>QUOTE (endar @ Nov 11 2012, 05:56 AM) <a href="index.php?act=findpost&pid=2019377"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The server does take advantage of multiple cores. Just not for the main LUA thread, there are other calculations running on additional cores. I've seen utilization peak at 35% (of a quad core), so an entire core, and another 40% of a 2nd core.<!--QuoteEnd--></div><!--QuoteEEnd-->
    This is the exact same behavior I've noticed. Since build 227, the utilization on the second core has gone up slightly. I've had to limit the affinity to two cores because it began to interfere with our other servers.
  • 101ways2pwn101ways2pwn Join Date: 2012-11-06 Member: 167792Members
    edited November 2012
    <!--quoteo(post=2019505:date=Nov 11 2012, 07:14 AM:name=Lucian)--><div class='quotetop'>QUOTE (Lucian @ Nov 11 2012, 07:14 AM) <a href="index.php?act=findpost&pid=2019505"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->This is the exact same behavior I've noticed. Since build 227, the utilization on the second core has gone up slightly. I've had to limit the affinity to two cores because it began to interfere with our other servers.<!--QuoteEnd--></div><!--QuoteEEnd-->


    ^Yup. Now your in for a debate (not by me). LOL ;)
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    He has a different reason to limit the performance of his server though. If you are a GSP, then it's probably quite important that you make sure that a malfunctioning server (or even a heavily loaded server), does not impact the other servers, because you will get angry customers. That's a very good reason to limit performance, in exchange for knowledge that the other servers won't be affected.
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    I've tested both locking servers to two cores and not setting affinity for NS2 and I haven't seen any noticeable difference in performance. There are good reasons for locking servers to specific cores (e.g. reduce impact on other servers, ability to link server performance to CPU load), but performance improvements is not one of them.
  • 101ways2pwn101ways2pwn Join Date: 2012-11-06 Member: 167792Members
    edited November 2012
    How to set affinity without just choosing 0,1 or 1,2. Setting the correct way takes more than just picking the two closest core numbers.

    FSX <u>as an example</u>.

    some info: <a href="http://www.realenvironmentxtreme.com/forums/index.php?/topic/13514-affinity-tweak-question/" target="_blank">http://www.realenvironmentxtreme.com/forum...tweak-question/</a>

    Again, case in point..only for certian programs or limitations and even then it depends on processor type and operating system. Can it be done? YES We are all now officially beating a dead horse since for the most part we all agree. Just depends WHAT programs you are running and HOW you are running them.
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    My experience in the past week:

    E3-1270 with 3 servers at 22 man - (cores 2,3 - 4,5 - 6,7) - works.... but when all 3 servers are packed and towards the end of the game... **** my life. (cores 0,1 reserved for system and wine). Performance dropped to lower 30s.

    Setting only 2 servers of 22 man (2,3,4 and 5,6,7) works muuuuuuch better. Performance averages around 80-90 when both are loaded and towards end of game (# entities way up there).

    I'll do the overclock soon and see if i can stick with 2x 24mans. (i know, i can only overclock to 3.8GHz - turbo limit - from 3.4, but still a 10%+ boost)
Sign In or Register to comment.