mersenneforum.org  

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

Reply
 
Thread Tools
Old 2012-07-07, 05:50   #1
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2·5·239 Posts
Default idea: automatically use hyperthreading when it helps

One question that often gets asked is whether Prime95 can take advantage of hyperthreading. The answer is that it generally cannot. In fact, assigning two threads to one worker often slows it down as the threads will get in each other's way. But in some cases, hyperthreading does bump up the speed a little. For example, using both threads on my old Pentium 4 desktop makes each iteration about 3% faster.

This gave me an idea: Prime95 should use both threads in a core when there is a speed advantage. This could be done by running two benchmarks when a hyperthreaded processor is detected: one for a single thread and the other for both threads. If the latter case is noticeably faster, then both threads are enabled.
ixfd64 is offline   Reply With Quote
Old 2012-07-08, 07:21   #2
clarke
 
Feb 2009

22·7 Posts
Default

I quite agree with the idea, at least notify the user about gainings or losses depending on HT on/off when computation starts. Probably, that notification could be generated by the server based on benchmark database. But silently turning on using HT cores isn't good for those who decided to not do it. Perhaps, a configurable option may help.
clarke is offline   Reply With Quote
Old 2012-07-08, 19:30   #3
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 clarke View Post
Perhaps, a configurable option may help.
That is already the case, which is why it isn't automatic. Take a look through undoc.txt. Ctrl+F on "AffinityScramble", "NumCPUs", and "NumPhysicalCPUs".
Dubslow is offline   Reply With Quote
Old 2012-08-07, 00:27   #4
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

2×5×239 Posts
Default

It seems that hyperthreading may actually be far from useless. Some users have reported a noticeable increase in overall throughput by running two TF threads (or even one LL plus a TF thread) on a single physical core. In this case, it would be cool if Prime95 had the ability to automatically assign TF assignments to all virtual cores.

Most of the posts refer to P4's, though, so I don't know if newer processors would benefit in the same way.
ixfd64 is offline   Reply With Quote
Old 2012-08-07, 18:47   #5
ixfd64
Bemusing Prompter
 
ixfd64's Avatar
 
"Danny"
Dec 2002
California

1001010101102 Posts
Default

I should mention that if Prime95 does include this feature in the future, then it may be a good idea to make hyperthreaded cores TF to three or four bits above normal levels as they will still be relatively fast compared to older hardware.
ixfd64 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically stopping P-1 to benchmark? Why? Uncwilly Software 2 2018-02-23 05:24
Windows 10 in Ubuntu, good idea, bad idea, or...? jasong jasong 8 2017-04-07 00:23
Automatically updating factordb chris2be8 FactorDB 9 2012-05-03 10:20
Automatically start Prime95 on the mac koekie Software 2 2012-02-06 15:39
Automatically starting mprime. xode Software 8 2004-10-20 14:47

All times are UTC. The time now is 22:39.


Fri Jul 16 22:39:23 UTC 2021 up 49 days, 20:26, 1 user, load averages: 1.54, 1.81, 2.15

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.