Author

Topic: howto: start mining software with CPU affinity (Win only) to avoid "core eating" (Read 6745 times)

member
Activity: 112
Merit: 10
would this help possibly with the CPU possibly overheating due to the high usage? 
full member
Activity: 139
Merit: 100
This worked well for me but I lose the ability to use the "title" command, so now I am not sure which window is which miner.  Not a big deal, but if anybody has a solution, let me know.

Just do

Code:
start /affinity 1 /min miner_1.bat

And put a title line in the batch file.

You don't have to do Hex numbers, 1,2,3,… works, too.
donator
Activity: 4760
Merit: 4323
Leading Crypto Sports Betting & Casino Platform
This worked well for me but I lose the ability to use the "title" command, so now I am not sure which window is which miner.  Not a big deal, but if anybody has a solution, let me know.
sr. member
Activity: 378
Merit: 250
You can also remove all the existing ATI software, and do a fresh "display driver only" install of the WHQL Catalyst 11.6 driver (which does include OpenCL despite it's name). This version does not have a CPU problem, and I have 2 miners running at 0-1% CPU.

This didn't fix it for me.  I've tried every combination of drivers 11.5, 11.6 & 11.7 with SDK's 2.1 & 2.4's, and on all my cards (5770's, 5830's, 5850's & a 6950) on W7 x32 & x64 and the poclbm.exe processes eat up 100% of whatever core I assign it too.  So, if it's a single core CPU I get 100% CPU utilization, dual core system, I'll have 50% CPU utilization, and even on my Core i7-860 (Quad Core/Hyperthreaded), poclbm uses 100% of 1 of the cores, showing up as ~13% usage.

Check your task manager and look at the performance tab.  You should see a CPU Usage History chart for every 'core' your computer sees.  On all mine, at least one of them is pegged at 100% (the one I've set the processes to run with.)

legendary
Activity: 1512
Merit: 1036
You can also remove all the existing ATI software, and do a fresh "display driver only" install of the WHQL Catalyst 11.6 driver (which does include OpenCL despite it's name). This version does not have a CPU problem, and I have 2 miners running at 0-1% CPU.

Can you then apply the 11.6b hotfix to be able to use cards without dummy plugs/monitors plugged in?
The 11.6b driver reintroduces the CPU race bug.
legendary
Activity: 966
Merit: 1004
Keep it real
You can also remove all the existing ATI software, and do a fresh "display driver only" install of the WHQL Catalyst 11.6 driver (which does include OpenCL despite it's name). This version does not have a CPU problem, and I have 2 miners running at 0-1% CPU.

Can you then apply the 11.6b hotfix to be able to use cards without dummy plugs/monitors plugged in?
sr. member
Activity: 286
Merit: 250
Why can't you just outright disable every core but one in the bios?
legendary
Activity: 1512
Merit: 1036
You can also remove all the existing ATI software, and do a fresh "display driver only" install of the WHQL Catalyst 11.6 driver (which does include OpenCL despite it's name). This version does not have a CPU problem, and I have 2 miners running at 0-1% CPU.
hero member
Activity: 772
Merit: 500
Whats the difference between setting it via Task Manager?

Well, only that you don't need the Task Manager Wink.

Dia
full member
Activity: 126
Merit: 100
Whats the difference between setting it via Task Manager?
legendary
Activity: 2058
Merit: 1452
i did something similar in c#

Code:
Random rnd = new Random();
IntPtr affinity = (IntPtr)Math.Pow(2.0, rnd.Next(4));
...
miner[i].ProcessorAffinity = affinity;
hero member
Activity: 772
Merit: 500
I saw quite a few topics from Phoenix users, who complain that Phoenix sucks up 1 full CPU core for each running instance.
Not all are seeing this behaviour, but the ones who do may be interested in this.

That is how I start Phoenix for my HD5830 via a batchscript:

Code:
CD $PATH_TO_YOUR_MINING_EXE$ (C:\Bitcoin\Phoenix for example)
START /AFFINITY 0x01 phoenix.exe -v -u http://XYZ:8080 -a 50 -k phatk AGGRESSION=12 BFI_INT DEVICE=1 FASTLOOP=false VECTORS WORKSIZE=256

Now let's take a look at /AFFINITY 0x01. This parameter allows you to set CPU affinity via a hex mask. I have a six core Phenom II, now I want Phoenix to use only the first core.

You have to think of your CPU cores as bits, so the Phenom would be 000001 (the right bit is ths first core, right -1 would be second core and so on).
Now you have to convert your CPU mask into hex, which is easy for 000001, it is 0x01. To use only core 2 (000010) the hex value is 0x02 and so on.

You now can try to set the affinity of every Phoenix instance to the same CPU or you distribute the instances over your cores.

An affinity gives you a great advantage, there is no core hopping of processes PLUS you can make Phoenix (or whatever you use) only use one core and not more.

Give it a try and if it works, consider a small donation Cheesy.

Dia

PS.: I had to use the CD $PATH_TO_YOUR_MINING_EXE$, because the affinity was not set if using START /D:$PATH_TO_YOUR_MINING_EXE$!
Jump to: