mersenneforum.org Prime95 Not using 100%
 Register FAQ Search Today's Posts Mark Forums Read

 2017-11-30, 23:48 #1 Thratrun   Nov 2017 5 Posts Prime95 Not using 100% Hi, I'm using prime95 with a i7 6.7k 3.4ghz, with 4 workers (1 core each), and my cpu usage for prime95 is 56% most of the time, with 60-65% total CPU usage. Each core (including HT ones) is at 50% more or less.
 2017-12-01, 03:21 #2 VBCurtis     "Curtis" Feb 2005 Riverside, CA 117118 Posts That would be because hyperthread cores aren't real cores, but Windows doesn't know the difference. 8 * 50% = 4 * 100% = all 4 cores fully used.
2017-12-01, 09:13   #3
Thratrun

Nov 2017

5 Posts

Quote:
 Originally Posted by VBCurtis That would be because hyperthread cores aren't real cores, but Windows doesn't know the difference. 8 * 50% = 4 * 100% = all 4 cores fully used.
Oh so everything is fine then? It is working at max?

2017-12-01, 12:25   #4

"Kieren"
Jul 2011
In My Own Galaxy!

2·3·1,693 Posts

You are running fine. If you turned off hyperthreading usage would be 100%. I keep HT on, but set affinity to run on one of each adjacent pair of cores. This assigns all physical cores.
EDIT:
Quote:
 A 6700k should be running at 4GHz by default
Good point. I had not even noticed that detail. I have a 6700K which does quite well at 4.3GHz.

Last fiddled with by kladner on 2017-12-01 at 12:33

 2017-12-01, 12:26 #5 henryzz Just call me Henry     "David" Sep 2007 Cambridge (GMT/BST) 10111001100012 Posts A 6700k should be running at 4GHz by default
 2017-12-01, 12:29 #6 kladner     "Kieren" Jul 2011 In My Own Galaxy! 2·3·1,693 Posts Oops. Should have edited my previous post. Last fiddled with by kladner on 2017-12-01 at 12:30
2017-12-01, 12:37   #7
Thratrun

Nov 2017

1012 Posts

Quote:
 Originally Posted by kladner You are running fine. If you turned off hyperthreading usage would be 100%. I keep HT on, but set affinity to run on one of each adjacent pair of cores. This assigns all physical cores. EDIT: Good point. I had not even noticed that detail. I have a 6700K which does quite well at 4.3GHz.
How do I set affinity? In each worker at the beginning it says "setting affinity worker on cpu core #1" (the #1 is the number of the worker)

Oh, mine is a 6700 not a 6700k, I said it wrong

EDIT: I didnt have 100% because i didnt have HT for LL, P-1, ECM (it said it wasn't recommended) but i activated it and now it shows 100%

Last fiddled with by Thratrun on 2017-12-01 at 13:11

 2017-12-01, 14:46 #8 Thratrun   Nov 2017 5 Posts However, after activating HT in prime95, the ms/iter for 3 of the workers are higher and the other stays more or less the same, so it looks like it works better without HT
2017-12-01, 18:36   #9
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

11100001101012 Posts

Quote:
 Originally Posted by Thratrun However, after activating HT in prime95, the ms/iter for 3 of the workers are higher and the other stays more or less the same, so it looks like it works better without HT
This is true. Prime95 is very rare software that is written in hand-tuned x86 assembly -- the very, very large majority of software is not, and the compiled-to-assembly software generally isn't optimized enough to make full use of the hardware, which is the purpose of hyperthreading -- a second process can make use of silicon on one core that a first process simply can't use. Prime95 is the exception to the rule: its hand-tuned assembly is designed to use every bit of silicon to its maximum possible extent, so hyperthreading offers no additional value.

Even other software in use on other parts of this forum -- software with inline assembly included in the most critical computational loops , but still mostly written in C -- see a ~30% throughput gain with hyperthreading. Prime95 is very much different than nearly any other software in the world in this respect.

2017-12-02, 03:10   #10

"Kieren"
Jul 2011
In My Own Galaxy!

2×3×1,693 Posts

Quote:
 Originally Posted by Thratrun How do I set affinity? In each worker at the beginning it says "setting affinity worker on cpu core #1" (the #1 is the number of the worker) Oh, mine is a 6700 not a 6700k, I said it wrong EDIT: I didnt have 100% because i didnt have HT for LL, P-1, ECM (it said it wasn't recommended) but i activated it and now it shows 100%
In local.txt:
Code:
[Worker #1]
Affinity=1,3,5,7
# Affinity=0,2,4,6
The second "Affinity" line is a commented example of another set of 'cores' that would use only physical cores.
Note that I run a single worker with 4 cores. If you have more workers, add sections as appropriate: [Worker #2] etc. Also that, in Windows at least, core numbers start with 0.

2017-12-02, 07:16   #11
GP2

Sep 2003

5×11×47 Posts

Quote:
 Originally Posted by Dubslow This is true. Prime95 is very rare software that is written in hand-tuned x86 assembly -- the very, very large majority of software is not, and the compiled-to-assembly software generally isn't optimized enough to make full use of the hardware, which is the purpose of hyperthreading -- a second process can make use of silicon on one core that a first process simply can't use. Prime95 is the exception to the rule: its hand-tuned assembly is designed to use every bit of silicon to its maximum possible extent, so hyperthreading offers no additional value. Even other software in use on other parts of this forum -- software with inline assembly included in the most critical computational loops , but still mostly written in C -- see a ~30% throughput gain with hyperthreading. Prime95 is very much different than nearly any other software in the world in this respect.
Except Prime95 hasn't (yet) been tuned for Skylake, and therefore if you use Skylake you should try turning on hyperthreading (by adding HyperthreadLL=1 to local.txt) and doing benchmarks with and without this setting. For me it did make a difference.

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

Sun Nov 28 17:47:06 UTC 2021 up 128 days, 12:16, 0 users, load averages: 1.44, 1.34, 1.24