mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2013-08-26, 05:49   #23
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

7·1,373 Posts
Default

Use Backtrack Linux!
LaurV is offline   Reply With Quote
Old 2013-08-26, 13:29   #24
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×53×71 Posts
Default

Quote:
Originally Posted by TheMawn View Post
If I had to guess, your program might be assigning four assignments to two physical cores.

...

If you just left it off, I'm sure it wouldn't be the end of the world.
I tried it with prime95's default of assigning a worker to two logical cores. I also tried it with the "run on any CPU" option. Both methods had times that varied between 0.39 and 0.80.

I don't mind turning off hyperthreading. I would like to know what is going on in order to either improve mprime or warn future users with the same problem.
Prime95 is offline   Reply With Quote
Old 2013-08-26, 16:31   #25
NBtarheel_33
 
NBtarheel_33's Avatar
 
"Nathan"
Jul 2008
Maryland, USA

5×223 Posts
Default

Quote:
Originally Posted by Prime95 View Post
I tried it with prime95's default of assigning a worker to two logical cores. I also tried it with the "run on any CPU" option. Both methods had times that varied between 0.39 and 0.80.

I don't mind turning off hyperthreading. I would like to know what is going on in order to either improve mprime or warn future users with the same problem.
I observed similar behavior on a dual 8-core Xeon system earlier this summer (search for the thread "playing with big iron"). I never could figure out if hyperthreading was enabled or not, but I assumed it was (and was told that it was), but when I asked for 32 threads, 16 physical and 16 logical, instead of pairing a physical with a logical, it would make the first eight pairs out of the 16 *physical* threads and then make the other eight pairs from the 16 *logical* threads! As we might expect, this degraded performance and increased iteration times by roughly a factor of two overall.

Similar things would happen if I assigned 4x4 or even 2x8 thread configurations with helper threads. The only way things would behave right is if I asked for 16 worker threads, and only made use of them - no helper threads, and all physical threads.

Interestingly, top would indicate a CPU percentage of almost 3100 (processors 0-31 maxed out) whenever Prime95 was running. So the system must have been hyperthreaded, but there is a problem where the logical vs. physical threads are not being allocated as expected. In Windows, on the other hand, there seems to be no problem with this. But in Linux, no matter what, the physical cores all get assigned in a straight line (worker or helper), followed by the logical cores. I noticed this even after adjusting the AffinityScramble.

Of course, this makes me wonder - does AffinityScramble work as expected in mprime? That might just be the problem.
NBtarheel_33 is offline   Reply With Quote
Old 2013-08-26, 23:47   #26
TheMawn
 
TheMawn's Avatar
 
May 2013
East. Always East.

11×157 Posts
Default

Quote:
Originally Posted by NBtarheel_33 View Post
... it would make the first eight pairs out of the 16 *physical* threads and then make the other eight pairs from the 16 *logical* threads! As we might expect, this degraded performance and increased iteration times by roughly a factor of two overall.

Of course, this makes me wonder - does AffinityScramble work as expected in mprime? That might just be the problem.
Kind of what I was going for. Not sure if that was fully understood.
TheMawn is offline   Reply With Quote
Old 2013-08-27, 06:25   #27
NBtarheel_33
 
NBtarheel_33's Avatar
 
"Nathan"
Jul 2008
Maryland, USA

5·223 Posts
Default

Here is the thread to which I was alluding. I mention the problem about ten posts in.
NBtarheel_33 is offline   Reply With Quote
Old 2013-09-04, 07:28   #28
sanaris
 
"Yury Vorobyov"
Jul 2013
Chelyabinsk

19 Posts
Default

Quote:
Originally Posted by Prime95 View Post
...Update: It looks like turning hyperthreading off "solves" the problem. Does anyone else see this kind of weirdness in Linux on a hyperthreaded machine.
Linux supports CPU affinity out of the box.
For 4-core HT machine where 3456 is main process (via "ps -C mprime"):
taskset -a -c 0,2,4,6 -p 3456

In my experience, it is coming from scheduler which tries to minimize "distance" between processes. Happens in Windows too.

Last fiddled with by sanaris on 2013-09-04 at 07:29
sanaris is offline   Reply With Quote
Old 2013-09-06, 00:24   #29
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×53×71 Posts
Default

Quote:
Originally Posted by TheMawn View Post
If I had to guess, your program might be assigning four assignments to two physical cores.
OK, I looked into this for a few hours as I'm about to swap out the i7-860 for a non-hyperthreaded Haswell.

I'm still stumped. Mprime successfully detects that locical CPUs 1,5 & 2,6, etc. form the 4 physical CPUs. It then tells me worker 1 affinity is set to logical CPUs 1,5 and worker 2 affinity is set to 2,6, etc.

Timings start out at 0.38, but soon degrades to 0.80. Htop consistently shows that my affinity instructions are being honored. I always see four logical CPUs pegged at 100% and four logical CPUs at close to 0%. Sensors displays reasonable temps so I shouldn't be throttling.

My only explanation is that maybe Ubuntu 12.04 has a new power saving "feature" that is changing the logical/physical mapping on-the-fly. I can't think of anything else. This CPU ran mprime for a year on Ubuntu 10.04 without a hitch.

Anyone have any ideas for me to look into before the CPU upgrade? If not, I'm writing this bug off as unfixable / unexplained.

Last fiddled with by Prime95 on 2013-09-06 at 00:24
Prime95 is offline   Reply With Quote
Old 2013-09-06, 17:46   #30
TheMawn
 
TheMawn's Avatar
 
May 2013
East. Always East.

32778 Posts
Default

Prime95 detected 1,2 3,4 5,6 and 7,8 as being the pairs of cores for me on my hyperthreaded machine. Are you sure that 1,5 2,6 etc are correct?
TheMawn is offline   Reply With Quote
Old 2013-09-06, 19:15   #31
kracker
 
kracker's Avatar
 
"Mr. Meeseeks"
Jan 2012
California, USA

23×271 Posts
Default

Quote:
Originally Posted by TheMawn View Post
Prime95 detected 1,2 3,4 5,6 and 7,8 as being the pairs of cores for me on my hyperthreaded machine. Are you sure that 1,5 2,6 etc are correct?
hyperthreading detection never did work all the time for me here on my SB laptop.

Anyways back on subject I always thought it was 0,1 2,3 4,5 6,7... maybe not?
kracker is offline   Reply With Quote
Old 2013-09-07, 00:04   #32
TheMawn
 
TheMawn's Avatar
 
May 2013
East. Always East.

11×157 Posts
Default

My laptop is hyperthreaded and for me it's definitely 1-2 and 3-4. Assumption only valid for Microsoft Windows, however.

If you're still having the problem with hyperthreading off, then you've got some other issue. Can you monitor your memory frequency? Maybe it's being throttled? I've never heard of that, though.
TheMawn is offline   Reply With Quote
Old 2013-09-07, 00:11   #33
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

37·263 Posts
Default

Quote:
Originally Posted by TheMawn View Post
If you're still having the problem with hyperthreading off, then you've got some other issue. Can you monitor your memory frequency? Maybe it's being throttled? I've never heard of that, though.
Many of us claim to be rather bright here. Right?

Some rather amazing software has been created and shared here. Right?

Why don't we write some software which tests the hardware and OS(s).

Seems rather simple to do....
chalsall is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
GHz-days houding Information & Answers 9 2015-01-28 22:45
Two More Days R.D. Silverman Math 8 2014-08-14 05:01
GHz-Days nomad Information & Answers 19 2011-04-11 03:57
130 GHz-days for a 41M LL?!? NBtarheel_33 PrimeNet 16 2010-12-11 02:41
GHz Days still at Zero Unregistered Information & Answers 3 2009-02-02 01:15

All times are UTC. The time now is 07:53.


Sat Jul 17 07:53:41 UTC 2021 up 50 days, 5:40, 1 user, load averages: 1.17, 1.36, 1.33

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.