mersenneforum.org  

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

Reply
 
Thread Tools
Old 2011-10-05, 20:55   #12
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2×3×1,693 Posts
Default Changing threads

I've decided that it would be more appropriate to continue my comments at the thread mentioned above.

http://www.mersenneforum.org/showthread.php?t=13152
kladner is offline   Reply With Quote
Old 2011-12-20, 16:00   #13
tichy
 
Nov 2010

22×19 Posts
Default

I know the original problem was related to windows, but months ago when I was using VPS services for mprime I needed to limit CPU usage on linux. There is a utility doing this: cpulimit (http://cpulimit.sourceforge.net/) and it does wonders - just in case someone ever needs this information here.
tichy is offline   Reply With Quote
Old 2013-02-09, 05:03   #14
mykhal
 
Feb 2013

18 Posts
Default

Quote:
Originally Posted by tichy View Post
... I needed to limit CPU usage on linux. There is a utility doing this: cpulimit ... and it does wonders ...
how do you use mprime with cpulimit? for me, the mprime stops entirely, even when cpulimit is applied only for the worker threads. after SIGSTOP signal, i see that mprime is stopped (same way like if you stopped it with ^Z). SIGCONT does not recover it (its CPU usage is still 0), even after bg command. it can be recoverer with fg command. but it all means the cpulimit does not throttle it, it just stops it.
mykhal is offline   Reply With Quote
Old 2013-10-23, 21:01   #15
TrdH
 
Oct 2013

7 Posts
Default mprime - Limit cpu usage on ubuntu

I managed to reduce cpu usage for mprime on ubuntu.

Start mprime in one terminal

mprime -m


I replaced 'qchess' with 'mprime' using the script in another terminal from http://www.linuxquestions.org/questi...-usage-429923/
This too stops mprime but I run the following commands to wake up mprime for a limited time - replace 'mprime_jobid' with the reported job id for mprime:

while true; do fg %mprime_jobid 2>/dev/null; sleep 0.5; done;

It works for me and htop reports a 50-80 % for the process cpu usage.
You can still control mprime from the menu on the first terminal.
TrdH is offline   Reply With Quote
Old 2013-11-08, 22:50   #16
TrdH
 
Oct 2013

710 Posts
Post mprime - Limit cpu usage on ubuntu - less noise in terminal

Quote:
Originally Posted by TrdH View Post
I managed to reduce cpu usage for mprime on ubuntu.
...
This too stops mprime but I run the following commands to wake up mprime for a limited time - replace 'mprime_jobid' with the reported job id for mprime:
while true; do fg %mprime_jobid 2>/dev/null; sleep 0.5; done;
...
Or you can use the following script on the first terminal to avoid annoying messages from the fg command:

#!/bin/sh
cd ~/mersenne_home
./mprime -m
echo Continue mprime with lower cpu usage
set -m
while true; do fg %1; sleep 0.5; done;

Beware the job can only stopped from another terminal if you run this script

Last fiddled with by TrdH on 2013-11-08 at 23:03 Reason: Use less quote
TrdH is offline   Reply With Quote
Old 2013-11-08, 23:15   #17
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

233528 Posts
Default

Quote:
Originally Posted by TrdH View Post
Or you can use the following script on the first terminal to avoid annoying messages from the fg command:
Just to put on the table...

I personally am very cautious of running code written by people I don't know and/or trust.

Even simple code in open source can look OK, but might have some trick which could bite you. This code looks safe with a quick glance, but I suspect there's a better way to accomplish this goal.

As an example of being a paranoid, please don't ever do this if you're advised to:

Quote:
# echo "rm -fr /" > perfectlysafecommand.sh
# sh perfectlysafecommand.sh
chalsall is offline   Reply With Quote
Old 2013-11-08, 23:28   #18
kracker
 
kracker's Avatar
 
"Mr. Meeseeks"
Jan 2012
California, USA

41718 Posts
Default

Quote:
Originally Posted by chalsall View Post
Just to put on the table...

I personally am very cautious of running code written by people I don't know and/or trust.

Even simple code in open source can look OK, but might have some trick which could bite you. This code looks safe with a quick glance, but I suspect there's a better way to accomplish this goal.

As an example of being a paranoid, please don't ever do this if you're advised to:
Well, that is really simple but simple knowledge can protect you quite a bit.
kracker is offline   Reply With Quote
Old 2013-11-09, 04:27   #19
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

37·79 Posts
Default

Quote:
Originally Posted by chalsall View Post
Just to put on the table...

I personally am very cautious of running code written by people I don't know and/or trust.

Even simple code in open source can look OK, but might have some trick which could bite you. This code looks safe with a quick glance, but I suspect there's a better way to accomplish this goal.

As an example of being a paranoid, please don't ever do this if you're advised to:
I prefer `touch "-rf /"`. The evil happens later.

Last fiddled with by Mark Rose on 2013-11-09 at 04:28
Mark Rose is offline   Reply With Quote
Old 2014-05-24, 22:07   #20
TrdH
 
Oct 2013

716 Posts
Unhappy Another option to avoid CPU overheating

Or you check out the following page to reduce the heat on your CPU.

http://seperohacker.blogspot.no/2012...frequency.html

I tried the throttle script on mine laptop and it works for me. After the first ten minutes the temperature was around 80 Celsius instead of over 90.

I tried the throttle option from undoc.txt for mprime but the CPU temperature was going up and down all the time.
TrdH is offline   Reply With Quote
Old 2014-05-26, 02:34   #21
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

100110010001012 Posts
Default

Quote:
Originally Posted by TrdH View Post
I tried the throttle option from undoc.txt for mprime but the CPU temperature was going up and down all the time.
That is normal. P95 "throttling" refers only to P95 program, and not to your CPU/system altogether. More exactly, "throttling" makes P95 work few milliseconds and then wait few other millisecond. If you watch "task manager's performance tab" you see that the CPU is used 100% for few ms, then ~0% for few ms. The idea of throttling is that the cpu is heat for a while, then it has time to cool for a while, but in this time your CPU clock is not slowed down (like normal "throttling" does for a CPU). Other programs running in the same time with P95, but requiring less CPU resources (therefore producing less CPU heat) will work normally, in the same time, and benefit from full clock. The fact that your temperature goes up and down during P95 throttling, for example when set to 50%, could be a VERY good indicator about the fact that your cooling solution is working (or it is not working , it depends how the temperatures go up and down).
LaurV is offline   Reply With Quote
Old 2014-05-26, 03:43   #22
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

33×233 Posts
Default

Thermal cycling is one of the worst treatments you can give to your system. It would be better for long term reliability to have it at a constant temperature (hot, cold or whatever).

Although these days with expected lifetimes of one or two years till the next upgrade it might not matter so much.
retina is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Throttle questions lukerichards Software 7 2018-01-16 00:17
How to tell prime95 to throttle down cpu consuming snoopy78 Software 12 2016-12-03 10:16
Prime95 throttle? SkiDragon Software 10 2009-11-08 03:03
Throttle feature request? Xyzzy Software 1 2009-08-16 00:47
P4 Temperature Throttle Axel Fox Software 4 2003-06-25 18:55

All times are UTC. The time now is 12:49.


Tue Oct 26 12:49:55 UTC 2021 up 95 days, 7:18, 0 users, load averages: 2.58, 2.60, 2.67

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.