[clug] what passes for entertainment...

Jim Croft jim.croft at gmail.com
Sat Jun 27 05:00:15 GMT 2009


Thanks Hal - I never really noticed this until I quadrupled the RAM
from 0.5Gb to maxing out the MB at 2Gb.  The system started to really
cruise and I figured that because I was not asking it to do any
significant work the cores were playing with each other out of
boredom: my turn... your turn...  my turn... your turn... weeeee....

The alternating load pattern only kicks in when you are doing nothing,
just looking... as one does...   As soon as you do something
(move/resize a window), the cores seem to know there is serious
business afoot, stop playing and apply themselves to the task...  when
the heavy lifting is done they go back to playing with themselves: my
turn, your turn, weeeee...  computers can be so cool...  (note to
self: refill prescription on Monday...).

Minimizing the priority as you describe made no noticable difference
(maximizing it, on the other hand, blows away the system monitor
process) - the action oscillates around a c. 15% mean load at rest.
It is not a problem and the system is working fine... just curious is
all...

yep - gnome system monitor... best game app ever...

jim

On Sat, Jun 27, 2009 at 1:36 AM, Hal Ashburner<hal.ashburner at gmail.com> wrote:
> 2009/6/26 Jim Croft <jim.croft at gmail.com>
>>
>> bored out of my brain, watching the gnome system monitor to pass the
>> time...  as one does...
>>
>> twin core cpu...  two thin lines...  up and down...  up an down...
>>
>> ah ha...  a pattern!  when one goes up, the other goes down...
>> cool... a cpu playing with itself...
>>
>> does it actually mean anything?  is it controllable?  can or should
>> this be influenced?
>>
>> jim (contemplating loading another OS just to watch a disk defragment)
>
> Why would one go up when the other goes down?
> I reckon what you have is a whole bunch of processes running, only one of
> which really needs to use the cpu. It gets scheduled on the first, the usage
> graph spikes, then it sleeps as it doesn't need the cpu for a bit, something
> else then gets scheduled, one of the many processes that doesn't actually
> need much cpu, cpu 2 is switching between many such process until it has
> your cpu intensive process scheduled on it for a burst until it sleeps.
> What process would that be?
> I'm betting gnome system monitor.
>
> What happens if you switch to the "Processes" tab
> Right click "gnome-system-monitor"
> change the priority to very low (push the slider all the way to the right)
>
> how about if you close everything you can? web browser, email client,
> terminals. If you want to go further work out how to close nautilus so it
> won't come back etc. You can probably kill them using the "Processes" tab.
> If you run gnome-system-monitor from a twm session this might be the easiest
> way to achieve it.
> If you've got more than one partition mounted, unmount something that isn't
> / and run fsck on it and see if that affects things.
> How about running a good old fashioned busy loop?
> file busy_loop.c :
>
> int main (int argc, char **argv)
> {
>     while (1) {}
>     return 0;
> }
>
> compile with
> $ gcc -Wall busy_loop.c -o busy_loop
> run with
> $ ./busy_loop
>
> is this different if we update it to sleep every now and then?
>
> #include <time.h>
>
> int main (int argc, char **argv)
> {
>     struct timespec timeout;
>     timeout.tv_sec = 0;
>     timeout.tv_nsec = 99999;
>     while(1) {
>         int i;
>         for (i = 1; i < 1000000; ++i) {
>               if ( i % 100000 == 0) {
>                   nanosleep(&timeout, NULL);
>               }
>         }
>     }
>     return 0;
> }
>
> Lots of fun you can have playing with system monitors. :D

-- 
_________________
Jim Croft ~ jim.croft at gmail.com ~ +61-2-62509499 ~
http://www.google.com/profiles/jim.croft

... in pursuit of the meaning of leaf ...


More information about the linux mailing list