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 : Generalized Fermat Prime Search : High CPU usage on GPU task

Author Message
ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112004 - Posted: 1 Dec 2017 | 13:35:54 UTC

I have been running a GFN-WR task for over a day now, but the CPU usage has not dropped below 97%. I am using Gentoo Linux. I installed the closed-source Nvidia drivers instead of the open source ones. Is there any reason for the high CPU usage?

Yves Gallot
Volunteer developer
Project scientist
Send message
Joined: 19 Aug 12
Posts: 524
ID: 164101
Credit: 304,715,793
RAC: 5,160
GFN Double Silver: Earned 200,000,000 credits (304,715,793)
Message 112009 - Posted: 1 Dec 2017 | 19:59:47 UTC - in response to Message 112004.

I have been running a GFN-WR task for over a day now, but the CPU usage has not dropped below 97%. I am using Gentoo Linux. I installed the closed-source Nvidia drivers instead of the open source ones. Is there any reason for the high CPU usage?

See the thread http://www.primegrid.com/forum_thread.php?id=7364
Linux driver is the reason.
You can try this
https://www.reddit.com/r/EtherMining/comments/600lpx/high_cpu_load_with_genoil/

ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112010 - Posted: 1 Dec 2017 | 20:36:29 UTC - in response to Message 112009.

Do you mean telling Xserver to run on integrated graphics? I'm not even running an Xserver right now and there's no display connected to the computer.

Yves Gallot
Volunteer developer
Project scientist
Send message
Joined: 19 Aug 12
Posts: 524
ID: 164101
Credit: 304,715,793
RAC: 5,160
GFN Double Silver: Earned 200,000,000 credits (304,715,793)
Message 112012 - Posted: 1 Dec 2017 | 22:18:14 UTC - in response to Message 112010.

Do you mean telling Xserver to run on integrated graphics? I'm not even running an Xserver right now and there's no display connected to the computer.

Yes but if there's no display connected this can't resolve the problem.
The CPU usage is close to zero with the same code running on Windows... why?
I found https://bitcointalk.org/index.php?topic=181328.0
but I don't have access to a Linux box for testing.

ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112013 - Posted: 1 Dec 2017 | 23:25:34 UTC - in response to Message 112012.

I think that fixed it, though my way is really hacky. I ended up having to export the environment variable mentioned in the post you linked before starting boinc, meaning everything boinc runs will be started with that variable.

Now, is there a way I can tell boinc to only start the gfn applications like that? I know about command line options in an app_config file, but does that work with environment variables?

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112015 - Posted: 2 Dec 2017 | 7:22:32 UTC - in response to Message 112013.

I think that fixed it, though my way is really hacky. I ended up having to export the environment variable mentioned in the post you linked before starting boinc, meaning everything boinc runs will be started with that variable.

Now, is there a way I can tell boinc to only start the gfn applications like that? I know about command line options in an app_config file, but does that work with environment variables?
You don't need to use the YIELD_SLEEP_TIME environment variable. The default value is hardcoded, so you can change that when you compile the preload library. The lib_init function is just there for flexibility, so you can omit the lib_init function if you want.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112016 - Posted: 2 Dec 2017 | 7:25:53 UTC - in response to Message 112012.

Do you mean telling Xserver to run on integrated graphics? I'm not even running an Xserver right now and there's no display connected to the computer.

Yes but if there's no display connected this can't resolve the problem.
The CPU usage is close to zero with the same code running on Windows... why?
I found https://bitcointalk.org/index.php?topic=181328.0
but I don't have access to a Linux box for testing.

I can test this on my system, I've been messing with GFN code and I have the Makefile set up the way I want. What branch should I checkout?

Yves Gallot
Volunteer developer
Project scientist
Send message
Joined: 19 Aug 12
Posts: 524
ID: 164101
Credit: 304,715,793
RAC: 5,160
GFN Double Silver: Earned 200,000,000 credits (304,715,793)
Message 112017 - Posted: 2 Dec 2017 | 8:56:29 UTC - in response to Message 112016.

I can test this on my system, I've been messing with GFN code and I have the Makefile set up the way I want. What branch should I checkout?

The trunk is stable.

ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112021 - Posted: 2 Dec 2017 | 13:08:40 UTC - in response to Message 112015.

I think that fixed it, though my way is really hacky. I ended up having to export the environment variable mentioned in the post you linked before starting boinc, meaning everything boinc runs will be started with that variable.

Now, is there a way I can tell boinc to only start the gfn applications like that? I know about command line options in an app_config file, but does that work with environment variables?
You don't need to use the YIELD_SLEEP_TIME environment variable. The default value is hardcoded, so you can change that when you compile the preload library. The lib_init function is just there for flexibility, so you can omit the lib_init function if you want.


I still have to have the LD_PRELOAD variable though, unless there's another way of doing it I don't know.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112041 - Posted: 3 Dec 2017 | 6:01:40 UTC - in response to Message 112021.

I think that fixed it, though my way is really hacky. I ended up having to export the environment variable mentioned in the post you linked before starting boinc, meaning everything boinc runs will be started with that variable.

Now, is there a way I can tell boinc to only start the gfn applications like that? I know about command line options in an app_config file, but does that work with environment variables?
You don't need to use the YIELD_SLEEP_TIME environment variable. The default value is hardcoded, so you can change that when you compile the preload library. The lib_init function is just there for flexibility, so you can omit the lib_init function if you want.


I still have to have the LD_PRELOAD variable though, unless there's another way of doing it I don't know.

The function you are replacing is used in OpenCL so it has to be resolved before loading libraries. If only OpenCL is calling sched_yield() then there there is nothing to be concerned about in the other apps.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112043 - Posted: 3 Dec 2017 | 11:26:21 UTC
Last modified: 3 Dec 2017 | 11:37:05 UTC

On Linux, it doesn't look good for small GFN, but there is tunable potential to drive the GPU to 100% with low CPU utilization for large GFN.

Testing was with a 3.3 GHz 5820K with a GTX 760. In all cases, without a microsecond sleep, a GFN task takes 100% of a CPU thread.

Then I added a microsecond sleep in HostProgram.h after each call to clEnqueueNDRangeKernel(). So:
- one right after that function call in Execute(), and
- another after the error check following the function call in ExecuteProfiling().

I ran tests with 272042236^(2^N)+1 and this selected OCL2 in every case. These are the estimated runtimes reported by the program.

The CPU has a hard time feeding the GPU when GFN workunits are small, so introducing any sleep for GFN17, or smaller, lengthens the GPU computation time while reducing GPU and CPU utilization.

Microsecond sleeps cause interesting things to happen to the estimated runtime and the % of CPU and GPU for GFN18 and above. With a 1 microsecond sleep, we start to see significant reduction in %CPU utilization.

runtimes task no sleep sleep=1 %CPU %GPU GFN18 1:27:00 1:29:00 50 99 GFN19 5:52:00 5:52:00 75 100 GFN20 22:50:00 23:10:00 88 100 GFN21 96:10:00 96:00:00 94 100

Two microseconds of sleep had the same results as 1 microsecond.

With a 1000 microsecond sleep:
task runtime %CPU %GPU GFN18 16:00:00 5 10 GFN19 32:00:00 5 20 GFN20 62:10:00 4 38 GFN21 129:10:00 5 75

With a 500 microsecond sleep:
task runtime %CPU %GPU GFN18 9:01:00 9 37 GFN19 18:00:00 8 34 GFN20 35:10:00 8 63 GFN21 95:50:00 32 100

The sleep for each task can be tuned for a given CPU and GPU combination to get the minimum %CPU that produces 100% GPU. In my case:
task runtime %CPU %GPU sleep GFN18 1:28:00 30 99 20 GFN19 5:55:00 13 100 135 GFN20 23:00:00 9 100 300 GFN21 96:00:00 18 100 600

There is a range of sleep values that alters %CPU while retaining 100% GPU, where the potential value of extracting a small incremental %CPU savings is offset by increasing the task runtime and GPU residency.

It would desirable to automatically adjust the sleep value to reduce GPU utilization when the computer is in use as a workstation. Compare this with the all-or-nothing choice for GPU crunching given by BOINC. For example, GFN21 could normally run with a sleep value of 600 but change this on-the-fly to 1000 when a user is present.

EDIT: Without much work a tuning parameter for sleep microseconds can be added to the genefer command line which would be used in OpenCL tasks. A different value for this parameter can be added to each app's command line in app_config.xml.

ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112045 - Posted: 3 Dec 2017 | 15:08:30 UTC - in response to Message 112043.

Thanks for that data. So, from your results, the default value of YIELD_SLEEP_TIME=1000 seems to be pretty good? And the larger the workunit, the higher value YIELD_SLEEP_TIME should be? On a side note, I'm now running AP27 tasks on my gpu with the same library, and it's only using ~2.9% cpu. I don't have data to compare that with right now, but it seems like that would be ideal.

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112046 - Posted: 3 Dec 2017 | 16:42:27 UTC - in response to Message 112045.

Your best value of YIELD_SLEEP would be different than mine. It depends on your hardware and the application you run. In my case 1000 is a not a good value for any GFN task. It's way too much for GFNs smaller than GFN22, and not enough for GFN22 or higher. My "best" value for GFN22 is 1610 (all these are found by trial and error: initial guess then bisection). GFN could be altered to dynamically find it's own best values, doing so with several iterations of tests, by setting a target runtime of (for example) 0.5% over the no-sleep runtime.

ReggieProject donor
Volunteer moderator
Volunteer tester
Send message
Joined: 10 May 14
Posts: 32
ID: 311759
Credit: 80,487,785
RAC: 657
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (501,251)Cullen LLR Gold: Earned 500,000 credits (507,205)ESP LLR Gold: Earned 500,000 credits (504,771)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (500,544)PPS LLR Gold: Earned 500,000 credits (500,330)PSP LLR Gold: Earned 500,000 credits (530,606)SoB LLR Gold: Earned 500,000 credits (507,131)SR5 LLR Silver: Earned 100,000 credits (215,403)SGS LLR Gold: Earned 500,000 credits (500,037)TRP LLR Silver: Earned 100,000 credits (112,730)Woodall LLR Silver: Earned 100,000 credits (228,485)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (2,000,420)PPS Sieve Sapphire: Earned 20,000,000 credits (20,579,955)AP 26/27 Jade: Earned 10,000,000 credits (12,711,192)GFN Sapphire: Earned 20,000,000 credits (20,412,818)PSA Sapphire: Earned 20,000,000 credits (20,070,245)
Message 112048 - Posted: 3 Dec 2017 | 19:14:34 UTC - in response to Message 112046.

Okay, one last question: BOINC shows CPU usage for each task, but how did you figure out the GPU usage?

No.15Project donor
Send message
Joined: 11 Jun 16
Posts: 26
ID: 449361
Credit: 889,495,407
RAC: 1,486,582
Discovered 2 mega primes321 LLR Silver: Earned 100,000 credits (404,375)Cullen LLR Gold: Earned 500,000 credits (748,151)ESP LLR Silver: Earned 100,000 credits (173,150)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,646,757)PPS LLR Ruby: Earned 2,000,000 credits (2,892,952)PSP LLR Ruby: Earned 2,000,000 credits (2,557,499)SoB LLR Sapphire: Earned 20,000,000 credits (22,497,605)SR5 LLR Ruby: Earned 2,000,000 credits (2,808,642)SGS LLR Silver: Earned 100,000 credits (266,982)TRP LLR Silver: Earned 100,000 credits (351,574)Woodall LLR Amethyst: Earned 1,000,000 credits (1,308,318)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (906,493)PPS Sieve Double Bronze: Earned 100,000,000 credits (109,075,447)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Bronze: Earned 10,000 credits (34,122)AP 26/27 Sapphire: Earned 20,000,000 credits (20,683,988)GFN Double Gold: Earned 500,000,000 credits (721,285,935)PSA Amethyst: Earned 1,000,000 credits (1,853,420)
Message 112050 - Posted: 3 Dec 2017 | 19:29:31 UTC - in response to Message 112048.

Okay, one last question: BOINC shows CPU usage for each task, but how did you figure out the GPU usage?

On windows you can use gpu-z in linux I use the nvidia xserver app
____________
My Primes :) 3060772^262144+1 and 3673932^262144+1

Profile composite
Volunteer tester
Send message
Joined: 16 Feb 10
Posts: 733
ID: 55391
Credit: 575,991,255
RAC: 320,921
Discovered 2 mega primesFound 1 prime in the 2018 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,477,467)Cullen LLR Gold: Earned 500,000 credits (776,297)ESP LLR Ruby: Earned 2,000,000 credits (3,120,351)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,056,207)PPS LLR Jade: Earned 10,000,000 credits (12,244,808)PSP LLR Turquoise: Earned 5,000,000 credits (5,000,271)SoB LLR Sapphire: Earned 20,000,000 credits (20,302,727)SR5 LLR Turquoise: Earned 5,000,000 credits (5,978,312)SGS LLR Ruby: Earned 2,000,000 credits (2,940,587)TRP LLR Turquoise: Earned 5,000,000 credits (7,025,303)Woodall LLR Amethyst: Earned 1,000,000 credits (1,693,614)321 Sieve Sapphire: Earned 20,000,000 credits (20,598,562)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 (243,835,164)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,300,774)GFN Emerald: Earned 50,000,000 credits (50,062,736)PSA Double Bronze: Earned 100,000,000 credits (102,762,384)
Message 112052 - Posted: 3 Dec 2017 | 22:24:57 UTC - in response to Message 112048.

Okay, one last question: BOINC shows CPU usage for each task, but how did you figure out the GPU usage?

Like No. 15 said. "NVIDIA X Server Settings" is the GUI started by the nvidia-settings command.

I use the "htop" command to see process information.

Profile Luigi R.Project donor
Avatar
Send message
Joined: 11 Feb 14
Posts: 131
ID: 297455
Credit: 22,655,122
RAC: 0
321 LLR Silver: Earned 100,000 credits (105,313)Cullen LLR Silver: Earned 100,000 credits (113,279)ESP LLR Silver: Earned 100,000 credits (113,580)Generalized Cullen/Woodall LLR Silver: Earned 100,000 credits (122,166)PPS LLR Ruby: Earned 2,000,000 credits (2,571,270)PSP LLR Silver: Earned 100,000 credits (172,629)SoB LLR Amethyst: Earned 1,000,000 credits (1,343,981)SR5 LLR Silver: Earned 100,000 credits (111,889)SGS LLR Silver: Earned 100,000 credits (133,431)TRP LLR Silver: Earned 100,000 credits (103,246)Woodall LLR Silver: Earned 100,000 credits (100,235)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Silver: Earned 100,000 credits (115,766)PPS Sieve Jade: Earned 10,000,000 credits (12,064,809)TRP Sieve (suspended) Silver: Earned 100,000 credits (108,608)AP 26/27 Amethyst: Earned 1,000,000 credits (1,087,567)GFN Ruby: Earned 2,000,000 credits (3,526,317)PSA Gold: Earned 500,000 credits (661,014)
Message 113719 - Posted: 23 Jan 2018 | 22:57:48 UTC
Last modified: 23 Jan 2018 | 23:01:03 UTC

Yeah, it worked for me!

My 750 Ti is fine with

useconds_t yield_sleep_time = 50000;

running GFN16.

CPU usage <=13%
GPU usage = 98%

Profile stiven
Send message
Joined: 20 Apr 11
Posts: 23
ID: 95657
Credit: 88,322,810
RAC: 41,213
Discovered 1 mega prime321 LLR Amethyst: Earned 1,000,000 credits (1,421,212)Cullen LLR Gold: Earned 500,000 credits (631,861)ESP LLR Gold: Earned 500,000 credits (764,389)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (879,216)PPS LLR Jade: Earned 10,000,000 credits (19,256,949)PSP LLR Amethyst: Earned 1,000,000 credits (1,644,752)SoB LLR Amethyst: Earned 1,000,000 credits (1,682,524)SR5 LLR Gold: Earned 500,000 credits (593,814)SGS LLR Ruby: Earned 2,000,000 credits (4,377,943)TRP LLR Amethyst: Earned 1,000,000 credits (1,001,074)Woodall LLR Amethyst: Earned 1,000,000 credits (1,072,562)321 Sieve Bronze: Earned 10,000 credits (54,890)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,860,153)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (586,556)PPS Sieve Sapphire: Earned 20,000,000 credits (21,346,282)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,175,857)TRP Sieve (suspended) Gold: Earned 500,000 credits (550,424)AP 26/27 Turquoise: Earned 5,000,000 credits (5,846,178)GFN Jade: Earned 10,000,000 credits (19,369,774)PSA Silver: Earned 100,000 credits (206,400)
Message 113956 - Posted: 30 Jan 2018 | 12:59:19 UTC - in response to Message 113719.

Could you let me know where should I put this line?

Profile Luigi R.Project donor
Avatar
Send message
Joined: 11 Feb 14
Posts: 131
ID: 297455
Credit: 22,655,122
RAC: 0
321 LLR Silver: Earned 100,000 credits (105,313)Cullen LLR Silver: Earned 100,000 credits (113,279)ESP LLR Silver: Earned 100,000 credits (113,580)Generalized Cullen/Woodall LLR Silver: Earned 100,000 credits (122,166)PPS LLR Ruby: Earned 2,000,000 credits (2,571,270)PSP LLR Silver: Earned 100,000 credits (172,629)SoB LLR Amethyst: Earned 1,000,000 credits (1,343,981)SR5 LLR Silver: Earned 100,000 credits (111,889)SGS LLR Silver: Earned 100,000 credits (133,431)TRP LLR Silver: Earned 100,000 credits (103,246)Woodall LLR Silver: Earned 100,000 credits (100,235)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Silver: Earned 100,000 credits (115,766)PPS Sieve Jade: Earned 10,000,000 credits (12,064,809)TRP Sieve (suspended) Silver: Earned 100,000 credits (108,608)AP 26/27 Amethyst: Earned 1,000,000 credits (1,087,567)GFN Ruby: Earned 2,000,000 credits (3,526,317)PSA Gold: Earned 500,000 credits (661,014)
Message 113965 - Posted: 30 Jan 2018 | 19:19:11 UTC - in response to Message 113956.

Download libsleep.c.
Edit that yield_sleep_time variable.
Save.
Compile by the commented command in libsleep.c.

On Linux, start client by a command like this

cd /your/boinc/path LD_PRELOAD="your/libsleep/path/libsleep.so" ./boinc
for standalone BOINC

and

LD_PRELOAD="your/libsleep/path/libsleep.so" boinc
for installed BOINC.


Or


Do not edit libsleep.c and simply compile it.
Then you can use a bash variable to set your customized time.
YIELD_SLEEP_TIME="500" LD_PRELOAD="your/libsleep/path/libsleep.so" boinc

Profile Luigi R.Project donor
Avatar
Send message
Joined: 11 Feb 14
Posts: 131
ID: 297455
Credit: 22,655,122
RAC: 0
321 LLR Silver: Earned 100,000 credits (105,313)Cullen LLR Silver: Earned 100,000 credits (113,279)ESP LLR Silver: Earned 100,000 credits (113,580)Generalized Cullen/Woodall LLR Silver: Earned 100,000 credits (122,166)PPS LLR Ruby: Earned 2,000,000 credits (2,571,270)PSP LLR Silver: Earned 100,000 credits (172,629)SoB LLR Amethyst: Earned 1,000,000 credits (1,343,981)SR5 LLR Silver: Earned 100,000 credits (111,889)SGS LLR Silver: Earned 100,000 credits (133,431)TRP LLR Silver: Earned 100,000 credits (103,246)Woodall LLR Silver: Earned 100,000 credits (100,235)321 Sieve Silver: Earned 100,000 credits (100,021)Generalized Cullen/Woodall Sieve (suspended) Silver: Earned 100,000 credits (115,766)PPS Sieve Jade: Earned 10,000,000 credits (12,064,809)TRP Sieve (suspended) Silver: Earned 100,000 credits (108,608)AP 26/27 Amethyst: Earned 1,000,000 credits (1,087,567)GFN Ruby: Earned 2,000,000 credits (3,526,317)PSA Gold: Earned 500,000 credits (661,014)
Message 114011 - Posted: 31 Jan 2018 | 21:30:44 UTC

Correction: bash variable should be on the same line, although it does not read it.

YIELD_SLEEP_TIME="500" LD_PRELOAD="/your/libsleep/path/libsleep.so" boinc

dthononProject donor
Volunteer tester
Send message
Joined: 6 Dec 17
Posts: 373
ID: 957147
Credit: 1,112,640,203
RAC: 542,672
Discovered 3 mega primes2018 Tour de Primes highest prime count2018 Tour de Primes highest prime scoreFound 50 primes in the 2018 Tour de PrimesFound 1 mega prime in the 2018 Tour de PrimesFound 1 prime in the 2018 Tour de Primes Mountain StageFound 1 mega prime in the 2018 Tour de Primes Mountain StageFound 5 primes in the 2019 Tour de PrimesFound 1 prime in the 2019 Tour de Primes Mountain Stage321 LLR Sapphire: Earned 20,000,000 credits (40,252,771)Cullen LLR Sapphire: Earned 20,000,000 credits (20,314,202)ESP LLR Sapphire: Earned 20,000,000 credits (22,963,445)Generalized Cullen/Woodall LLR Sapphire: Earned 20,000,000 credits (24,890,318)PPS LLR Double Bronze: Earned 100,000,000 credits (156,768,092)PSP LLR Sapphire: Earned 20,000,000 credits (30,051,714)SoB LLR Double Silver: Earned 200,000,000 credits (202,624,038)SR5 LLR Sapphire: Earned 20,000,000 credits (23,849,859)SGS LLR Sapphire: Earned 20,000,000 credits (20,423,879)TRP LLR Sapphire: Earned 20,000,000 credits (30,209,696)Woodall LLR Sapphire: Earned 20,000,000 credits (20,197,671)321 Sieve Sapphire: Earned 20,000,000 credits (20,579,959)Generalized Cullen/Woodall Sieve (suspended) Double Bronze: Earned 100,000,000 credits (126,821,599)PPS Sieve Double Bronze: Earned 100,000,000 credits (108,182,132)AP 26/27 Emerald: Earned 50,000,000 credits (66,871,220)GFN Double Bronze: Earned 100,000,000 credits (133,498,104)PSA Emerald: Earned 50,000,000 credits (64,141,506)
Message 115586 - Posted: 28 Feb 2018 | 0:32:34 UTC - in response to Message 114011.

And, if it is running as a service, edit /lib/systemd/system/boinc-client.service and modify the following line
ExecStart=/bin/sh -c 'YIELD_SLEEP_TIME="500" LD_PRELOAD="/your/libsleep/path/libsleep.so" /usr/bin/boinc --dir /var/lib/boinc-client >/var/log/boinc.log 2>/var/log/boincerr.log'

CPU reduced from 100% to less than 20%.

Message boards : Generalized Fermat Prime Search : High CPU usage on GPU task

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2019 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 2.08, 2.15, 2.34
Generated 15 Dec 2019 | 16:37:26 UTC