More controls over how the CPU is used

Message boards : Number crunching : More controls over how the CPU is used

To post messages, you must log in.

AuthorMessage
Tom

Send message
Joined: 8 Oct 06
Posts: 8
Credit: 1,533,336
RAC: 0
Message 68751 - Posted: 5 Dec 2010, 16:39:07 UTC

I'd like to see the ability to set when BOINC could use 100% of the CPU.

Right now, during normal usage of the computer I have to turn BOINC back to use only 30% of the CPU for the computer to remain semi-responsive. I've got it running on all eight processors (four of which are HyperThreaded processors, Core i7). At night I'd like to have it use 100% of the processors but during the day be at 30%.
ID: 68751 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tom

Send message
Joined: 8 Oct 06
Posts: 8
Credit: 1,533,336
RAC: 0
Message 68752 - Posted: 5 Dec 2010, 16:43:20 UTC

Well, I seem to have been able to find some kind of compromise here.

I set it to use 100% of only four processors. That makes it so that the computer still remains responsive but again, that feature request I was talking about before come up again.

At night I'd like to have it use 100% of the CPUs in the computer but during the day when I use the computer back it off to 50% of the CPUs.
ID: 68752 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Murasaki
Avatar

Send message
Joined: 20 Apr 06
Posts: 303
Credit: 511,418
RAC: 0
Message 68756 - Posted: 5 Dec 2010, 20:55:21 UTC
Last modified: 5 Dec 2010, 20:57:49 UTC

If responsiveness is the problem then you may want to try playing around with the memory settings and leave the CPU at or near to 100%. In theory BOINC should release the processor almost immediately, so it is usually the effort of clearing the active RAM into the swap file that makes responsiveness sluggish.

If you don't mind experimenting a little, try setting your CPU at 100% and your memory setting to 50% when in use and close to 100% when idle. If that allows you to carry out your normal working with reasonable responsiveness then you can try upping the memory limit until you find the maximum level you can cope with. By having at or near 100% of the memory when idle the CPU should run at full capacity at night.
ID: 68756 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Mod.Sense
Volunteer moderator

Send message
Joined: 22 Aug 06
Posts: 4018
Credit: 0
RAC: 0
Message 68757 - Posted: 6 Dec 2010, 15:01:00 UTC

Looks like both of Tom's 8-core machines have 6GB of memory. So memory contention is indeed the likely cause of noticing that BOINC is running at all. By limiting the memory that BOINC is allowed to use rather then the CPU, BOINC will likely get more work done overall then a strict time of day and CPU limit.

Another setting that hasn't been mentioned yet is the threshold for when BOINC should stop running everything. When you have 8 CPUs, it may be overkill to end everything, but there is a setting that says if your machine gets busier then xx% of CPU doing other work, then BOINC should step out of the way until the CPU utilization returns to under the threshold you set.
Rosetta Moderator: Mod.Sense
ID: 68757 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tom

Send message
Joined: 8 Oct 06
Posts: 8
Credit: 1,533,336
RAC: 0
Message 68760 - Posted: 6 Dec 2010, 17:08:14 UTC

Any suggestions on which settings for memory and CPU threshold I should try?
ID: 68760 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Profile Chris Holvenstot
Avatar

Send message
Joined: 2 May 10
Posts: 220
Credit: 9,106,918
RAC: 0
Message 68761 - Posted: 6 Dec 2010, 18:04:50 UTC

I'm not sure, but I think that the original poster can do exactly what he wants - the area that is not completely clear in my mind has to do with Windows and not BOINC or Rosetta.

Just about anything you can do through the BOINC manager GUI, can be easily accomplished using a standard line command. On my Linux / Unix systems this is accomplished using the "boinccmd" command.

Now, and this is the point where things are a little foggy for me, Linux / Unix has a facility called cron which can be used which can be used to schedule a command to execute at a specific time of day.

I think that windows has a similar facility - its been a long while since I have dinked with a Windows system but I seem to remember being able setup tasks like defrag and back up to run at a specific time.

Once you locate that capability on your Windows system you should be able to set up a simple batch file to do the dirty work for you. If you need a function that is not supported by "boinccmd" then you may find happiness by creating and saving preference xml files, using the batch file to swap them out and then do an update.

Someone who has a Windows system want to fill in the gaps in my knowledge?

ID: 68761 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Mod.Sense
Volunteer moderator

Send message
Joined: 22 Aug 06
Posts: 4018
Credit: 0
RAC: 0
Message 68762 - Posted: 6 Dec 2010, 18:09:21 UTC

I would suggest a zero CPU threshold (which means no control, BOINC will not ever totally suspend everything due to CPU). If you had some application such as movie reduring or something where you did have periods of 75-100% CPU devoted to other tasks, then I might put it to 70-85%, but you haven't mentioned any such workloads.

Memory, you have 6GB for 8CPUs. I'll go with Murasaki's suggestion of 50% while the machine is in use, but I'd suggestion 90% rather then 100% when the machine is idle. Could be superstition on my part, but I feel that helps me get back up and running after lunch break etc. You will want to assess this once and a while. If the machine starts to feel sluggish, then go lower, 5 or 10% at a time. If things feel OK for your usage, but you see BOINC routinely not running 8 active threads (you should see some tasks with a status of "waiting for memory") you might ratchet it up 5-10% at a time to try and get more throughput.
Rosetta Moderator: Mod.Sense
ID: 68762 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Mod.Sense
Volunteer moderator

Send message
Joined: 22 Aug 06
Posts: 4018
Credit: 0
RAC: 0
Message 68763 - Posted: 6 Dec 2010, 18:13:39 UTC

Chris, what are you suggesting be done with boinccmd? Suspending execution? In general boinccmd would be a very hands-on approach. We should be able to achieve the desired result with the memory configuration. Unless, of course, you had something more in mind.
Rosetta Moderator: Mod.Sense
ID: 68763 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Profile Chris Holvenstot
Avatar

Send message
Joined: 2 May 10
Posts: 220
Credit: 9,106,918
RAC: 0
Message 68764 - Posted: 6 Dec 2010, 18:28:13 UTC

Previously mod.sense said:

In general boinccmd would be a very hands-on approach.


I'm not sure if I agree with you - once the necessary sequence of commands were put into a batch file(s) and the batch files setup to run at a specific time of day, it should be "hands off"

If boinccmd will not allow you to directly alter max memory usage then you should be able to swap out your global_prefs_override.xml using the batch file and then cause it to be read using boinccmd.

The global_prefs_override.xml should allow you to play with the ram_max_used_busy_pct and the cpu_usage_limit parameters.

But you could be right - this could be a little like using a thermonuclear weapon to kill the roaches in your kitchen.

ID: 68764 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Mod.Sense
Volunteer moderator

Send message
Joined: 22 Aug 06
Posts: 4018
Credit: 0
RAC: 0
Message 68765 - Posted: 6 Dec 2010, 20:03:11 UTC

Ah! Now I see. You are suggesting that one could even modify memory (and other) preferences on a scheduled basis. Your .bat would be something like "it's 7PM, copy after hours preferences to active override file, do boinccmd to refresh with new preferences". Then in the AM, copy a daytime preferences file and have BOINC refresh the preferences again.

But I think the one setting for when the machine is in use and another for when not in use would actually be more flexible in the end. Because it doesn't depend upon having a consistent schedule on how the machine is used. It should just be a matter of dialing in the percentages to where you don't notice that BOINC is running.
Rosetta Moderator: Mod.Sense
ID: 68765 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Profile Chris Holvenstot
Avatar

Send message
Joined: 2 May 10
Posts: 220
Credit: 9,106,918
RAC: 0
Message 68772 - Posted: 6 Dec 2010, 21:09:23 UTC

The light bulb popped on and Mod.Sense said:

Ah! Now I see ...


I think we are on the same page now - cron and the Windows equivalent can be used to tune BOINC on the fly.
ID: 68772 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
mikey
Avatar

Send message
Joined: 5 Jan 06
Posts: 1895
Credit: 9,178,626
RAC: 3,201
Message 68779 - Posted: 7 Dec 2010, 11:59:14 UTC - in response to Message 68760.  

Any suggestions on which settings for memory and CPU threshold I should try?


Try putting zero on the line in the Boinc Manager, Advanced preferences, processor usage tab where it says:
' What processor usage is less than [___] percent (0) means no restriction'

This means Boinc will run all the time doing it own slowdown thing as your pc does its thing but never actually stopping for long periods of time. This can be a bad thing IF you use your pc and DO IN FACT want something to take precedence over Boinc and for Boinc to actually stop crunching when some other program is running. If you have a problem try setting it between zero and the default of 25. As for memory usage I have my laptop set to use 75% of memory when the computer is in use and 90% when the pc is idle. I have a dual core laptop with Boinc only using one core and it is very responsive and my wife stopped complaining!
ID: 68779 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote

Message boards : Number crunching : More controls over how the CPU is used



©2024 University of Washington
https://www.bakerlab.org