Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Thursday 2007-09-20 at 06:41 -0500, David C. Rankin wrote:
Ok,
Now I'm confused... After all of the discussion about ram size/swap
size, I decided to try and make my 1G Toshiba P35 laptop start swapping
stuff to the swap file.
I opened everything I could think of, 4 konsoles, 2 Open Office files,
3 Gimps, 2 Firefox, 2 Kongueror, Kjot, knotes, ksnapshot, kstars,
Amarok, Thunderbird and several more, but the memory required, as shown
by top, *never* exceeded 1G. The more I would open, the more slight
slowness would occur, but I *always* had 13k - 15k of memory left and
*nothing* was ever written to the swap file.
It probably was taken from the memory used for buffers. The command
'swapon -s' will also tell you the used swap and where.
Just suspend the machine to disk, and get back: you will see that many
things will remain swaped out. The computer is slow right after waking up,
because needed things are not in ram and have to be read from disk. After
a while, it is faster than before because it has got ridden himself of
useless chunks in memory that has ben swapped out.
- --
Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFG8mAitTMYHG2NR9URAtbJAJ9zCiBhVmz9xFgffw+9XOMgNx3i2QCfdnkH
dB1qyS8tmsi/jjbz58/Tg8c=
=b6v9
-----END PGP SIGNATURE-----
I have been avoiding this thread, because the answer is too long. For
optimal performance, the kernel pre-allocates buffers and caches. It
steals from these buffers and caches as it needs memory for
applications. As for application memory usage, Linux does not keep all
of the application in memory. Virtual memory is the memory map of an
application. The physical memory only contains those pages in use by the
application. Thus, if you run a command like top, you will see the
virtual size and the resident size. As for swap space, the kernel only
needs to send the anonymous memory pages of an application to swap
space, the text (code) can be retrieved from the disk file for the
application.
The kernel attempts to keep a certain percentage of memory as free, to
avoid running out of memory. If a memory shortage occurs, the kernel
will automatically kill applications based on their oom score. If push
comes to shove, the kernel shall survive.
Bill Anderson
WW7BA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]