Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > Team MacNN > FAH CLI and nice level

FAH CLI and nice level
Thread Tools
Dedicated MacNNer
Join Date: Jun 2003
Location: NY
Status: Offline
Reply With Quote
May 31, 2005, 10:42 AM
 
Hi,

I am trying to make FAH hog less CPU because since upgrading to 10.4, iChat doesn't take enough CPU to stay at a full 15fps. So I need to change the nice level of FAH. I am using the CLI in the crontab.

Someone knows how to use the nice levels in the command line?

Thanks.

PS: can someone confirm FAH is moving to BOINC?
     
Administrator
Join Date: May 2000
Location: California
Status: Offline
Reply With Quote
Jun 1, 2005, 08:07 AM
 
This is most likely a known problem with iChat in Tiger, rather than Folding. This AI article on the 10.4.2 update mentions the iChat problem several times.

To change nice levels after a process has been launched, use the renice command. Use 'top' to find the PID for the process(es) you are interested in. Then ...

renice -19 123 (resets PID 123 to max priority)
renice -10 123 (resets PID 123 to a high priority)
renice 0 123 (resets PID 123 to default priority)
renice 10 123 (resets PID 123 to a low priority)
renice 19 123 (resets PID 123 to minimum priority)

Notes:
• You have to be root to increase the priority of a process. Even if you had decreased the priority to a low level, you'd still need to be root to renice it back up to zero.
• The scale supposedly goes from -19 (max priority) to +20 (min priority), but I'm not sure if +20 works as expected under OSX. +19 definitely works, but some processes that I reniced to +20 seemed to be running at zero priority. This was under 10.2.8, so take it with a grain of salt. If it was broken under Jag, it most likely got fixed in later OSX versions.
• See "man renice" for a more complete explanation.

If you want to set priority when the process is launched, use the nice command. See "man nice" for all the details.
     
SciFrog  (op)
Dedicated MacNNer
Join Date: Jun 2003
Location: NY
Status: Offline
Reply With Quote
Jun 10, 2005, 11:12 AM
 
Thanks for the renice function.

Would you mind posting an example of the nice usage. Shell is not my forte.

I use a cron job: @reboot cd /Applications/Utilities/FAH5; ./fah5 -local -advmethods

Thanks!
     
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Jun 10, 2005, 12:10 PM
 
@reboot cd /Applications/Utilities/FAH5; /usr/bin/nohup /usr/bin/nice 20 ./fah5 -local -advmethods &
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:10 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2