Linux desktop sluggish over time

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Jun 8 18:57:54 UTC 2009


On Mon, Jun 08, 2009 at 01:46:05PM -0400, D. Hugh Redelmeier wrote:
> In general, on UNIX-like systems, when a process terminates, all its
> temporary resources are reclaimed by the system.

At least the ones it allocated itself directly from the OS.  Xlib
allocations don't qualify.

> Lennart mentioned earlier that X isn't always able to do this.  I
> don't know what resources may linger.

For example, if an application wants to allocate a bitmap if can call
the Xlib function XCreatePixmap, which allocates a bitmap (with storage)
on the X server and returns a pointer to it to the client.  THe client
can perform various operations with the handle to the pixmap, but it is
actually stored by the X server.  When done with it, the client should
call XFreePixmap to tell the server it is done with it, so that the server
can free the storage for it when there are no more users of it.  Of course
if the client doesn't do this, the X server may not know to clean it up,
unless it happens to also be vary careful to keep track of which X clients
own what pixmaps.  I don't think it does that though since nothing says
a client couldn't pass the pixmap to another client of the same server.

> If the problem is that the kernel has gotten into a bad state, that
> may not be recoverable.  In particular, once a system has gotten into
> an OOM (Out Of Memory) state, it can do odd things that are hard to
> fix (like killing critical daemons).

It is rather rare to see the linux kernel get into a bad state.  Given how
often restarting X solves any slowness issues, I would not consider the
kernel at fault.

> But we still don't have a clue why the system is sluggish.  We don't
> even know if the cause is resource exhaustion.

It is almost always a lack of memory or a process spinning, and in almost
all cases that process is firefox or thunderbird.  In the past it was
sometimes kdeinit, but that seems to have gone away.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list