Re: why swap at all?

From: Valdis . Kletnieks
Date: Tue Jun 01 2004 - 15:05:43 EST


On Tue, 01 Jun 2004 21:53:32 +0200, FabF said:

> I was thinking about some rule e.g. any process using libX* isn't
> swapped to disk until OOM ...

Odd.. some of the processes that I'd want kept in memory use libX*,
but others that also use it are at the top of my list of things to migrate
out (unlike some, I don't mind if Mozilla or OpenOffice end up out on
disk after extended inactivity - but if my window manager gets swapped
out, I get peeved when focus-follows-mouse doesn't and my typing goes
into the wrong window or some such... ;)

And that rule doesn't even help much - as it will cause at least some X
servers themselves to get swapped out. Here's the list for my X server
at the moment, as reported by lsof:

X 13886 root txt REG 254,1 1960870 1966 /usr/X11R6/bin/Xorg
X 13886 root mem REG 254,5 105700 12388 /lib/ld-2.3.3.so
X 13886 root mem REG 254,5 50944 12530 /lib/libnss_files-2.3.3.so
X 13886 root mem REG 254,1 64040 1347 /usr/lib/libz.so.1.2.1.1
X 13886 root mem REG 254,5 212972 53335 /lib/tls/libm-2.3.3.so
X 13886 root mem REG 254,5 28008 12513 /lib/libpam.so.0.77
X 13886 root mem REG 254,5 15008 12471 /lib/libdl-2.3.3.so
X 13886 root mem REG 254,5 8332 12515 /lib/libpam_misc.so.0.77
X 13886 root mem REG 254,5 29660 12511 /lib/libgcc_s-3.3.3-20040413.so.1
X 13886 root mem REG 254,5 1451868 53258 /lib/tls/libc-2.3.3.so
X 13886 root mem REG 254,1 647652 32015 /usr/X11R6/lib/modules/extensions/libglx.so.1.0.5341
X 13886 root mem REG 254,1 4954876 8362 /usr/lib/tls/libGLcore.so.1.0.5341

Nope, no libX* here... ;)

It's a lot harder than it looks, which explains why we haven't gotten it right
yet...

Attachment: pgp00000.pgp
Description: PGP signature