[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Mem and net modules soaking up cycles.

On Tue, 4 Apr 2006 10:32:56 +1000
David Seikel <onefang@gmail.com> wrote:

> The mem and net modules slowly soak up the CPU cycles.  I've been
> playing with it for hours, here is my findings, speculation, and wild
> ramblings.
> First, and most importantly, it's a very slow process.  CPU will start
> at one percent, and slowly creep up to ten percent over an hour.  I
> tracked it as high as 14 percent once.  As far as I can tell, it will
> just keep increasing CPU usage until it gets to 100 percent.  I'll
> leave it running when I sleep to check if it maxes out.
> All other modules where unloaded, except the cpu module.  All other
> activity was kept to a minimum.  I sat there for hours doing nothing
> but watching the meters.  Desklock can't be disabled entirely, but
> moving the mouse a little bit every now and then keeps it at bay.  All
> meter modules where stretched across my 1024 x 768 monitor, set to 128
> pixels high, and updating once a second.
> The problem only occurs when the graphs are turned on.  Having text
> turned on or not made no difference.  There doesn't appear to be any
> difference once the graphs reach the edge of the screen, the CPU usage
> kept growing.
> Once the graphs where turned off, either through the modules config
> dialog, or disabling the modules, then CPU usage returned to one
> percent.
> The problem appears most in mem, net had the same problem, but
> increased much slower.  The cpu module didn't display the problem at
> all.  mem and net look more like each other than cpu, so I started
> going through the differences between cpu and mem.
> At first I thought that since I only have one cpu, the cpu module is
> different coz the others do two graphs (cpu module does one graph per
> cpu).  Disabled the code making the extra graph.  No change.
> I noticed some differences in the .edc, so I made the mem one look
> more like the cpu one.  Made the mem module look much better, but
> otherwise no change.  
> Since I have bugger all bandwidth, I suspected that the net graph
> might not be soaking those cycles coz it's not moving as many pixels
> compared to mem.  Clutching wildly at straws, I hard coded both the
> memory and swap used to 100 percent, thinking that it might soak
> cycles much faster.  No change.
> I did notice one thing, it may or may not be related.  The second
> graphs on mem (swap) and net (Tx) where acting strangely.  The maximum
> length of each of those seemed to move to the right at the same speed
> as the graph itself moved to the left.  You don't notice anything
> until the graph gets halfway across the screen, then the moving
> section starts to get shorter, leaving either old lines, or blankness
> behind.  You have to see it to see what I mean.  There is nothing
> obvious in the code to explain this.
> It could be some subtle difference between cpu and mem/net modules.
> It might be something totally unrelated elsewhere.
> It's way past my bed time, so I'll pass the baton to devilhorns, and
> check in when I awake.  Hope the above is helpful, and that I didn't
> miss reporting anything.

I noticed this a few days and talked to devilhorns about it. He tested
it out, but didn't find anything. I've ran some more tests since then,
and it is almost definitely the graphs leaking memory. Having one of
cpu, net, and mem leaks slowly, two more quickly, and three within
about an hour or so. Disabling the graphs makes the issue disappear.