Core Affinity

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
Donkie
New to forums
New to forums
Posts: 7
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Feb 13, 2014 11:04 am

Core Affinity

Post by Donkie »

Hi.
I'm running a 4-core Windows Server 2012 VDS, intended for hosting a couple of garrysmod servers.
To keep the servers at bay and work independently, I want to set the core affinity of srcds separately so they use 1 core each. This can be done through task manager or other thirdparty tools, but setting this everytime I want srcds to start is quite annoying, so I read up that you can use the /affinity switch on cmd's start command. I've tried using this is multiple ways, the server starts without errors but the affinity is ALWAYS set to core 0 and core 0 only, always.

I'd need some help here.
List of things I've tried:
  • start "" /affinity 5 srcds.exe blablabla
  • start "" /affinity 0x5 srcds.exe blablabla
  • start /affinity 5 srcds.exe blablabla
  • start /affinity 0x5 srcds.exe blablabla
In theory this should give it access to core0 and core2, but its only set to core0.

I've tried /affinity with other apps, and it doesn't work there either. It actually feels like all apps (non-multithreaded??) starts with only core0, using start or just doubleclicking them. I can set them to all cores in taskmanager however.

tl;dr:
core affinity is completly messed up in my windows server 2012 installation.
Speced
New to forums
New to forums
Posts: 13
Joined: Wed Aug 07, 2013 12:14 pm
Location: Canada
Contact:

Re: Core Affinity

Post by Speced »

I'd say you'd just leave the OS to handle it the cores.

If you still want to use affinities, I believe it is simply "/affinity X", where X is
  • Core 1 is 1
  • Core 2 is 2
  • Core 3 is 4
  • Core 4 is 8
SG-Servers.com
#RIPSingleCoreWindows
kaboobie
New to forums
New to forums
Posts: 5
Joined: Mon Jan 27, 2014 3:50 am

Re: Core Affinity

Post by kaboobie »

firedaemon handles core affinity nicely in my experience.
Post Reply