Thread 'CPU Clock Throttling'

Message boards : BOINC client : CPU Clock Throttling
Message board moderation

To post messages, you must log in.

AuthorMessage
Augustine
Avatar

Send message
Joined: 10 Mar 06
Posts: 73
Message 8901 - Posted: 19 Mar 2007, 20:57:19 UTC
Last modified: 19 Mar 2007, 20:59:31 UTC

The Linux CPU clock governor (powersaved) ignores processes running with the lowest priority, including project applications. However, because the client runs the benchmarks with normal priority, the benchmarks results are inflated relative to the applications, resulting in exaggerated credit claims and possible punishments by projects (e.g., WCG).

The benchmarks should rather run at the same priority as the applications in order to avoid such consequences.

This is done correctly for Windows (though its clock governor doesn't ignore processes at the lowest priority as Linux's does), but not for Linux. Thus, I propose this patch:
Index: cs_benchmark.C
===================================================================
RCS file: /home/cvs/cvsroot/boinc/client/cs_benchmark.C,v
retrieving revision 1.62.2.5
diff -p -u -w -p -u -w -r1.62.2.5 cs_benchmark.C
--- cs_benchmark.C      1 Mar 2007 16:10:08 -0000       1.62.2.5
+++ cs_benchmark.C      19 Mar 2007 20:55:40 -0000
@@ -223,6 +223,11 @@ void CLIENT_STATE::start_cpu_benchmarks(
         sprintf(benchmark_descs[i].filename, "%s_%d.xml", CPU_BENCHMARKS_FILE_NAME, i);
         PROCESS_ID pid = fork();
         if (pid == 0) {
+#ifdef HAVE_SETPRIORITY
+            if (setpriority(PRIO_PROCESS, 0, PROCESS_IDLE_PRIORITY)) {
+                perror("setpriority");
+            }
+#endif
             int retval = cpu_benchmarks(benchmark_descs+i);
             fflush(NULL);
             _exit(retval);

HTH



ID: 8901 · Report as offensive
ProfileKSMarksPsych
Avatar

Send message
Joined: 30 Oct 05
Posts: 1239
United States
Message 8908 - Posted: 20 Mar 2007, 3:54:22 UTC

You'll probably want to sign up for the developers email list and send it there.
Kathryn :o)
ID: 8908 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 8918 - Posted: 20 Mar 2007, 14:26:24 UTC

That's not correct, both the benchmarks and the science apps measure CPU time and not clock time.
ID: 8918 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 8925 - Posted: 20 Mar 2007, 16:32:56 UTC

On Windows, any CPU-intensive program running on a priority above 'Normal' will make the whole computer hang until said program stops using CPU.
ID: 8925 · Report as offensive
Augustine
Avatar

Send message
Joined: 10 Mar 06
Posts: 73
Message 8927 - Posted: 20 Mar 2007, 16:45:05 UTC - in response to Message 8908.  

You'll probably want to sign up for the developers email list and send it there.

OK, I posted the patch here.

Thanks.

ID: 8927 · Report as offensive
Augustine
Avatar

Send message
Joined: 10 Mar 06
Posts: 73
Message 8928 - Posted: 20 Mar 2007, 16:46:02 UTC - in response to Message 8925.  

On Windows, any CPU-intensive program running on a priority above 'Normal' will make the whole computer hang until said program stops using CPU.

Indeed. Windows' scheduler allows a process to starve others from CPU time.

Thanks.

ID: 8928 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 8942 - Posted: 21 Mar 2007, 3:52:33 UTC - in response to Message 8934.  

On Windows, any CPU-intensive program running on a priority above 'Normal' will make the whole computer hang until said program stops using CPU.


Nope... never noticed any effect on the computers responsiveness with BOINC.....maybe windows 98

Exactly, because BOINC correctly sets the science applications to LOW. I said that's what happens on a Windows computer if there is anything CPU-intensive above the level 'Normal'.
ID: 8942 · Report as offensive

Message boards : BOINC client : CPU Clock Throttling

Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.