PrimeGrid
Please visit donation page to help the project cover running costs for this month

Toggle Menu

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : Aggie The Pew message board : Efficiency of multi-threading

Author Message
NickProject donor
Send message
Joined: 11 Jul 11
Posts: 289
ID: 105020
Credit: 332,694,246
RAC: 1,791,590
321 LLR Turquoise: Earned 5,000,000 credits (5,082,860)Cullen LLR Turquoise: Earned 5,000,000 credits (5,830,183)ESP LLR Turquoise: Earned 5,000,000 credits (5,347,692)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,397,042)PPS LLR Turquoise: Earned 5,000,000 credits (6,922,079)PSP LLR Turquoise: Earned 5,000,000 credits (8,106,556)SoB LLR Turquoise: Earned 5,000,000 credits (5,323,328)SR5 LLR Ruby: Earned 2,000,000 credits (2,033,897)SGS LLR Ruby: Earned 2,000,000 credits (2,015,663)TRP LLR Ruby: Earned 2,000,000 credits (2,013,482)Woodall LLR Ruby: Earned 2,000,000 credits (2,013,659)321 Sieve Turquoise: Earned 5,000,000 credits (5,007,156)Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (744,531)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,007,004)PPS Sieve Double Bronze: Earned 100,000,000 credits (102,613,458)TRP Sieve (suspended) Bronze: Earned 10,000 credits (21,181)AP 26/27 Sapphire: Earned 20,000,000 credits (20,627,386)GFN Double Bronze: Earned 100,000,000 credits (148,587,091)
Message 132978 - Posted: 19 Sep 2019 | 0:38:09 UTC

I am wondering if the following formula is a reasonable way to access efficiency of multi-threading:

CPU time / (run time * number of cores used for work unit)

For SR5, using 7 cores, I get 89-90%
For PPS-DIV, using 5 cores, I get 84-85%
The necessity to use multi-threading because of limitations of cache size is a different issue.

Profile Crun-chiProject donor
Volunteer tester
Avatar
Send message
Joined: 25 Nov 09
Posts: 2803
ID: 50683
Credit: 52,738,925
RAC: 3,290
Eliminated 1 conjecture "k"Found 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de Primes321 LLR Silver: Earned 100,000 credits (229,492)Cullen LLR Silver: Earned 100,000 credits (110,733)PPS LLR Ruby: Earned 2,000,000 credits (3,073,989)PSP LLR Silver: Earned 100,000 credits (104,385)SoB LLR Silver: Earned 100,000 credits (106,117)SR5 LLR Silver: Earned 100,000 credits (139,802)SGS LLR Amethyst: Earned 1,000,000 credits (1,073,792)TRP LLR Silver: Earned 100,000 credits (122,712)Woodall LLR Silver: Earned 100,000 credits (122,944)321 Sieve Silver: Earned 100,000 credits (104,900)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,599)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (515,556)PPS Sieve Jade: Earned 10,000,000 credits (11,363,809)TRP Sieve (suspended) Silver: Earned 100,000 credits (255,612)AP 26/27 Ruby: Earned 2,000,000 credits (2,579,917)GFN Sapphire: Earned 20,000,000 credits (23,312,456)PSA Turquoise: Earned 5,000,000 credits (7,522,050)
Message 132983 - Posted: 19 Sep 2019 | 5:41:41 UTC - in response to Message 132978.

If 256K is fitt in 1.5 MB L3 cache of CPU then formula is next.
candidate length/1.5MB L3 cache = optimum

I prefer 240K / 1.5 MB L3 cache.
____________
314187728^131072+1 GENERALIZED FERMAT :)
93*10^1029523-1 REPDIGIT PRIME
31*332^367560+1 CRUS PRIME
Proud member of team Aggie The Pew. Go Aggie!

mackerelProject donor
Volunteer tester
Avatar
Send message
Joined: 2 Oct 08
Posts: 2252
ID: 29980
Credit: 356,122,208
RAC: 593,692
Discovered 2 mega primesEliminated 1 conjecture "k"Found 3 primes in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de PrimesFound 5 primes in the 2019 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (8,774,878)Cullen LLR Turquoise: Earned 5,000,000 credits (5,149,818)ESP LLR Turquoise: Earned 5,000,000 credits (6,454,573)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,122,074)PPS LLR Emerald: Earned 50,000,000 credits (58,497,577)PSP LLR Jade: Earned 10,000,000 credits (15,030,570)SoB LLR Jade: Earned 10,000,000 credits (17,319,914)SR5 LLR Jade: Earned 10,000,000 credits (18,479,395)SGS LLR Turquoise: Earned 5,000,000 credits (6,702,766)TPS LLR (retired) Bronze: Earned 10,000 credits (34,130)TRP LLR Jade: Earned 10,000,000 credits (15,154,737)Woodall LLR Turquoise: Earned 5,000,000 credits (5,715,464)321 Sieve Turquoise: Earned 5,000,000 credits (8,483,125)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,383,853)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,626,419)PPS Sieve Emerald: Earned 50,000,000 credits (74,140,875)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Ruby: Earned 2,000,000 credits (2,293,882)TRP Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,012,757)AP 26/27 Sapphire: Earned 20,000,000 credits (21,918,894)GFN Emerald: Earned 50,000,000 credits (52,886,809)PSA Ruby: Earned 2,000,000 credits (2,939,755)
Message 132990 - Posted: 19 Sep 2019 | 12:00:22 UTC - in response to Message 132978.

I am wondering if the following formula is a reasonable way to access efficiency of multi-threading:

CPU time / (run time * number of cores used for work unit)

I'm not sure that formula makes sense, but it will come down in part to the exact definition of what they represent.

The way I would prefer is to run a single unit single thread, then compare that time to multi_thread_time*threads_used.

NickProject donor
Send message
Joined: 11 Jul 11
Posts: 289
ID: 105020
Credit: 332,694,246
RAC: 1,791,590
321 LLR Turquoise: Earned 5,000,000 credits (5,082,860)Cullen LLR Turquoise: Earned 5,000,000 credits (5,830,183)ESP LLR Turquoise: Earned 5,000,000 credits (5,347,692)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,397,042)PPS LLR Turquoise: Earned 5,000,000 credits (6,922,079)PSP LLR Turquoise: Earned 5,000,000 credits (8,106,556)SoB LLR Turquoise: Earned 5,000,000 credits (5,323,328)SR5 LLR Ruby: Earned 2,000,000 credits (2,033,897)SGS LLR Ruby: Earned 2,000,000 credits (2,015,663)TRP LLR Ruby: Earned 2,000,000 credits (2,013,482)Woodall LLR Ruby: Earned 2,000,000 credits (2,013,659)321 Sieve Turquoise: Earned 5,000,000 credits (5,007,156)Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (744,531)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,007,004)PPS Sieve Double Bronze: Earned 100,000,000 credits (102,613,458)TRP Sieve (suspended) Bronze: Earned 10,000 credits (21,181)AP 26/27 Sapphire: Earned 20,000,000 credits (20,627,386)GFN Double Bronze: Earned 100,000,000 credits (148,587,091)
Message 133008 - Posted: 19 Sep 2019 | 22:57:01 UTC - in response to Message 132990.

Mackerel you are right - thanks for your help. I changed my settings for PPS-DIV from 5 cores to 2 and at first glance the work units are going to take just over 1.5 times as long. I was totally wasting resources.

Post to thread

Message boards : Aggie The Pew message board : Efficiency of multi-threading

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2019 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 0.79, 1.07, 1.14
Generated 16 Dec 2019 | 13:42:50 UTC