[kde-solaris] more swap space mysteries: hunting for missing memory

Roman Maeder maeder at mathconsult.ch
Thu Jan 29 16:58:34 CET 2004


in connection with the ongoing discussion about virtual memory use of
KDE (3.1.4) under Solaris (8), I found another significant contribution to
memory (swap space) usage. I noticed that the space used in /tmp, which
was mounted from swap, was much more than the sum of all files therein.
Right now, after starting KDE, I have

csh> df /tmp
Filesystem            kbytes    used   avail capacity  Mounted on
swap                 2368024   87120 2280904     4%    /tmp

but

csh > du -s /tmp
1224    /tmp


so where are those missing 80plus megabytes? I saw this number go up
higher during a long KDE session, up to 160MB. Doing "lsof /tmp" showed
interesting lines, such as 

Xsun      17186 maeder  txt   VREG    0,2  4194304 11852668 /tmp (swap)
Xsun      17186 maeder  txt   VREG    0,2  4194304 11872540 /tmp (swap)
kdeinit   17277 maeder  txt   VREG    0,2  4194304 11872540 /tmp (swap)
...

A text segment in /tmp?? But then I realized: this is the shared memory for
Xsun enabled via the setting

export XSUNTRANSPORT="shmem"
export XSUNSMESIZE=4096

in the startkde script. Those 4194304 bytes are exactly 4096kB, and there
are at least 16 of those -> 65MB

The default segment size for Xsun is 64kB. I wonder whether this
4096kB setting isn't a bit much. Anyway, if you are short on swap space,
you might want to play with it.

Roman Maeder



More information about the kde-solaris mailing list