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 : Number crunching : Tips for Linux - squeezing a few more percent

Author Message
River~~
Send message
Joined: 17 Mar 07
Posts: 342
ID: 6533
Credit: 15,763,130
RAC: 41,665
321 LLR Silver: Earned 100,000 credits (124,889)Cullen LLR Silver: Earned 100,000 credits (200,779)ESP LLR Silver: Earned 100,000 credits (112,791)Generalized Cullen/Woodall LLR Silver: Earned 100,000 credits (106,156)PPS LLR Amethyst: Earned 1,000,000 credits (1,358,025)PSP LLR Silver: Earned 100,000 credits (150,832)SoB LLR Gold: Earned 500,000 credits (573,744)SR5 LLR Gold: Earned 500,000 credits (500,731)SGS LLR Silver: Earned 100,000 credits (479,282)TRP LLR Silver: Earned 100,000 credits (328,373)Woodall LLR Silver: Earned 100,000 credits (119,260)Generalized Cullen/Woodall Sieve Turquoise: Earned 5,000,000 credits (7,033,229)PPS Sieve Silver: Earned 100,000 credits (326,987)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Silver: Earned 100,000 credits (174,708)TRP Sieve (suspended) Gold: Earned 500,000 credits (505,558)AP 26/27 Gold: Earned 500,000 credits (598,364)GFN Ruby: Earned 2,000,000 credits (3,066,295)
Message 123312 - Posted: 11 Dec 2018 | 10:21:18 UTC

This is posted with the genefer challenge in mind, but is rather off topic for either the GFN or the challenge threads, so I posted it here.

Please feel free to add any other Linux tips, especially command line ones. I have successfully accumualted over half my points running machines in cli only mode, so it is certainly possible if you have the willingness to think commands rather than icons.

Feel free to ask questions but be warned I am an occasional reader of these forums so may or may not reply.

Tips for fellow Linux users. Some of these also apply in prinicle on Windows (but the commands would be different ;)

1. Do not leave monitoring programs running. BoincMgr and top, for example repeatedly poll the client, or the kernel, to check progress. This can lose you a percent or two from your performance, not so much for the actual cpu time but because of the disruption to the cache. If the OS reschedules the threads in different cores, then the core-specific caches are both/all disrupted.

I have measured this effect using the genefer estimated completion times.

2. To see the output from top, start it with this command line

top -d 3600 -u boinc

This makes top run once an hour, reducing its impact. If you want an update earlier, press the space bar.

3. To see the time estimates and other output from a currently running task, find out its pid using top, then run

sudo less /proc/<pid>/fd/2


I find this easier than trying to find the sdterr in the correct slot. Of course you can use cat tail or grep on the same file too. DO NOT use tail -f (see 1 above)

4. The low impact way of seeing your tasks progress is from the command line

boinccmd --get_tasks


5. Turn off graphics entirely and use "consoles" rather than "terminals". This may be of special interest to GPU users.

A terminal is a cli window running in a graphics environment. A console is a text mode use of the full screen. To turn off graphics under systemd run

sudo systemctl isolate mult<tab>


where <tab> is the tab key of course. It may take a few moments for bash to complete the line - don't press return till it has done so. (I always use tab completion because I can never remember the exact names of the target units.)

Whilst in console mode, you can still multi task. Ctrl-Alt-F1 to Ctrl-Alt-F6 give you six different consoles, known to Linux as tty1 to tty6. You need to log into each separately, so you can be several users at once which is why systemd calls this multi user. I tend to set tty6 as root.

By the way, the consoles are always available. Using a console in graphics mode (ctrl-alt-fN again) does not save the cpu so much, as your shiny desktop is still running in the cpu, even if the GPU is taking a rest. Depending on the flavour of Linux, Ctrl-Alt-F7 or Ctrl-Alt-F8 gets the gui back, when it is available.

When you want the graphics to restart, the preferred method is

sudo systemctl isolate gr<tab>


Test this tip outside of the challenge, and make sure your internet connection survives -- I have found that wifi in particular can disappear along with the graphics. This happens because distro devs assume you don't want wifi while logged out from your gui, so wifi on / off is run from a system tray task.

In extremis, if you have tasks waiting to report and there is no connection, reboot. Boinc will only lose a small amount of uncheckpointed work.

OK - hope these tips are helpful to someone. Tips for fellow Linux users. Some of these also apply in prinicle on Windows (but the commands would be different ;)

1. Do not leave monitoring programs running. BoincMgr and top, for example repeatedly poll the client, or the kernel, to check progress. This can lose you a percent or two from your performance, not so much for the actual cpu time but because of the disruption to the cache. If the OS reschedules the threads in different cores, then the core-specific caches are both/all disrupted.

I have measured this effect using the genefer estimated completion times.

2. To see the output from top, start it with this command line
top -d 3600 -u boinc

This makes top run once an hour, reducing its impact. If you want an update earlier, press the space bar.

3. To see the time estimates and other output from a currently running task, find out its pid using top, then run

sudo less /proc/<pid>/fd/2


I find this easier than trying to find the sdterr in the correct slot. Of course you can use cat tail or grep on the same file too. DO NOT use tail -f (see 1 above)

4. The low impact way of seeing your tasks progress is from the command line

boinccmd --get_tasks


5. Turn off graphics entirely and use "consoles" rather than "terminals". This may be of special interest to GPU users.

A terminal is a cli window running in a graphics environment. A console is a text mode use of the full screen. To turn off graphics under systemd run

sudo systemctl isolate mult<tab>


where <tab> is the tab key of course. It may take a few moments for bash to complete the line - don't press return till it has done so. (I always use tab completion because I can never remember the exact names of the target units.)

Whilst in console mode, you can still multi task. Ctrl-Alt-F1 to Ctrl-Alt-F6 give you six different consoles, known to Linux as tty1 to tty6. You need to log into each separately, so you can be several users at once which is why systemd calls this multi user. I tend to set tty6 as root.

By the way, the consoles are always available. Using a console in graphics mode (ctrl-alt-fN again) does not save the cpu so much, as your shiny desktop is still running in the cpu, even if the GPU is taking a rest. Depending on the flavour of Linux, Ctrl-Alt-F7 or Ctrl-Alt-F8 gets the gui back, when it is available.

When you want the graphics to restart, the preferred method is

sudo systemctl isolate gr<tab>


Test this tip outside of the challenge, and make sure your internet connection survives -- I have found that wifi in particular can disappear along with the graphics. This happens because distro devs assume you don't want wifi while logged out from your gui, so wifi on / off is run from a system tray task.

In extremis, if you have tasks waiting to report and there is no connection, reboot. Boinc will only lose a small amount of uncheckpointed work.

OK - hope these tips are helpful to someone.
____________
My computers found:

9831*21441403+1 is a quadhectokilo prime prime, ie >400,000 digits ;)

252031090528237591 + 65521*149*23*19*17*13*11*7*5*3*2*n is prime for every n in { 0..20 } (an arithemtic progression of 21 primes)

Post to thread

Message boards : Number crunching : Tips for Linux - squeezing a few more percent

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2019 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 1.70, 1.90, 1.93
Generated 24 Mar 2019 | 19:56:34 UTC