Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperate cpu options for active/idle #202

Closed
romw opened this issue Feb 3, 2015 · 6 comments
Closed

Seperate cpu options for active/idle #202

romw opened this issue Feb 3, 2015 · 6 comments

Comments

@romw
Copy link
Member

romw commented Feb 3, 2015

Reported by wwhite81 on 24 Nov 37393303 20:00 UTC
Idea: Being able to set the max cpu load separately for active and idle running the same way you can for memory usage settings. Would allow the user to change from idle to cpu intensive tasks where max load causes issues without having to change the max load manually each time, with the chance to forget to ramp it back up once done and waste cpu time.

Migrated-From: http://boinc.berkeley.edu/trac/ticket/203

@romw
Copy link
Member Author

romw commented Feb 4, 2015

Commented by Nicolas on 7 Mar 37393735 23:33 UTC
This is actually a core client issue; adding a visual way to change this from the manager is very simple stuff, but making the core client do something with the setting is the actual work.

@romw
Copy link
Member Author

romw commented Feb 4, 2015

Commented by Nicolas on 11 Jul 37428399 04:26 UTC
Keyword update

@romw
Copy link
Member Author

romw commented Feb 4, 2015

Commented by KSMarksPsych on 17 Sep 37436380 15:06 UTC
More fine-grained control over CPU usage (throttling and number in use) based on active/idle status has been suggested here.

@romw
Copy link
Member Author

romw commented Feb 4, 2015

Commented by evandro on 30 Jul 37436445 18:13 UTC
This option would come in handy when BOINC is run on production servers, typically SMP systems.

It's not a problem with Windows, which runs BOINC threads only when there's no other thread to run, but it is in Linux, and possibly in OSX too, which gives BOINC threads a fair amount of CPU in spite of their low priority (typically 5% in a loaded system), when running BOINC always costs something.

But this option would probably make more sense if how BOINC understands idle is changed. IIRC, BOINC considers only user interactivity to determine if a system is idle. This is probably fine with Windows because of the reason state above, but in Linux it would probably be a better option if in addition to user activity the system load were also considered to determine if other processes are running too.

Nevertheless, such a change would also make sense on SMP desktops, always becoming more and more common with the launch of multi-core processors.

I understand that there might be difficulties on implementing this depending on how many WU queues there are. If it's a single queue with the number of allowed CPUs determining how many can be active, it shouldn't be too hard. But if there are as many queues as allowed CPUs, it would be significantly harder.

One might say that it would suffice to limit the number of CPUs that BOINC can use in a production system, but then when the system is idling BOINC performance could be greater.

@romw
Copy link
Member Author

romw commented Feb 4, 2015

Commented by evandro on 25 May 37461364 19:06 UTC
Say, adding code to HOST_INFO::users_idle to detect the load-average according to the number of configured CPUs for BOINC:

# define LOADAVG_WIGGLE 0.5 // There are always some house-keeping background processes running in addition to BOINC applications.

inline bool light_load (time_t t) {
  double loadavg; // 1min system load average. 

  if (getloadavg (&loadavg, 1) == 1)
    return (loadavg < #configured BOINC CPUs + LOADAVG_WIGGLE);
  else
    return (true);
}

All Unix variations provide soemthing equivalent. Unfortunately, Windows doesn't; the closest thing being querying the run-queue length or using the expensive system performance counters.

@Ageless93
Copy link
Contributor

This looks like it's the same thing that's asked in #41, so closing this as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants