Message boards :
Number crunching :
Impact of setting core affinity
Message board moderation
Author | Message |
---|---|
gs Send message Joined: 18 May 99 Posts: 45 Credit: 5,412,660 RAC: 8 |
Is there an advantage of setting an affinity for tasks to cpu cores? Would setting an affinity of a cpu core to support cuda tasks speed up th calculations? |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
Is there an advantage of setting an affinity for tasks to cpu cores? Would setting an affinity of a cpu core to support cuda tasks speed up th calculations? How would you do that? |
Claggy Send message Joined: 5 Jul 99 Posts: 4654 Credit: 47,537,079 RAC: 4 |
Is there an advantage of setting an affinity for tasks to cpu cores? Would setting an affinity of a cpu core to support cuda tasks speed up th calculations? No, but setting the app's priority to 'normal', 'abovenormal', or 'high' should, by using the supplied mbcuda.cfg file. Your's is still set to below normal: <stderr_txt> Claggy |
gs Send message Joined: 18 May 99 Posts: 45 Credit: 5,412,660 RAC: 8 |
In Win 7 under Task Manager /Processes, you can right click an set an affinity for a task to one of the cores of the cpu. This selected task then would be run on that CPU core only. I have set affinities like this: Core 0: AKv8c_Bb_r1846_winx86_SSSE3x Core 1: AKv8c_Bb_r1846_winx86_SSSE3x Core 2: AKv8c_Bb_r1846_winx86_SSSE3x Core 3: Lunatics_x41zc_win32_cuda50 Core 3: Lunatics_x41zc_win32_cuda50 Core 3: Lunatics_x41zc_win32_cuda50 where the AKv8c are CPU tasks, and Core 3 would feed 3 x cuda50 on my GPU. |
Alinator Send message Joined: 19 Apr 05 Posts: 4178 Credit: 4,647,982 RAC: 0 |
However, setting affinity that way only lasts for as long as the task(s) you do it for runs. Once it finishes, thread control and scheduling reverts to the OS. |
gs Send message Joined: 18 May 99 Posts: 45 Credit: 5,412,660 RAC: 8 |
However, setting affinity that way only lasts for as long as the task(s) you do it for runs. Once it finishes, thread control and scheduling reverts to the OS. I am aware of this, however I find it interesting to figure out, if this would be beneficial to the processing time. Any observations so far? |
Ulrich Metzner Send message Joined: 3 Jul 02 Posts: 1256 Credit: 13,565,513 RAC: 13 |
Long time ago there was a special BOINC client made by Crunch3r, that did exactly that processor affinity thingy, unfortunately it was abandoned by him. I used it, until some project (I think it was Einstein) urged me to use a normal stock client. My impression was, the crunching process won from this modification - although not much. Aloha, Uli |
cov_route Send message Joined: 13 Sep 12 Posts: 342 Credit: 10,270,618 RAC: 0 |
Check this thread http://setiathome.berkeley.edu/forum_thread.php?id=71057 The updated script is over here. This is with an ATI GPU. Summary of what I know: Raistmer found some improvement on an AMD APU with MB V6. For my part I find that I don't have to free any cores to run two MB V7 jobs if I set the GPU jobs to a single core. I have a Phenom II. Increasing priority doesn't seem to help much in my case. The affinity trick doesn't seem to work with AP and Einstein, I have to free cores for them. I don't have information about whether or not this works with Nvidia. This approach is not common. As far as I know I'm the only one doing this. Here is what my system looks like with all cores loaded and 2 MB GPU jobs. It runs like this 24/7: |
Alinator Send message Joined: 19 Apr 05 Posts: 4178 Credit: 4,647,982 RAC: 0 |
I guess it really comes down to a couple of things. First is what you use the machine for. I suppose on a dedicated crunch box where maximum task throughput is paramount at the expense of everything else then it might be worth it. If it's on your daily driver where you like do get your work done efficiently while crunching at the same time in the background, I'm not so sure. Second would be if you're on an Intel or AMD platform. If you're on an HT enabled Intel, then I can see where affinity might be of use. On AMD's, even Bulldozer/Piledriver's, I haven't seen any advantage to using it, at least with Win 7 or higher (I don't do Vista, aka ME II). Might be a different story on Linux though. |
EdwardPF Send message Joined: 26 Jul 99 Posts: 389 Credit: 236,772,605 RAC: 374 |
just for fun ... here is a windows ".bat" file REM I "think" it helps performance BUT it does help keep track of whar WU is doing what to your computer by watching task manager etc. Ed F |
Keith White Send message Joined: 29 May 99 Posts: 392 Credit: 13,035,233 RAC: 22 |
I used siv (off the BOINC page) to automatically set core affinity for all the CPU tasks back when my GPU task suffered if core 0 had any significant load on it (it may have been because Lunatics at the time had limited affinity of my GPU task to cores 0 or 1, now the latest allows it to run on all cores). I don't use it anymore since the rollout for V7 and it doesn't seem to help/hurt application speed. But that's my CPU with it's cache size and layout as well as it's memory prefetcher may not make a noticeable difference in performance. YMMV. "Life is just nature's way of keeping meat fresh." - The Doctor |
gs Send message Joined: 18 May 99 Posts: 45 Credit: 5,412,660 RAC: 8 |
just for fun ... here is a windows ".bat" file Thanks, Ed, interesting piece of software indeed. ;-) |
gs Send message Joined: 18 May 99 Posts: 45 Credit: 5,412,660 RAC: 8 |
Is there an advantage of setting an affinity for tasks to cpu cores? Would setting an affinity of a cpu core to support cuda tasks speed up th calculations? Thanks, Claggy, I changed the file to abovenormal. |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.