• Competitor rules

    Please remember that any mention of competitors, hinting at competitors or offering to provide details of competitors will result in an account suspension. The full rules can be found under the 'Terms and Rules' link in the bottom right corner of your screen. Just don't mention competitors in any way, shape or form and you'll be OK.

Permanent CPU affinitys?

Soldato
Joined
8 Mar 2010
Posts
4,967
Location
Aberdeenshire
Hi,

Just wondering if there was an easy way to do this? I have a small Burstcoin mining op going on that needs a bit of cpu power dedicated to it for scanning through the hard drives every few minutes. By default the program sets all cores active, however will happily run with just 1 or 2. So basically I want to set a specific amount, maybe 2 or 4 cores to run this optimally whilst using 8 for my games and the rest for everything else should I alt tab, go online etc I don't know how to do it without manually disabling cores every time I start a program.
 
Last edited:
Soldato
Joined
9 Dec 2006
Posts
9,246
Location
@ManCave
project lasso

OR inside a batch file
PowerShell "get-process java | %% { $_.ProcessorAffinity=11 }

Powershell
get-process java | % { $_.ProcessorAffinity=11 }

Change java with process name & adapt processor affinity as necessary


ProcessorAffinity=1

Will assign only the first core to the Application in Question. Remember it’s a Binary value you’re computing so to figure out the Binary number to use, you must add it in your head or draw it out

0001 = 1 ( CPU 1)

0010 = 2 ( CPU 2)

0100 = 4 ( CPU 3 )

1000 = 8 ( CPU 4 )

Therefore if I want to assign Core 1 and 4 to the Application, Add up the Binary numbers ( 1000 (8d) ) and ( 0001) (1d) ) to get 9

then you could add to your batch to launch the program 7 change the affinity with 1 click
 
Soldato
OP
Joined
8 Mar 2010
Posts
4,967
Location
Aberdeenshire
project lasso

OR inside a batch file
PowerShell "get-process java | %% { $_.ProcessorAffinity=11 }

Powershell
get-process java | % { $_.ProcessorAffinity=11 }

Change java with process name & adapt processor affinity as necessary




then you could add to your batch to launch the program 7 change the affinity with 1 click
I think you meant "Process" Lasso but I tried it and it works great. Exactly what I needed thanks :)
 
Back
Top Bottom