mersenneforum.org  

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

Reply
 
Thread Tools
Old 2016-01-31, 13:42   #1
tha
 
tha's Avatar
 
Dec 2002

32E16 Posts
Default using multiple threads on an LL assignment

I have a Skylake i7, so four real cores and eight logical cores for hyperthreading.

If I set number of worker threads to 4 the throughput is four LL tests, each taking 14.8 milliseconds/iteration.

If I set number of worker threads to 2 and the number of CPUs to use in LL test (multithreading) to 2 the throughput is two LL tests, each taking 7.7 milliseconds/iteration.

I have set worker 1 to use core 1 out of 1..8 and worker 2 to use core 3 out of 1..8, but Mprime then seams to override this and assigns the first worker to logical CPU#1 to be helped by logical CPU#5 and assigns the second worker to logical CPU#2 and helped by logical CPU#6

Next I have set the number of workers set to 2 and the number of logical cores per worker to be used to 4. All using smart assignment. Now the timings are down to 4.6 milliseconds/iteration.

(On a side note: why does part of the program number the cores form 0..7 and other parts 1..8)

Last fiddled with by tha on 2016-01-31 at 14:01
tha is offline   Reply With Quote
Old 2016-01-31, 19:36   #2
tha
 
tha's Avatar
 
Dec 2002

14568 Posts
Default

Quote:
Originally Posted by tha View Post
Next I have set the number of workers set to 2 and the number of logical cores per worker to be used to 4. All using smart assignment. Now the timings are down to 4.6 milliseconds/iteration.
And when setting all other 7 threads to help the first one the timings for the same exponent (2240K FFT) is down to 2.3 millseconds. It really speeds up things in this setting. I guess because of the cache memory having more hits. All cores are now +/- 96% busy.
tha is offline   Reply With Quote
Old 2016-01-31, 19:48   #3
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

35×13 Posts
Default

You should disable hyperthreading in the BIOS if possible. There is no value in hyperthreading for Prime95, it is mostly for "normal" lightweight stuff like office programs and browsing that can easily run 2 threads on 1 core.

If you run a benchmark with these 2 lines in prime.txt:
BenchMultipleWorkers=1
BenchMultithreads=1

It will test like 4 workers 1 core on each, 2 workers 2 cores on each and 1 worker with 4 cores and give you a total iteration/sec for each one, so you can see what gives the largest throughput.

Last fiddled with by ATH on 2016-01-31 at 19:53
ATH is offline   Reply With Quote
Old 2016-02-01, 05:20   #4
Madpoo
Serpentine Vermin Jar
 
Madpoo's Avatar
 
Jul 2014

7·11·43 Posts
Default

Quote:
Originally Posted by ATH View Post
You should disable hyperthreading in the BIOS if possible. There is no value in hyperthreading for Prime95, it is mostly for "normal" lightweight stuff like office programs and browsing that can easily run 2 threads on 1 core.

If you run a benchmark with these 2 lines in prime.txt:
BenchMultipleWorkers=1
BenchMultithreads=1

It will test like 4 workers 1 core on each, 2 workers 2 cores on each and 1 worker with 4 cores and give you a total iteration/sec for each one, so you can see what gives the largest throughput.
And also this to disable even bothering throwing HT cores into the mix:
BenchHyperthreads=0
Madpoo is offline   Reply With Quote
Old 2016-02-02, 13:49   #5
rudi_m
 
rudi_m's Avatar
 
Jul 2005

2·7·13 Posts
Default

FYI I've noticed that I get the best throughput compromise when using 3 threads for LL plus 1 thread for factoring. The LL threads have more bad influence against each other than factoring threads.

BTW I've noticed that the CPU temperature may differ dependently on what kind of work runs on which specific CPU core. For example I have such a worktodo.txt, which gives me the best CPU temperature.

Code:
[Worker #1]
Factor=...

[Worker #2]
DoubleCheck=...

[Worker #3]
Factor=...

[Worker #4]
DoubleCheck=...
Any other permutation of the jobs gives me much higher temperature and causes the CPU to throttle (cooling is bad on this machine).
rudi_m is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple threads per assignment? f0rteOC Hardware 3 2016-02-29 06:08
Multiple Core for 1 assignment saeres Information & Answers 10 2016-02-04 01:52
Workers, Threads, Helper Threads, Cores, Affinity. lorgix Information & Answers 12 2011-01-13 22:31
pearl question: multiple threads of ECM Andi47 Programming 2 2010-09-25 06:34
Multiple threads efficiency... Xyzzy Linux 1 2004-12-31 21:03

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


Sat Jul 17 06:56:18 UTC 2021 up 50 days, 4:43, 1 user, load averages: 1.82, 2.00, 1.77

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.