mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2017-11-30, 23:48   #1
Thratrun
 
Nov 2017

5 Posts
Default 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.
Thratrun is offline   Reply With Quote
Old 2017-12-01, 03:21   #2
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

108D16 Posts
Default

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.
VBCurtis is offline   Reply With Quote
Old 2017-12-01, 09:13   #3
Thratrun
 
Nov 2017

58 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
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?
Thratrun is offline   Reply With Quote
Old 2017-12-01, 12:25   #4
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2×7×709 Posts
Default

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
kladner is offline   Reply With Quote
Old 2017-12-01, 12:26   #5
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT)

2·3·13·73 Posts
Default

A 6700k should be running at 4GHz by default
henryzz is offline   Reply With Quote
Old 2017-12-01, 12:29   #6
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2·7·709 Posts
Default

Oops. Should have edited my previous post.

Last fiddled with by kladner on 2017-12-01 at 12:30
kladner is offline   Reply With Quote
Old 2017-12-01, 12:37   #7
Thratrun
 
Nov 2017

5 Posts
Default

Quote:
Originally Posted by kladner View Post
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
Thratrun is offline   Reply With Quote
Old 2017-12-01, 14:46   #8
Thratrun
 
Nov 2017

510 Posts
Default

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
Thratrun is offline   Reply With Quote
Old 2017-12-01, 18:36   #9
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by Thratrun View Post
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.
Dubslow is offline   Reply With Quote
Old 2017-12-02, 03:10   #10
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

992610 Posts
Default

Quote:
Originally Posted by Thratrun View Post
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.
kladner is offline   Reply With Quote
Old 2017-12-02, 07:16   #11
GP2
 
GP2's Avatar
 
Sep 2003

2,579 Posts
Default

Quote:
Originally Posted by Dubslow View Post
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.
GP2 is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 06:34.

Sat Aug 8 06:34:58 UTC 2020 up 22 days, 2:21, 1 user, load averages: 1.59, 1.84, 1.90

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.