Bitcoin Forum
April 25, 2024, 02:33:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: howto: start mining software with CPU affinity (Win only) to avoid "core eating"  (Read 6728 times)
Diapolo (OP)
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 15, 2011, 03:17:47 PM
 #1

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$!

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714012412
Hero Member
*
Offline Offline

Posts: 1714012412

View Profile Personal Message (Offline)

Ignore
1714012412
Reply with quote  #2

1714012412
Report to moderator
1714012412
Hero Member
*
Offline Offline

Posts: 1714012412

View Profile Personal Message (Offline)

Ignore
1714012412
Reply with quote  #2

1714012412
Report to moderator
1714012412
Hero Member
*
Offline Offline

Posts: 1714012412

View Profile Personal Message (Offline)

Ignore
1714012412
Reply with quote  #2

1714012412
Report to moderator
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
July 15, 2011, 03:30:19 PM
 #2

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;

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
dikidera
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
July 15, 2011, 03:43:33 PM
 #3

Whats the difference between setting it via Task Manager?
Diapolo (OP)
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
July 15, 2011, 06:16:08 PM
 #4

Whats the difference between setting it via Task Manager?

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

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
July 21, 2011, 09:28:42 PM
 #5

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.
sc8nt4u
Sr. Member
****
Offline Offline

Activity: 286
Merit: 250


View Profile
July 22, 2011, 02:29:22 AM
 #6

Why can't you just outright disable every core but one in the bios?
tysat
Legendary
*
Offline Offline

Activity: 966
Merit: 1004


Keep it real


View Profile
July 22, 2011, 06:46:08 AM
 #7

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?
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
July 22, 2011, 09:20:41 AM
 #8

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.
Meatball
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250



View Profile
July 22, 2011, 05:00:50 PM
Last edit: July 22, 2011, 05:17:14 PM by Meatball
 #9

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.)

OgNasty
Donator
Legendary
*
Offline Offline

Activity: 4718
Merit: 4224


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
July 24, 2011, 03:29:53 AM
 #10

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.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
kwaaak
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
July 24, 2011, 03:51:45 AM
 #11

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.
FreeJAC
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
July 25, 2011, 04:08:41 AM
 #12

would this help possibly with the CPU possibly overheating due to the high usage? 

Donate here.... 18NiDLDA3qRxkEPN36xrzsdSgvEkbDKgNr
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!