Periodic burst 100%-0% cpu usage - is it harmful for CPU?

Lapsio

Reputable
Nov 24, 2014
23
0
4,510
I'm participating in BOINC platform and I've assigned quite high fraction of my CPU power to it (70%) for renderfarm.fi / BURP. But while I don't really feel this load (linux handles busy cpu quite well) I can really hear it on CPU fan which going loud / quiet / loud / quiet / loud... every 1 sec. I'm not sure if it isn't harmful for CPU. I don't care about CPU fan it's cheap, loud, sucks anyways and can be replaced but I wouldn't be really glad if my i7-2600K would die because of weird BOINC CPU policy. Well it's 4 years old CPU I wouldn't like to "benchmark" its reliability 356 days in year...

CPU usage graph looks like this:
z31.png
 
Solution
Yup, it's completely normal for CPUs to throttle. What ends up happening is that, by default, only one core wants to be used -- this results in a higher clock speed and translates into more power consumption. By the same token, when multiple cores begin to be utilized, the CPU's frequency starts to vacillate in an odd fashion. If you understand multithreading programming concepts in C++, the following code will make sense to you:

(pulled from https://github.com/BOINC/boinc/blob/master/client/app.cpp , 9 September 2015)
Code:
    // Initialize diagnostics framework for this thread
    //
    diagnostics_thread_init();

    while (1) {
        client_mutex.lock();
        if (gstate.tasks_suspended
            ||...

itmoba

Reputable
Aug 14, 2015
768
0
5,360
Yup, it's completely normal for CPUs to throttle. What ends up happening is that, by default, only one core wants to be used -- this results in a higher clock speed and translates into more power consumption. By the same token, when multiple cores begin to be utilized, the CPU's frequency starts to vacillate in an odd fashion. If you understand multithreading programming concepts in C++, the following code will make sense to you:

(pulled from https://github.com/BOINC/boinc/blob/master/client/app.cpp , 9 September 2015)
Code:
    // Initialize diagnostics framework for this thread
    //
    diagnostics_thread_init();

    while (1) {
        client_mutex.lock();
        if (gstate.tasks_suspended
            || gstate.global_prefs.cpu_usage_limit > 99
            || gstate.global_prefs.cpu_usage_limit < 0.005
            ) {
            client_mutex.unlock();
//            ::Sleep((int)(1000*10));  // for Win debugging
            boinc_sleep(10);
            continue;
        }
        double on, off, on_frac = gstate.global_prefs.cpu_usage_limit / 100;
#if 0
// sub-second CPU throttling
#define THROTTLE_PERIOD 1.
        on = THROTTLE_PERIOD * on_frac;
        off = THROTTLE_PERIOD - on;
#else
// throttling w/ at least 1 sec between suspend/resume
        if (on_frac > .5) {
            off = 1;
            on = on_frac/(1.-on_frac);
        } else {
            on = 1;
            off = (1.-on_frac)/on_frac;
        }
#endif

        gstate.tasks_throttled = true;
        gstate.active_tasks.suspend_all(SUSPEND_REASON_CPU_THROTTLE);
        client_mutex.unlock();
        boinc_sleep(off);
        client_mutex.lock();
        if (!gstate.tasks_suspended) {
            gstate.active_tasks.unsuspend_all(SUSPEND_REASON_CPU_THROTTLE);
        }
        gstate.tasks_throttled = false;
        client_mutex.unlock();
        boinc_sleep(on);
    }
    return 0;
}

The code above comes from the BOINC client (linked above). While you can't see it here, per se, there are places in the code on their GitHub repository suggesting that sometimes a "soft" operation is used in place of an atomic operation. I suggest you download and build the client yourself, as doing this will allow you to tweak the build so that it runs better on your machine.
 
Solution
It's not going to be harmful to the cpu. The cpu usage reported in terms of % used is in processor time, not how much it's working in terms of only running at 25% speed if cpu usage shows 25%. A cpu is either on/off. How long it's on or off determines the 'usage %'.

http://blogs.technet.com/b/winserverperformance/archive/2009/08/06/interpreting-cpu-utilization-for-performance-analysis.aspx

Cpus can increase or decrease heat output almost as rapidly as they're activated, unlike a stovetop burner which takes a good amount of time to warm up to its full heat potential. Because the cooling fan is set to spin faster at a set temp, as that temp reported rapidly fluctuates so will the fan speed. That's why you're hearing the fan speed up and slow down cycling so rapidly. It's also because of the cooler, a smaller less capable cooler completely dependent on the fan to run full out to cool down the cpu will cause it to run hard and heavy. Compared to a larger multifan cooler which can continue to effectively handle the heat output without ramping up the fans so hard or often. The smaller cooler working frantically will make it sound like the cpu is under more stress than say a large dual fan noctua cooler like the nh-d14 that sits there purring along as if it's idling - and yet in both cases the cpu is being stressed no more or less.