2

Before when I ran a Folding@Home client and now when using BOINC they always used "idle" cpu time (for those of you unfamiliar with those programs they run huge scientific calculations on your computer, so very intensive). However I noticed that in both Windows and in Linux trying to do other things (Firefox, programming in Netbeans, etc) all those programs are extremely slow.

Now I know you can do things like only running the clients on 2 or 3 cores (assuming 4 core system) but I'm more interested in why this "idle" cpu time would cause programs with normal priority to slow down. Wouldn't a process with normal priority run first before the process with idle priority, interrupting it if necessary? Why is it difficult for OS's to manage this?

1
  • Note I'm not really sure what to tag this.
    – TheLQ
    Sep 10, 2011 at 17:54

2 Answers 2

4

Those programs aren't really running during "idle" CPU time, they are running as Low Priority processes. When an OS is running multiple applications, it's uses a process scheduler to determine which processes get access to the CPU and how often. This is called preemptive multitasking.

The scheduler uses process priorities to determine which processes get access to the CPU. A Normal Priority process will have priority in the scheduler over an Idle priority process, but the CPU is still being used and there's some overhead to context switching between threads and processes.

Because the CPU is now running at 100% all the time rather than having idle cycles available, it's not hard to imagine that some processes and interrupts could take longer than if the CPU was idle due to thread switching overhead.

Some of those programs have an option to actually stop running their process when the computer is in use. They do this by detected mouse or keyboard activity and disabling themselves for a certain period of time until the computer is determined to be idle again at which point they'll start back up. I would suggest looking at that option.

Another thing to point out is that when a CPU is idling is uses significantly less power than when in full use. So while you're programs are using "spare" CPU cycles, they can easily double the power consumption of your PC, costing you several dollars a month in electricity.

1

I just have to add some small things to Chris Thompsons answer, he already said the main part.

The power consumption and the effect on your electricity bill can really be significant, just to emphasize this a little more. Reasons why other programs can be affected by the additional low priority threads could be additional work when changing processes (cache and registers are actually in use now). And I/O operations could really have some influence too. Most of the work of these programs is only CPU intensive and that can be influenced by the process priority, but the additional I/O is hard to prioritize. And additional memory usage slows your system down too. If your memory is rather full, swapping may significantly lower your systems performance.

To elaborate on the power consumption: I found actual power consumption numbers for a Intel Core i7 Extreme Edition of around and over 300 Watts under heavy load. The newer Intel Core processors have some really nice power saving features which even allow the CPU to cut the power for different cores if they are idle. So I suppose you could use 150 to 200 Watts more if you always have such programs running. (Older numbers I found show 150+ Watts difference) But since I haven't found reliable numbers let's assume you use 100 Watts more (don't forget, that your cooling system has to work more too, if your CPU generates more heat) - this gives 100*24*30 = 72 kWh/month or 864 kWh/a if your PC would be running 24/7.

2
  • Please define significant, regarding electricity costs. I'm a bit dubious of that particular part of your answer.
    – e40
    Sep 10, 2011 at 21:53
  • I have a UPS connected to my system that measures current draw in wattage, so I can give exact numbers. On my AMD system (triple-core), with the computer running but not doing much (web browsing) I'm using about 150 watts. When I max out the CPU it jumps to about 240 watts. When I'm playing a video game, it'll go all the way up to 300+ watts (thanks to the GPU). The problem with running those programs is not just that they use more power when the computer is running, but you may find that you leave your computer running more often rather than sleeping or shutting it down. Sep 11, 2011 at 1:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .