Operating Systems > Linux and UNIX
Throttling
KernelPanic:
The reason I want to do this is I need some data for some work. To make my life more interesting I am going to gather the following data:
Get a whole bunch of systems with different Processor arch's. Run them at different loads (maybe 20% increments) for a set time period and record the temperature after this time.
It looks like I won't be able to do exactly what I was thinking of so I guess I will have to do something else, maybe survey real people...
Thanks for your help anyway.
voidmain:
Why didn't you say that from the start? I thought you were concerned about certain non-critical programs were taking up too much of the resources during critical times and you wanted to prevent them from doing so.
As per your specific tests you could write a simple C program that does nothing but loop and maybe perform a couple of frivolous calculations. Something that would take up 100% CPU (if you only want to test CPU that is). Then add a delay (usleep()) in the loop. You would actually want your program to take an argument so you could pass it how much delay you want. Varying this delay should vary CPU utilization from 100% down to near 0 depending on how much delay you use. Now I don't know how that would effect CPU temperature if any at all but it would be easy to do.
Would you like me to write something for you?
[ January 22, 2003: Message edited by: void main ]
KernelPanic:
quote:Originally posted by void main:
Why didn't you say that from the start? You could write a simple C program that does nothing but loop and maybe perform a couple of frivolous calculations. Something that would take up 100% CPU (if you only want to test CPU that is). Then add a delay in the loop. You would actually want your program to take an argument so you could pass it how much delay you want. Varying this delay should vary CPU utilization from 100% down to near 0 depending on how much delay you use. Now I don't know how that would effect CPU temperature if any at all but it would be easy to do.
Would you like me to write something for you?
[ January 22, 2003: Message edited by: void main ]
--- End quote ---
Since I havn't done any C for years that would be great :D
But, if you are too busy then feel free to leave it and I will get somebody else to do it or do it myself.
I was hoping to avoid having to write anything.
[ January 22, 2003: Message edited by: Tux ]
voidmain:
Well, so far I haven't had much success. I can get it to use all or none but not in between. So I did a little searching and found this page:
http://weather.ou.edu/~apw/projects/stress/
which looked extremely promising from a set of tools on this page:
http://ltp.sourceforge.net/tooltable.php
What I believe you are after is the combined user/system time to add up to a specific %. Even with this tool I was only able to get either 100 or 0. You might want to play around with it some more though and try various I/O, File, etc operations to see how this effects CPU utilization.
What I was hoping I could do (and think I still can very easily but am missing some critical element) is write a program that takes a parameter from 0 to 100 and loop, periodically checking the combined user/system time and adjusting accordingly. I figured this could be done by combining some tight looping with some waits/delays. I'll try and work on this some more as free time permits. If you find something that works for you let me know...
At least I can make my CPU fan switch on on my laptop.
[ January 22, 2003: Message edited by: void main ]
Navigation
[0] Message Index
[*] Previous page
Go to full version