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 : Problems and Help : High CPU usage for GPU apps

Author Message
arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155371 - Posted: 10 May 2022 | 16:23:41 UTC

Hi! I'm using Ubuntu 20.04 with AMD Ryzen 7 3700X 8-Core Processor + ATI Radeon RX 5500, with recently reinstalled amdgpu drivers.

I'm running genefer 15, 16 and 17 using only GPU, but if I issue htop in a terminal I can see that CPU shows 100% usage for geneferocl application. AFAIK this means that a full CPU core is being used. This sounds strange to me, as BOINC Manager says that Genefer runs with "0.0754 CPUs + 1 AMD/ATI GPU".

I don't remember seeing such a high CPU usage for GPU apps before. What can be happening?

Thanks a lot in advance.

ReggieProject donor
Volunteer moderator
Project administrator
Volunteer tester
Project scientist
Send message
Joined: 10 May 14
Posts: 217
ID: 311759
Credit: 200,665,243
RAC: 37
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Ruby: Earned 2,000,000 credits (2,046,192)Cullen LLR Ruby: Earned 2,000,000 credits (2,026,465)ESP LLR Ruby: Earned 2,000,000 credits (2,053,710)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,221,569)PPS LLR Jade: Earned 10,000,000 credits (10,879,274)PSP LLR Amethyst: Earned 1,000,000 credits (1,587,883)SoB LLR Ruby: Earned 2,000,000 credits (2,305,993)SR5 LLR Ruby: Earned 2,000,000 credits (2,023,467)SGS LLR Ruby: Earned 2,000,000 credits (2,682,790)TRP LLR Amethyst: Earned 1,000,000 credits (1,121,859)Woodall LLR Amethyst: Earned 1,000,000 credits (1,686,633)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,000,211)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (22,440,747)AP 26/27 Sapphire: Earned 20,000,000 credits (20,526,311)GFN Emerald: Earned 50,000,000 credits (54,814,831)WW Emerald: Earned 50,000,000 credits (50,172,000)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 155382 - Posted: 10 May 2022 | 22:12:50 UTC - in response to Message 155371.
Last modified: 10 May 2022 | 22:13:03 UTC

I've had similar problems in the past on Linux. This is the solution I used.

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155387 - Posted: 11 May 2022 | 6:06:17 UTC - in response to Message 155382.

Thanks Reggie.

I tested your suggestion and the YIELD_SLEEP_TIME seems not to affect anything. I tried 5, 50, 500, 5000 and 50000. GPU still uses 100% of a core.

Currently, for GPU I'm only in Genefer 15, 16 and 17-MEGA. I've just read in that thread that the WU's for these projects are "too small"...

What I can't understand is why this didn't happen to me with older drivers (maybe an option is reverting to them? I can't remember the version...) What change could have been made to the drivers to cause this?

Thanks again!

Profile mikey
Avatar
Send message
Joined: 17 Mar 09
Posts: 1398
ID: 37043
Credit: 592,082,665
RAC: 39,536
Discovered 1 mega prime321 LLR Ruby: Earned 2,000,000 credits (2,066,244)Cullen LLR Ruby: Earned 2,000,000 credits (2,074,615)ESP LLR Ruby: Earned 2,000,000 credits (2,243,517)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,142,353)PPS LLR Turquoise: Earned 5,000,000 credits (7,293,199)PSP LLR Ruby: Earned 2,000,000 credits (2,232,103)SoB LLR Ruby: Earned 2,000,000 credits (2,934,612)SR5 LLR Ruby: Earned 2,000,000 credits (2,071,823)SGS LLR Turquoise: Earned 5,000,000 credits (6,780,752)TRP LLR Ruby: Earned 2,000,000 credits (2,672,432)Woodall LLR Ruby: Earned 2,000,000 credits (2,014,811)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (23,770,672)Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (944,431)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,813,253)PPS Sieve Double Silver: Earned 200,000,000 credits (379,578,052)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Ruby: Earned 2,000,000 credits (2,446,797)AP 26/27 Sapphire: Earned 20,000,000 credits (33,880,340)GFN Emerald: Earned 50,000,000 credits (67,579,656)WW Turquoise: Earned 5,000,000 credits (8,092,000)PSA Sapphire: Earned 20,000,000 credits (20,457,430)
Message 155389 - Posted: 11 May 2022 | 10:44:25 UTC - in response to Message 155387.

Thanks Reggie.

I tested your suggestion and the YIELD_SLEEP_TIME seems not to affect anything. I tried 5, 50, 500, 5000 and 50000. GPU still uses 100% of a core.

Currently, for GPU I'm only in Genefer 15, 16 and 17-MEGA. I've just read in that thread that the WU's for these projects are "too small"...

What I can't understand is why this didn't happen to me with older drivers (maybe an option is reverting to them? I can't remember the version...) What change could have been made to the drivers to cause this?

Thanks again!


Could this be the reason:
1345077814 795441145 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPSE (LLR) v9.01 (mt)
1345077813 795441144 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPSE (LLR) v9.01 (mt)
1345077812 795441143 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPSE (LLR) v9.01 (mt)
1345077811 795441142 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPSE (LLR) v9.01 (mt)
1345077470 795440957 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077469 795440956 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077468 795440955 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077467 795440954 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077396 795440885 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS (LLR) v9.01 (mt)
1345077162 795440754 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077161 795440753 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS-Mega (LLR) v9.01 (mt)
1345077057 795440657 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS (LLR) v9.01 (mt)
1345077056 795440656 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS (LLR) v9.01 (mt)
1345077052 795440652 11 May 2022 | 9:53:36 UTC 15 May 2022 | 10:53:36 UTC In progress [Main task] --- --- --- PPS (LLR) v9.01 (mt)

It seems you are also running alot of PPS LLR tasks multi-threaded.

stream
Volunteer moderator
Project administrator
Volunteer developer
Volunteer tester
Send message
Joined: 1 Mar 14
Posts: 989
ID: 301928
Credit: 543,186,393
RAC: 13
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,011,570)Cullen LLR Jade: Earned 10,000,000 credits (10,009,374)ESP LLR Jade: Earned 10,000,000 credits (10,009,221)Generalized Cullen/Woodall LLR Jade: Earned 10,000,000 credits (10,012,217)PPS LLR Jade: Earned 10,000,000 credits (16,320,747)PSP LLR Jade: Earned 10,000,000 credits (10,044,081)SoB LLR Jade: Earned 10,000,000 credits (10,064,750)SR5 LLR Jade: Earned 10,000,000 credits (10,002,051)SGS LLR Jade: Earned 10,000,000 credits (10,001,295)TRP LLR Jade: Earned 10,000,000 credits (10,002,411)Woodall LLR Jade: Earned 10,000,000 credits (10,013,921)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,004,228)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,047,667)PPS Sieve Sapphire: Earned 20,000,000 credits (20,866,490)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,043,271)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,015,177)AP 26/27 Sapphire: Earned 20,000,000 credits (20,045,194)GFN Emerald: Earned 50,000,000 credits (55,355,287)WW Emerald: Earned 50,000,000 credits (50,016,000)PSA Double Silver: Earned 200,000,000 credits (200,301,443)
Message 155392 - Posted: 11 May 2022 | 14:28:56 UTC - in response to Message 155387.


I tested your suggestion and the YIELD_SLEEP_TIME seems not to affect anything. I tried 5, 50, 500, 5000 and 50000. GPU still uses 100% of a core.

That solution was made for NVidia. It fixes behavior specific to NVidia drivers. AMD drivers may have another reason of high CPU usage. It may or may not work, I don't know.

You can test genefer application manually, running
LD_PRELOAD=/somewhere/libsleep.so ./genefer_what_is_current_name

It has interactive menu for tests/benchmarks. Also you may use command line from one of real tests.
Be sure that following line is printed in the beginning, it means that library was loaded correctly:
libsleep: Sleep time: 1000usec

It's better to test GFN-17 and higher, lower GFNs may really require more CPU.

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155393 - Posted: 11 May 2022 | 15:36:36 UTC - in response to Message 155392.

It seems you are also running alot of PPS LLR tasks multi-threaded.

Well, this morning I realised that the recommendation is to run PPS LLR and PPSE LLR not multi-threaded, so I set to 1 the parameter "Max # of threads" in the preferences. So all these "In progress" tasks that you see will run in 1 core each; they are already running this way and indeed my CPU seems to be getting better use, the performance has increased.
Anyway, I think this doesn't affect the GPU tasks (does it?). I can try to run only GPU-based WUs for a while and look at the CPU usage.

It's better to test GFN-17 and higher, lower GFNs may really require more CPU.

Thanks for the suggestions, I'll try to run genefer manually. I'm looking for my first prime, so some months ago I began running short tasks like SGS, PPS, PPSE and GFN-15, GFN-16 and GFN-17-Mega and never saw this high CPU usage until I had to reinstall amdgpu drivers this week (due to Xorg crashes).
Maybe I will have to wait for new driver versions that solve this...

Thanks and regards.

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155394 - Posted: 11 May 2022 | 15:49:18 UTC - in response to Message 155392.
Last modified: 11 May 2022 | 16:06:45 UTC

Sorry for the double post...

I temporarily suspended boinc projects and the I did:

$ cd /var/lib/boinc-client/projects/www.primegrid.com $ LD_PRELOAD=/home/arakelov/libsleep/libsleep.so ./geneferocl_linux64_3.3.3-2 libsleep: Sleep time: 1000usec geneferocl 3.3.3-2 (Linux/OpenCL/64-bit)


So the "sleep time" line is there. So far so good. But then:

No options were specified, using interactive mode: 1. run Generalized Fermat Prime Search benchmarks 2. run specific benchmarks 3. run primality tests 4. run residue tests 5. compute approximate upper limits 6. test probable primality (fast) 7. test primality (slow) 8. compute Selfridge-Hurwitz residue (Fermat number) 1 No compatible OpenCL device found. Device List:


No GPU? Maybe I'm missing some command-line option?


Ok, going with sudo...

arakelov@arakelov-desktop:/var/lib/boinc-client/projects/www.primegrid.com$ sudo LD_PRELOAD=/home/arakelov/libsleep/libsleep.so ./geneferocl_linux64_3.3.3-2 -q 110607414^131072+1 libsleep: Sleep time: 1000usec geneferocl 3.3.3-2 (Linux/OpenCL/64-bit) Copyright 2001-2018, Yves Gallot Copyright 2009, Mark Rodenkirch, David Underbakke Copyright 2010-2012, Shoichiro Yamada, Ken Brazier Copyright 2011-2014, Michael Goetz, Ronald Schneider Copyright 2011-2018, Iain Bethune Genefer is free source code, under the MIT license. Command line: ./geneferocl_linux64_3.3.3-2 -q 110607414^131072+1 Normal priority change succeeded. Testing 110607414^131072+1... Using OCL2 transform Running on platform 'AMD Accelerated Parallel Processing', device 'gfx1012:xnack-', vendor 'Advanced Micro Devices, Inc.', version 'OpenCL 2.0 ' and driver '3406.0 (HSA1.1,LC)'. 11 computeUnits @ 1900MHz, memSize=8176MB, cacheSize=16kB, cacheLineSize=64B, localMemSize=64kB, maxWorkGroupSize=256. Resuming 110607414^131072+1 from a checkpoint (3157707 iterations left) Estimated time remaining for 110607414^131072+1 is 0:10:10 ^Csting 110607414^131072+1... 2284380 steps to go (0:07:34 remaining)


It runs smoothly but still using one core:

stream
Volunteer moderator
Project administrator
Volunteer developer
Volunteer tester
Send message
Joined: 1 Mar 14
Posts: 989
ID: 301928
Credit: 543,186,393
RAC: 13
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,011,570)Cullen LLR Jade: Earned 10,000,000 credits (10,009,374)ESP LLR Jade: Earned 10,000,000 credits (10,009,221)Generalized Cullen/Woodall LLR Jade: Earned 10,000,000 credits (10,012,217)PPS LLR Jade: Earned 10,000,000 credits (16,320,747)PSP LLR Jade: Earned 10,000,000 credits (10,044,081)SoB LLR Jade: Earned 10,000,000 credits (10,064,750)SR5 LLR Jade: Earned 10,000,000 credits (10,002,051)SGS LLR Jade: Earned 10,000,000 credits (10,001,295)TRP LLR Jade: Earned 10,000,000 credits (10,002,411)Woodall LLR Jade: Earned 10,000,000 credits (10,013,921)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,004,228)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,047,667)PPS Sieve Sapphire: Earned 20,000,000 credits (20,866,490)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,043,271)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,015,177)AP 26/27 Sapphire: Earned 20,000,000 credits (20,045,194)GFN Emerald: Earned 50,000,000 credits (55,355,287)WW Emerald: Earned 50,000,000 credits (50,016,000)PSA Double Silver: Earned 200,000,000 credits (200,301,443)
Message 155397 - Posted: 12 May 2022 | 7:31:02 UTC - in response to Message 155394.
Last modified: 12 May 2022 | 7:31:41 UTC

Ok, going with sudo...

Probably you need to add this user to "video" group. But sudo is also OK and faster.

It runs smoothly but still using one core:

Alas, nothing can be done here for now. I think this is a problem inside drivers, like in NVIDIA.

This problem first appeared in NVIDIA. Instead of blocking the execution of task until GPU completes operation (waiting an interrupt from GPU), they started to poll GPU status in infinite loop. It was a cheat for better benchmarks - many people are using tiny GPU kernels and OS overhead for task stop/resume became noticeable. But of course it caused 100% CPU usage. They tried to release some CPU time calling sched_yield() function inside loop, but they didn't understand difference between behavior of yield- and sleep-type functions, so their solution didn't work. But at least they tried. Probably somebody reverse-engineered their code and found a workaround. A libsleep.so hack intercepts calls to sched_yield() and replaces them with good old sleep.

Since libsleep is not working with AMD, then most probably drivers are just running infinite loop somewhere not even bothering to call sched_yield().

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155398 - Posted: 12 May 2022 | 14:32:05 UTC - in response to Message 155397.

Thanks stream, I'll patiently wait for driver updates. Anyway, I'm not sure if AMD engineers are aware of this 'bug'. (Should I report it?)
Would this behavior also happen in any other situation (game, mining app...) that intensively uses GPU?

stream
Volunteer moderator
Project administrator
Volunteer developer
Volunteer tester
Send message
Joined: 1 Mar 14
Posts: 989
ID: 301928
Credit: 543,186,393
RAC: 13
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,011,570)Cullen LLR Jade: Earned 10,000,000 credits (10,009,374)ESP LLR Jade: Earned 10,000,000 credits (10,009,221)Generalized Cullen/Woodall LLR Jade: Earned 10,000,000 credits (10,012,217)PPS LLR Jade: Earned 10,000,000 credits (16,320,747)PSP LLR Jade: Earned 10,000,000 credits (10,044,081)SoB LLR Jade: Earned 10,000,000 credits (10,064,750)SR5 LLR Jade: Earned 10,000,000 credits (10,002,051)SGS LLR Jade: Earned 10,000,000 credits (10,001,295)TRP LLR Jade: Earned 10,000,000 credits (10,002,411)Woodall LLR Jade: Earned 10,000,000 credits (10,013,921)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,004,228)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,047,667)PPS Sieve Sapphire: Earned 20,000,000 credits (20,866,490)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,043,271)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,015,177)AP 26/27 Sapphire: Earned 20,000,000 credits (20,045,194)GFN Emerald: Earned 50,000,000 credits (55,355,287)WW Emerald: Earned 50,000,000 credits (50,016,000)PSA Double Silver: Earned 200,000,000 credits (200,301,443)
Message 155399 - Posted: 12 May 2022 | 16:43:37 UTC - in response to Message 155398.

Thanks stream, I'll patiently wait for driver updates. Anyway, I'm not sure if AMD engineers are aware of this 'bug'. (Should I report it?)

It's up to you. Are there other AMD GPU users around? Is this problem exist with other versions of drivers?

Would this behavior also happen in any other situation (game, mining app...) that intensively uses GPU?

Games are using other APIs, not OpenCL. Mining should be affected. (Just be sure that this particular program is not mining on CPU as well).

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 1022
ID: 55391
Credit: 887,962,162
RAC: 139,697
Discovered 2 mega primesFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2022 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (6,055,323)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,433,680)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,443,837)PPS LLR Sapphire: Earned 20,000,000 credits (34,545,997)PSP LLR Turquoise: Earned 5,000,000 credits (6,587,988)SoB LLR Sapphire: Earned 20,000,000 credits (45,081,394)SR5 LLR Turquoise: Earned 5,000,000 credits (6,205,694)SGS LLR Ruby: Earned 2,000,000 credits (3,627,819)TRP LLR Turquoise: Earned 5,000,000 credits (7,078,152)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve (suspended) Emerald: Earned 50,000,000 credits (50,256,050)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,571,178)Generalized Cullen/Woodall Sieve (suspended) Emerald: Earned 50,000,000 credits (50,009,610)PPS Sieve Double Silver: Earned 200,000,000 credits (463,452,443)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Jade: Earned 10,000,000 credits (10,165,888)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,071,454)AP 26/27 Turquoise: Earned 5,000,000 credits (6,798,063)GFN Emerald: Earned 50,000,000 credits (57,113,430)WW Ruby: Earned 2,000,000 credits (4,232,000)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 155406 - Posted: 13 May 2022 | 6:21:57 UTC - in response to Message 155397.
Last modified: 13 May 2022 | 6:29:31 UTC

They tried to release some CPU time calling sched_yield() function inside loop, but they didn't understand difference between behavior of yield- and sleep-type functions, so their solution didn't work.

I would not be so sure about that. The driver is making an assumption about the behaviour of the caller.

It's not the driver that's polling, it's the CPU task stuffing the GPU ("the GPU task") which assumes the driver blocks until it's done. But the driver doesn't block, it yields the CPU instead, which passes the ball right back to the GPU task after the O/S reschedules the driver, since the driver then merely returns the GPU computation status. The GPU task sees that the computation is not done and immediately calls the GPU driver again, ergo the caller is just polling. Meanwhile, no useful CPU work was performed because the user has dedicated a whole core to the GPU task which is mostly polling.

So the GPU task should be sleeping or yielding or doing something else in addition to polling the GPU. It could be measuring how long it takes for the GPU to finish the computation and then block on sleep() for a millisecond less than that length of time for the next task (so that it polls the driver for just a millisecond), and voila, you'll see that the core isn't busy anymore.

The assumption behind using sched_yield() in the driver is that some CPU task has useful work to do. It's not returning to the caller immediately as a non-blocking task would, it's letting the O/S scheduler decide which CPU task to wake up. The scheduler doesn't distinguish between a CPU crunching task and the GPU task, so the core is shared between all running tasks, including the task feeding the GPU. If you have nothing else running except the GPU task, it consumes 100% of the core. If you have another CPU task running on that core, the GPU task consumes 50% of the core.

So really the GPU task should also be calling sched_yield() after calling the driver if it doesn't have anything better to do than check again whether the GPU has finished digesting the data. This method is simpler and more reliable than figuring out how long to sleep.

With that change, the O/S will report that the GPU task doesn't use a whole core, it uses only as much core as it needs to service the GPU data since the polling time is negligible. The task switching overhead is counted as kernel CPU time, not task CPU time, and the core will show as mostly idle if there is no other CPU work to do. Then the user can make a correct decision about allocating tasks to cores. The GPU will be serviced when the O/S grants a time slice to the GPU task, so the GPU will be a little less than 100% busy as it has to wait for up to 1 time slice to be serviced (assuming you're not running more than 1 CPU task per core).

Forcing the driver to sleep() for a fixed amount of time is a bad substitute for telling the GPU task to yield the CPU after calling the GPU driver and checking the GPU status.

stream
Volunteer moderator
Project administrator
Volunteer developer
Volunteer tester
Send message
Joined: 1 Mar 14
Posts: 989
ID: 301928
Credit: 543,186,393
RAC: 13
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,011,570)Cullen LLR Jade: Earned 10,000,000 credits (10,009,374)ESP LLR Jade: Earned 10,000,000 credits (10,009,221)Generalized Cullen/Woodall LLR Jade: Earned 10,000,000 credits (10,012,217)PPS LLR Jade: Earned 10,000,000 credits (16,320,747)PSP LLR Jade: Earned 10,000,000 credits (10,044,081)SoB LLR Jade: Earned 10,000,000 credits (10,064,750)SR5 LLR Jade: Earned 10,000,000 credits (10,002,051)SGS LLR Jade: Earned 10,000,000 credits (10,001,295)TRP LLR Jade: Earned 10,000,000 credits (10,002,411)Woodall LLR Jade: Earned 10,000,000 credits (10,013,921)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,004,228)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,047,667)PPS Sieve Sapphire: Earned 20,000,000 credits (20,866,490)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,043,271)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,015,177)AP 26/27 Sapphire: Earned 20,000,000 credits (20,045,194)GFN Emerald: Earned 50,000,000 credits (55,355,287)WW Emerald: Earned 50,000,000 credits (50,016,000)PSA Double Silver: Earned 200,000,000 credits (200,301,443)
Message 155413 - Posted: 13 May 2022 | 16:41:53 UTC - in response to Message 155406.

They tried to release some CPU time calling sched_yield() function inside loop, but they didn't understand difference between behavior of yield- and sleep-type functions, so their solution didn't work.

I would not be so sure about that. The driver is making an assumption about the behaviour of the caller.

Standard user is code is something like this:

"run kernel on GPU and return when done".

The problem is in inefficient implementation of this action inside GPU driver - we have no control over it.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 1022
ID: 55391
Credit: 887,962,162
RAC: 139,697
Discovered 2 mega primesFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2022 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (6,055,323)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,433,680)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,443,837)PPS LLR Sapphire: Earned 20,000,000 credits (34,545,997)PSP LLR Turquoise: Earned 5,000,000 credits (6,587,988)SoB LLR Sapphire: Earned 20,000,000 credits (45,081,394)SR5 LLR Turquoise: Earned 5,000,000 credits (6,205,694)SGS LLR Ruby: Earned 2,000,000 credits (3,627,819)TRP LLR Turquoise: Earned 5,000,000 credits (7,078,152)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve (suspended) Emerald: Earned 50,000,000 credits (50,256,050)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,571,178)Generalized Cullen/Woodall Sieve (suspended) Emerald: Earned 50,000,000 credits (50,009,610)PPS Sieve Double Silver: Earned 200,000,000 credits (463,452,443)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Jade: Earned 10,000,000 credits (10,165,888)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,071,454)AP 26/27 Turquoise: Earned 5,000,000 credits (6,798,063)GFN Emerald: Earned 50,000,000 credits (57,113,430)WW Ruby: Earned 2,000,000 credits (4,232,000)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 155414 - Posted: 13 May 2022 | 22:28:00 UTC - in response to Message 155413.

They tried to release some CPU time calling sched_yield() function inside loop, but they didn't understand difference between behavior of yield- and sleep-type functions, so their solution didn't work.

I would not be so sure about that. The driver is making an assumption about the behaviour of the caller.

Standard user is code is something like this:

"run kernel on GPU and return when done".

The problem is in inefficient implementation of this action inside GPU driver - we have no control over it.

The design of CUDA is unfortunate from that perspective,
like the sched_yield() is an afterthought in deference to CPU performance.
You could replace the sched_yield() with a simple return and then you have
a non-blocking driver, with reponsibility for yielding 100% in the hands of
the client program. "Standard" clients are not written that way, they expect the driver to block until done.
If the driver had left out the sched_yield() these programs would still be inefficient CPU hogs.

The problem with a blocking driver is that there's no certainty about when the program gets
control again. It's not a problem for software that expects to take seconds to minutes to return,
but it's an issue for software that must respond to real-time events, like games.

The way I see it, CUDA would work well where the CPU and GPU work on different parts of a computation at the same time, each doing a part that each is best at.

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155419 - Posted: 14 May 2022 | 6:40:04 UTC - in response to Message 155406.

So the GPU task should be sleeping or yielding or doing something else in addition to polling the GPU. It could be measuring how long it takes for the GPU to finish the computation and then block on sleep() for a millisecond less than that length of time for the next task (so that it polls the driver for just a millisecond), and voila, you'll see that the core isn't busy anymore.

That's interesting, maybe this is why htop always shows "S" next to the "geneferocl" task?



I have little (near null) knowledge about how CPUs and GPUs interact...
After reading your posts I'm not sure if there's any trick to do from my side (like calling the libsleep.so library) other than just waiting for any driver update. By the way, AMD just released a new Radeon driver on Wednesday, but there are no changes with it.

Thanks a lot!

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 1022
ID: 55391
Credit: 887,962,162
RAC: 139,697
Discovered 2 mega primesFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2022 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (6,055,323)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,433,680)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,443,837)PPS LLR Sapphire: Earned 20,000,000 credits (34,545,997)PSP LLR Turquoise: Earned 5,000,000 credits (6,587,988)SoB LLR Sapphire: Earned 20,000,000 credits (45,081,394)SR5 LLR Turquoise: Earned 5,000,000 credits (6,205,694)SGS LLR Ruby: Earned 2,000,000 credits (3,627,819)TRP LLR Turquoise: Earned 5,000,000 credits (7,078,152)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve (suspended) Emerald: Earned 50,000,000 credits (50,256,050)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,571,178)Generalized Cullen/Woodall Sieve (suspended) Emerald: Earned 50,000,000 credits (50,009,610)PPS Sieve Double Silver: Earned 200,000,000 credits (463,452,443)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Jade: Earned 10,000,000 credits (10,165,888)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,071,454)AP 26/27 Turquoise: Earned 5,000,000 credits (6,798,063)GFN Emerald: Earned 50,000,000 credits (57,113,430)WW Ruby: Earned 2,000,000 credits (4,232,000)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 155423 - Posted: 14 May 2022 | 14:14:50 UTC - in response to Message 155419.

That's interesting, maybe this is why htop always shows "S" next to the "geneferocl" task?




Yes, S means the CPU is sleeping while the GPU is running. You may notice that TIME+ increase by around 0.03 each second, which means that there is some CPU activity happening, like maybe a loop in the OCL API which sleeps for 50 milliseconds at a time. sleep() does more than sched_yeild(), it tells the O/S not to wake it up for that amount of time.

The libsleep solution is a kluge.
I am revising my previous statement, where I said:
the GPU task should also be calling sched_yield() after calling the driver if it doesn't have anything better to do than check again whether the GPU has finished digesting the data.
The O/S will immediately wake up the task again if there's nothing else going on, still leading to 100% CPU utilization.
The solution we really want is for the PG app itself to call sleep() in the polling loop, because it really has nothing else to do.

mfl0pProject donor
Project administrator
Volunteer developer
Send message
Joined: 5 Apr 09
Posts: 239
ID: 38042
Credit: 1,446,550,996
RAC: 4,379,248
Discovered 1 mega primeDiscovered 2 AP26sFound 1 prime in the 2019 Tour de PrimesFound 2 primes in the 2020 Tour de PrimesFound 1 prime in the 2020 Tour de Primes Mountain StageFound 5 primes in the 2021 Tour de PrimesFound 3 primes in the 2021 Tour de Primes Mountain StageFound 4 primes in the 2022 Tour de PrimesFound 2 primes in the 2022 Tour de Primes Mountain Stage321 LLR Sapphire: Earned 20,000,000 credits (38,127,048)Cullen LLR Amethyst: Earned 1,000,000 credits (1,930,420)ESP LLR Turquoise: Earned 5,000,000 credits (5,800,216)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (4,699,809)PPS LLR Emerald: Earned 50,000,000 credits (57,408,251)PSP LLR Ruby: Earned 2,000,000 credits (4,888,737)SoB LLR Jade: Earned 10,000,000 credits (17,161,268)SR5 LLR Emerald: Earned 50,000,000 credits (54,189,051)SGS LLR Amethyst: Earned 1,000,000 credits (1,086,646)TRP LLR Turquoise: Earned 5,000,000 credits (6,861,224)Woodall LLR Silver: Earned 100,000 credits (429,508)321 Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,425,049)PPS Sieve Emerald: Earned 50,000,000 credits (57,903,667)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (47,384)TRP Sieve (suspended) Bronze: Earned 10,000 credits (49,560)AP 26/27 Double Gold: Earned 500,000,000 credits (602,043,991)GFN Double Bronze: Earned 100,000,000 credits (141,791,458)WW Double Silver: Earned 200,000,000 credits (446,360,000)PSA Silver: Earned 100,000 credits (456,000)
Message 155431 - Posted: 14 May 2022 | 22:58:53 UTC - in response to Message 155423.


The solution we really want is for the PG app itself to call sleep() in the polling loop, because it really has nothing else to do.


This is exactly what I have done with the AP27 and WW apps.

WezH
Send message
Joined: 9 Jun 11
Posts: 94
ID: 101605
Credit: 456,758,348
RAC: 910,907
Discovered 2 mega primesFound 2 primes in the 2021 Tour de PrimesFound 1 mega prime in the 2021 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 1 mega prime in the 2022 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,051,099)Cullen LLR Turquoise: Earned 5,000,000 credits (9,151,038)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,183)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,200,969)PPS LLR Sapphire: Earned 20,000,000 credits (45,446,659)PSP LLR Jade: Earned 10,000,000 credits (14,341,709)SoB LLR Sapphire: Earned 20,000,000 credits (23,322,034)SR5 LLR Turquoise: Earned 5,000,000 credits (5,560,649)SGS LLR Jade: Earned 10,000,000 credits (12,391,173)TRP LLR Turquoise: Earned 5,000,000 credits (5,043,381)Woodall LLR Turquoise: Earned 5,000,000 credits (5,012,148)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,489,551)Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (16,035)Generalized Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (45,874)PPS Sieve Jade: Earned 10,000,000 credits (12,159,088)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (18,428)TRP Sieve (suspended) Bronze: Earned 10,000 credits (14,729)AP 26/27 Jade: Earned 10,000,000 credits (11,017,175)GFN Double Bronze: Earned 100,000,000 credits (173,585,733)WW Double Bronze: Earned 100,000,000 credits (116,332,000)PSA Gold: Earned 500,000 credits (510,756)
Message 155440 - Posted: 15 May 2022 | 8:08:00 UTC

Borrowing thread, can't post to old thread.

What I should put on my /lib/systemd/system/boinc-client.service to Boinc start with libsleep.so?

I tried this and some variations form this message, and boinc didn't start.

Running service, and working(default) line is this:

ExecStart=/usr/bin/boinc

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155454 - Posted: 16 May 2022 | 4:31:17 UTC - in response to Message 155440.

What I should put on my /lib/systemd/system/boinc-client.service to Boinc start with libsleep.so?


I put this, without the --dir parameter:

ExecStart=/bin/sh -c 'YIELD_SLEEP_TIME="50000" LD_PRELOAD="/home/arakelov/libsleep/libsleep.so" /usr/bin/boinc'

WezH
Send message
Joined: 9 Jun 11
Posts: 94
ID: 101605
Credit: 456,758,348
RAC: 910,907
Discovered 2 mega primesFound 2 primes in the 2021 Tour de PrimesFound 1 mega prime in the 2021 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 1 mega prime in the 2022 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,051,099)Cullen LLR Turquoise: Earned 5,000,000 credits (9,151,038)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,183)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,200,969)PPS LLR Sapphire: Earned 20,000,000 credits (45,446,659)PSP LLR Jade: Earned 10,000,000 credits (14,341,709)SoB LLR Sapphire: Earned 20,000,000 credits (23,322,034)SR5 LLR Turquoise: Earned 5,000,000 credits (5,560,649)SGS LLR Jade: Earned 10,000,000 credits (12,391,173)TRP LLR Turquoise: Earned 5,000,000 credits (5,043,381)Woodall LLR Turquoise: Earned 5,000,000 credits (5,012,148)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,489,551)Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (16,035)Generalized Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (45,874)PPS Sieve Jade: Earned 10,000,000 credits (12,159,088)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (18,428)TRP Sieve (suspended) Bronze: Earned 10,000 credits (14,729)AP 26/27 Jade: Earned 10,000,000 credits (11,017,175)GFN Double Bronze: Earned 100,000,000 credits (173,585,733)WW Double Bronze: Earned 100,000,000 credits (116,332,000)PSA Gold: Earned 500,000 credits (510,756)
Message 155457 - Posted: 16 May 2022 | 15:46:24 UTC - in response to Message 155454.
Last modified: 16 May 2022 | 15:49:57 UTC

Thanks, that did work, but there was still problem:

ERROR: ld.so: object '/home/wezh/boinc/libsleep.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.


Then I did move libsleep.so to /usr/local/lib/ and edited correct path to ExecStart= and bang, it started to work.

Now wait and see how much it does effect calculation times. If I remember correctly YIELD_SLEEP_TIME= should be adjusted between different GFN's?

arakelov
Send message
Joined: 3 Jun 21
Posts: 21
ID: 1375045
Credit: 66,024,126
RAC: 46,186
321 LLR Silver: Earned 100,000 credits (387,115)Cullen LLR Bronze: Earned 10,000 credits (25,951)ESP LLR Gold: Earned 500,000 credits (962,660)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (574,823)PPS LLR Ruby: Earned 2,000,000 credits (4,642,656)PSP LLR Ruby: Earned 2,000,000 credits (2,639,780)SoB LLR Turquoise: Earned 5,000,000 credits (9,142,106)SR5 LLR Bronze: Earned 10,000 credits (12,677)SGS LLR Gold: Earned 500,000 credits (536,079)TRP LLR Gold: Earned 500,000 credits (724,042)Woodall LLR Bronze: Earned 10,000 credits (44,502)PPS Sieve Turquoise: Earned 5,000,000 credits (6,145,333)AP 26/27 Amethyst: Earned 1,000,000 credits (1,928,511)GFN Sapphire: Earned 20,000,000 credits (37,105,892)WW Amethyst: Earned 1,000,000 credits (1,152,000)
Message 155459 - Posted: 16 May 2022 | 17:38:56 UTC - in response to Message 155457.

Now wait and see how much it does effect calculation times. If I remember correctly YIELD_SLEEP_TIME= should be adjusted between different GFN's?

Yes, @composite showed these values.

WezH
Send message
Joined: 9 Jun 11
Posts: 94
ID: 101605
Credit: 456,758,348
RAC: 910,907
Discovered 2 mega primesFound 2 primes in the 2021 Tour de PrimesFound 1 mega prime in the 2021 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 1 mega prime in the 2022 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,051,099)Cullen LLR Turquoise: Earned 5,000,000 credits (9,151,038)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,183)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,200,969)PPS LLR Sapphire: Earned 20,000,000 credits (45,446,659)PSP LLR Jade: Earned 10,000,000 credits (14,341,709)SoB LLR Sapphire: Earned 20,000,000 credits (23,322,034)SR5 LLR Turquoise: Earned 5,000,000 credits (5,560,649)SGS LLR Jade: Earned 10,000,000 credits (12,391,173)TRP LLR Turquoise: Earned 5,000,000 credits (5,043,381)Woodall LLR Turquoise: Earned 5,000,000 credits (5,012,148)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,489,551)Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (16,035)Generalized Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (45,874)PPS Sieve Jade: Earned 10,000,000 credits (12,159,088)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (18,428)TRP Sieve (suspended) Bronze: Earned 10,000 credits (14,729)AP 26/27 Jade: Earned 10,000,000 credits (11,017,175)GFN Double Bronze: Earned 100,000,000 credits (173,585,733)WW Double Bronze: Earned 100,000,000 credits (116,332,000)PSA Gold: Earned 500,000 credits (510,756)
Message 155460 - Posted: 16 May 2022 | 17:41:24 UTC - in response to Message 155459.

Yes, @composite showed these values.


Thanks, I was looking for that but couldn't find.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 1022
ID: 55391
Credit: 887,962,162
RAC: 139,697
Discovered 2 mega primesFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2022 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (6,055,323)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,433,680)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,443,837)PPS LLR Sapphire: Earned 20,000,000 credits (34,545,997)PSP LLR Turquoise: Earned 5,000,000 credits (6,587,988)SoB LLR Sapphire: Earned 20,000,000 credits (45,081,394)SR5 LLR Turquoise: Earned 5,000,000 credits (6,205,694)SGS LLR Ruby: Earned 2,000,000 credits (3,627,819)TRP LLR Turquoise: Earned 5,000,000 credits (7,078,152)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve (suspended) Emerald: Earned 50,000,000 credits (50,256,050)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,571,178)Generalized Cullen/Woodall Sieve (suspended) Emerald: Earned 50,000,000 credits (50,009,610)PPS Sieve Double Silver: Earned 200,000,000 credits (463,452,443)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Jade: Earned 10,000,000 credits (10,165,888)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,071,454)AP 26/27 Turquoise: Earned 5,000,000 credits (6,798,063)GFN Emerald: Earned 50,000,000 credits (57,113,430)WW Ruby: Earned 2,000,000 credits (4,232,000)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 155461 - Posted: 17 May 2022 | 0:48:54 UTC - in response to Message 155460.

Yes, @composite showed these values.


Thanks, I was looking for that but couldn't find.

I remember fiddling with sleep values but had completely forgotten that I had posted such a table.

WezH
Send message
Joined: 9 Jun 11
Posts: 94
ID: 101605
Credit: 456,758,348
RAC: 910,907
Discovered 2 mega primesFound 2 primes in the 2021 Tour de PrimesFound 1 mega prime in the 2021 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 1 mega prime in the 2022 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,051,099)Cullen LLR Turquoise: Earned 5,000,000 credits (9,151,038)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,183)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,200,969)PPS LLR Sapphire: Earned 20,000,000 credits (45,446,659)PSP LLR Jade: Earned 10,000,000 credits (14,341,709)SoB LLR Sapphire: Earned 20,000,000 credits (23,322,034)SR5 LLR Turquoise: Earned 5,000,000 credits (5,560,649)SGS LLR Jade: Earned 10,000,000 credits (12,391,173)TRP LLR Turquoise: Earned 5,000,000 credits (5,043,381)Woodall LLR Turquoise: Earned 5,000,000 credits (5,012,148)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,489,551)Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (16,035)Generalized Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (45,874)PPS Sieve Jade: Earned 10,000,000 credits (12,159,088)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (18,428)TRP Sieve (suspended) Bronze: Earned 10,000 credits (14,729)AP 26/27 Jade: Earned 10,000,000 credits (11,017,175)GFN Double Bronze: Earned 100,000,000 credits (173,585,733)WW Double Bronze: Earned 100,000,000 credits (116,332,000)PSA Gold: Earned 500,000 credits (510,756)
Message 155573 - Posted: 23 May 2022 | 16:11:48 UTC

It seems to be working, testing continues...

Setup: Ryzen 7 3800XT + RTX 3050 driver: 51073 + Ubuntu 20.04.4 LTS

task libsleep Cpu % GFN16 50 41% GFN17Mega 50 25% GFN18 50 22% GFN19 50 8% DYFL 50 7%


Without libsleep, CPU % always 100%

Profile mikey
Avatar
Send message
Joined: 17 Mar 09
Posts: 1398
ID: 37043
Credit: 592,082,665
RAC: 39,536
Discovered 1 mega prime321 LLR Ruby: Earned 2,000,000 credits (2,066,244)Cullen LLR Ruby: Earned 2,000,000 credits (2,074,615)ESP LLR Ruby: Earned 2,000,000 credits (2,243,517)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,142,353)PPS LLR Turquoise: Earned 5,000,000 credits (7,293,199)PSP LLR Ruby: Earned 2,000,000 credits (2,232,103)SoB LLR Ruby: Earned 2,000,000 credits (2,934,612)SR5 LLR Ruby: Earned 2,000,000 credits (2,071,823)SGS LLR Turquoise: Earned 5,000,000 credits (6,780,752)TRP LLR Ruby: Earned 2,000,000 credits (2,672,432)Woodall LLR Ruby: Earned 2,000,000 credits (2,014,811)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (23,770,672)Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (944,431)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,813,253)PPS Sieve Double Silver: Earned 200,000,000 credits (379,578,052)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Ruby: Earned 2,000,000 credits (2,446,797)AP 26/27 Sapphire: Earned 20,000,000 credits (33,880,340)GFN Emerald: Earned 50,000,000 credits (67,579,656)WW Turquoise: Earned 5,000,000 credits (8,092,000)PSA Sapphire: Earned 20,000,000 credits (20,457,430)
Message 155589 - Posted: 24 May 2022 | 12:06:35 UTC - in response to Message 155573.

It seems to be working, testing continues...

Setup: Ryzen 7 3800XT + RTX 3050 driver: 51073 + Ubuntu 20.04.4 LTS

task libsleep Cpu % GFN16 50 41% GFN17Mega 50 25% GFN18 50 22% GFN19 50 8% DYFL 50 7%


Without libsleep, CPU % always 100%


Yes but what is the time difference of the total task between using libsleep at 50% and letting the cpu run at 100%?

WezH
Send message
Joined: 9 Jun 11
Posts: 94
ID: 101605
Credit: 456,758,348
RAC: 910,907
Discovered 2 mega primesFound 2 primes in the 2021 Tour de PrimesFound 1 mega prime in the 2021 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 1 mega prime in the 2022 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,051,099)Cullen LLR Turquoise: Earned 5,000,000 credits (9,151,038)ESP LLR Turquoise: Earned 5,000,000 credits (5,048,183)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,200,969)PPS LLR Sapphire: Earned 20,000,000 credits (45,446,659)PSP LLR Jade: Earned 10,000,000 credits (14,341,709)SoB LLR Sapphire: Earned 20,000,000 credits (23,322,034)SR5 LLR Turquoise: Earned 5,000,000 credits (5,560,649)SGS LLR Jade: Earned 10,000,000 credits (12,391,173)TRP LLR Turquoise: Earned 5,000,000 credits (5,043,381)Woodall LLR Turquoise: Earned 5,000,000 credits (5,012,148)321 Sieve (suspended) Ruby: Earned 2,000,000 credits (2,489,551)Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (16,035)Generalized Cullen/Woodall Sieve (suspended) Bronze: Earned 10,000 credits (45,874)PPS Sieve Jade: Earned 10,000,000 credits (12,159,088)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (18,428)TRP Sieve (suspended) Bronze: Earned 10,000 credits (14,729)AP 26/27 Jade: Earned 10,000,000 credits (11,017,175)GFN Double Bronze: Earned 100,000,000 credits (173,585,733)WW Double Bronze: Earned 100,000,000 credits (116,332,000)PSA Gold: Earned 500,000 credits (510,756)
Message 155590 - Posted: 24 May 2022 | 15:52:17 UTC - in response to Message 155589.


Yes but what is the time difference of the total task between using libsleep at 50% and letting the cpu run at 100%?


Oh, glad You asked, forgot to add those.

Average runtimes in sec:
task no-libsleep libsleep 50 GFN16 82.22 81.78 GFN17Mega 339.44 344.28 GFN18 1,323.76 1,313.19 GFN19 4,977.77 4,923.88 DYFL 202,285.31 201,020.39


So almost equal runtimes when libsleep is 50.

Profile mikey
Avatar
Send message
Joined: 17 Mar 09
Posts: 1398
ID: 37043
Credit: 592,082,665
RAC: 39,536
Discovered 1 mega prime321 LLR Ruby: Earned 2,000,000 credits (2,066,244)Cullen LLR Ruby: Earned 2,000,000 credits (2,074,615)ESP LLR Ruby: Earned 2,000,000 credits (2,243,517)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,142,353)PPS LLR Turquoise: Earned 5,000,000 credits (7,293,199)PSP LLR Ruby: Earned 2,000,000 credits (2,232,103)SoB LLR Ruby: Earned 2,000,000 credits (2,934,612)SR5 LLR Ruby: Earned 2,000,000 credits (2,071,823)SGS LLR Turquoise: Earned 5,000,000 credits (6,780,752)TRP LLR Ruby: Earned 2,000,000 credits (2,672,432)Woodall LLR Ruby: Earned 2,000,000 credits (2,014,811)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (23,770,672)Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (944,431)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,813,253)PPS Sieve Double Silver: Earned 200,000,000 credits (379,578,052)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Ruby: Earned 2,000,000 credits (2,446,797)AP 26/27 Sapphire: Earned 20,000,000 credits (33,880,340)GFN Emerald: Earned 50,000,000 credits (67,579,656)WW Turquoise: Earned 5,000,000 credits (8,092,000)PSA Sapphire: Earned 20,000,000 credits (20,457,430)
Message 155603 - Posted: 25 May 2022 | 11:29:23 UTC - in response to Message 155590.


Yes but what is the time difference of the total task between using libsleep at 50% and letting the cpu run at 100%?


Oh, glad You asked, forgot to add those.

Average runtimes in sec:
task no-libsleep libsleep 50 GFN16 82.22 81.78 GFN17Mega 339.44 344.28 GFN18 1,323.76 1,313.19 GFN19 4,977.77 4,923.88 DYFL 202,285.31 201,020.39


So almost equal runtimes when libsleep is 50.


That's VERY good then!!

Post to thread

Message boards : Problems and Help : High CPU usage for GPU apps

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2022 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 1.66, 0.91, 0.84
Generated 12 Aug 2022 | 15:11:37 UTC