[PLUG] Swap usage keeps increasing

Wil Cooley wcooley at nakedape.cc
Fri Mar 26 14:20:02 UTC 2004


On Fri, 2004-03-26 at 12:20, Jeme A Brelin wrote:

> I didn't read this thread from the top, but did someone explain exactly
> what the "VIRT" column is showing?  It ain't swap, that's for sure.

Nope.  VIRT (or VSZ or SIZE) is the amount of memory mapped, regardless
of whether the page is read-only, shared, etc.  Basically, any memory
that could possibly be used by the process without malloc() or brk().
And don't confuse shared memory with SHM, also called shared memory but
is really an IPC mechanism.  Memory is a remarkably complex topic; I've
been reading Kernel Traffic for several years and it's always amazing
how complex it is.

> On my system, X is shown with 107m in the VIRT column, but I don't have
> any swap.
> 
> jbrelin at person:~$ free
>              total       used       free     shared    buffers     cached
> Mem:       1032816    1018408      14408          0     160840     663760
> -/+ buffers/cache:     193808     839008
> Swap:            0          0          0
> 
> 
> > The amount of resources that X uses depends on your Window Manager.
> 
> Uh... how's that work?  My window manager is its own process and I can't
> see how it could change the running size of the X server process.

Think about it like a print server.  When you want the print server to
print something, you send it a document and it renders it into something
the printer can understand and sends it to the printer.  The X
client/server model is similar--except for a continuous display model
things get hairier.  If I understand it correctly, it's possible for an
X client to tell the server to keep certain objects around even if they
aren't visible.  Plus there's stuff the X server or window manager
handles on its own, like backing store.  (Is backing store the same as
'save unders'?)  Oh, and fonts are cached server-side too.

Wil
-- 
Wil Cooley                                 wcooley at nakedape.cc
Naked Ape Consulting                        http://nakedape.cc
* * * * Linux, UNIX, Networking and Security Solutions * * * *
*   Naked Ape Consulting                 http://nakedape.cc  *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20040326/e56da5b1/attachment.asc>


More information about the PLUG mailing list