Changing CPU usage time every second (via script)?

Message boards : Questions and problems : Changing CPU usage time every second (via script)?
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile äxl
Avatar

Send message
Joined: 13 May 10
Posts: 40
Germany
Message 60714 - Posted: 6 Mar 2015, 19:14:21 UTC

Hi, I've written a BASH script to change CPU usage time according to CPU temperature. It can be found here: http://boinc.berkeley.edu/dev/forum_thread.php?id=9355
This is v0.01 - I could upload v0.1 somewhere if someones interested.

Having set this to update every two minutes this is running since a year now without problems. Sometimes i. e. when I play a flash video or a web site has many scripts temperature and thus fan speed still increases too much. Is it okay to set the update time to 1 second and usage change to 5% or will this f**k up my results?
My reasons to participate in grid computing:
1. I'm using true renewable energy (German accreditation; no certificate purchasing)
2. Production and disposal (will) amount to about 95% of the energy "used" during the lifetime of my PC
3. Helping
ID: 60714 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 801
Finland
Message 60731 - Posted: 7 Mar 2015, 19:14:56 UTC - in response to Message 60714.  

Your tasks should be just fine. Different question is what BOINC will do if you change the CPU usage limit every second.

As you know BOINC does the throttling in 1+ second slices. For example, that 5% is 19 seconds off and 1 second on. Now, when you change the limit, does BOINC start with the on-cycle or off-cycle or does it continue the current cycle? It's possible you'll get BOINC either running all the time or not at all.
ID: 60731 · Report as offensive
Profile äxl
Avatar

Send message
Joined: 13 May 10
Posts: 40
Germany
Message 60758 - Posted: 8 Mar 2015, 20:34:13 UTC - in response to Message 60731.  

Interesting point. You say that it's possible that I could hit an on-cycle in every second. If nobody here can give me the answer then I guess this can only be figured out by studying source code or trial and error. I'll take the latter approach.

There's also the question if changing global_prefs_override.xml and running boinccmd --read_global_prefs_override will be fast enough. I'll try 3 seconds first.
My reasons to participate in grid computing:
1. I'm using true renewable energy (German accreditation; no certificate purchasing)
2. Production and disposal (will) amount to about 95% of the energy "used" during the lifetime of my PC
3. Helping
ID: 60758 · Report as offensive
Profile äxl
Avatar

Send message
Joined: 13 May 10
Posts: 40
Germany
Message 61115 - Posted: 21 Mar 2015, 14:29:22 UTC

I've set the interval of usage changes to 25 seconds and value of usage change to 4 %. This gives me quite stable output to the terminal.

Recent version and changes can be found here:
http://www.linuxquestions.org/questions/programming-9/bash-script-automatic-boinc-temperature-regulation-4175537439/
My reasons to participate in grid computing:
1. I'm using true renewable energy (German accreditation; no certificate purchasing)
2. Production and disposal (will) amount to about 95% of the energy "used" during the lifetime of my PC
3. Helping
ID: 61115 · Report as offensive

Message boards : Questions and problems : Changing CPU usage time every second (via script)?

Copyright © 2024 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.