mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2019-06-16, 20:12   #1
hansl
 
hansl's Avatar
 
Apr 2019

5×41 Posts
Default Is there any sensible auxiliary task for HT logical cores when physical cores already used for PRP?

I have a core i7 with 4 physical core, 8HT, and another 6/12 core running prime95/mprime respectively. I have them both pretty much just doing PRP or LL with a single worker taking all cores. As I understand, assigning the "logical" HT cores to PRP/LL does not help, but is there anything else they can theoretically be put to use for while those run, like maybe have another worker doing trial factoring, without overall loss in throughput? Or other GIMPs-related programs?

Also I haven't ever tried setting affinity/pinning cores; does it matter to try setting affinity of these cores in any way or does prime95 manage that automatically. By the way how are the physical vs logical cores numbered? Are they split among odd/even?

If all physical cores are used by PRP/LL, could a second worker doing TF be pinned to *only* use hyperthreaded logical cores and would it matter?
Or are the ALUs or whatever basically completely saturated by PRP/LL such that there's absolutely no more work to be done without "stealing" resources from them?

Last fiddled with by hansl on 2019-06-16 at 20:13
hansl is offline   Reply With Quote
Old 2019-06-16, 21:26   #2
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

13D116 Posts
Default

This depends on your idea of "sensible"; that is, which tasks you consider a good use of CPU time. Both GMP-ECM and NFS sieving only lightly use memory bandwidth, so they can be interleaved on the hyperthreads with only a small penalty to mprime/P95 speed. If your i7 has dual-channel memory (rather than 3- or 4-channel), some of your 4 primary threads are likely stalling while waiting on memory; you can test this by trying a 3-threaded worker and comparing the sec/iter to a 4-threaded worker; on my i5 with dual-channel memory, I lose something like 5% on sec/iter by runnning 3-threaded, but I use that 4th core for ECM work that I find important.

If you place value on that kind of work, it's a nice mix with mprime. Those tasks aren't GIMPS-related, though, so in terms of this project there's no efficient use for those hyperthreads.

How cores are numbered depends on your OS. Linux does e.g. 0-5 physical, 6-11 hyper. I think windows does odd/even, but I haven't used win10 so I can't speak with any authority.
VBCurtis is online now   Reply With Quote
Old 2019-06-17, 01:16   #3
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

7,691 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
How cores are numbered depends on your OS. Linux does e.g. 0-5 physical, 6-11 hyper. I think windows does odd/even, but I haven't used win10 so I can't speak with any authority.
OS logical CPU numbering is irrelevant in recent prime95/mprime versions. Prime95 uses hwloc logical CPU numbering.
Prime95 is online now   Reply With Quote
Old 2019-06-17, 02:42   #4
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

2·23·137 Posts
Default

To the OP: Note that "physical" and "hyper" cores are the same thing. It is just two interleaved feeds into a single execution unit. So it makes no difference which of the two feeds you choose to use. And you can't prioritise one feed over the other. So if you have a high importance task and a lesser importance task on the same execution unit they will share evenly. There is no way to make one have the first pick of free execution slots.

Measure, don't guess. Just try various combinations and measure the effects.
retina is offline   Reply With Quote
Old 2019-06-17, 13:57   #5
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

593310 Posts
Default

Quote:
Originally Posted by retina View Post
To the OP: Note that "physical" and "hyper" cores are the same thing. It is just two interleaved feeds into a single execution unit. So it makes no difference which of the two feeds you choose to use. And you can't prioritise one feed over the other. So if you have a high importance task and a lesser importance task on the same execution unit they will share evenly. There is no way to make one have the first pick of free execution slots.
Set priority differently on the processes; set processor affinity differently on the processes. They will share cpu throughput unequally according to these settings.

http://woshub.com/process-priority-m...nt-in-windows/
https://www.thewindowsclub.com/proce...finity-windows
Attached Thumbnails
Click image for larger version

Name:	process settings.png
Views:	162
Size:	47.6 KB
ID:	20645  
kriesel is online now   Reply With Quote
Old 2019-06-17, 14:07   #6
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

2×23×137 Posts
Default

Quote:
Originally Posted by kriesel View Post
Set priority differently on the processes; set processor affinity differently on the processes. They will share cpu throughput unequally according to these settings.

http://woshub.com/process-priority-m...nt-in-windows/
https://www.thewindowsclub.com/proce...finity-windows
Unfortunately there is no hardware mechanism to support priority for each thread within one execution unit. You can tell the OS to set a priority but it has no effect at the hardware level. They always share equally.

Try it. Set two threads of different priority to an affinity where they share one execution unit (two HT threads on one core). And time the results.
retina is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
More cores or less. Math31415 Hardware 6 2019-01-16 18:51
Cannot use two cores abelianbhaskar Information & Answers 3 2018-05-28 15:40
Best use of six cores for L-L testing Chuck Hardware 4 2011-05-10 03:04
worker windows: one per physical/logical core? ixfd64 Software 2 2010-12-09 17:38
CPU cores Unregistered Information & Answers 7 2009-11-02 08:27

All times are UTC. The time now is 23:47.


Tue Dec 7 23:47:25 UTC 2021 up 137 days, 18:16, 0 users, load averages: 2.76, 2.32, 2.14

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.