Memory upgrade and swap partition size
Jon maddog Hall
maddog at li.org
Tue Sep 26 13:13:01 EDT 2006
Kjel,
kjel.anderson at gmail.com said:
> I am probably exposing my ignorance by asking this, but I have to remember:
> there are no stupid questions, just stupid people.
This is not a stupid question. Increasing SWAP size on your disk will not generally
improve performance. SWAP size increases will allow you to run more programs
simultaneously or programs with with larger datasets, but the things related to
"SWAP" that will generally give you better PERFORMANCE are:
o RAID striping of your SWAP partition
o placement of SWAP on a seldom used disk spindle (same thing with /tmp and /usr/tmp)
o allocation and placement of multiple swap partitions to minimize disk latencies
o having more RAM (always more RAM)
o Solid state SWAP devices
SWAP is used in two instances:
o you have more data than you have RAM memory (text is paged out of the
text files, not out of SWAP)
o after a certain period of inactivity, processes are "swapped" out to SWAP
to make room for the more active processes
These are general rules of thumb.
If your SWAP is not large enough, you will get fairly obvious error messages telling
you that you are in that situation.
Disk space is cheap these days, and I normally have a gig of swap space
on my notebook, along with the two gigs of memory I have. I can not remember the
last time I ran out of "swap" space, if ever. On the other hand, if you are running
a large server with a large database, you might indeed run out of "swap" at some time.
There are tuning parameters inside of the kernel that control SWAP, when it takes over,
how much RAM is reserved for things like buffer cache and other forms of memory
management, but this is probably more than you want to know or fiddle with.....trust
me.
md
--
Jon "maddog" Hall
Executive Director Linux International(R)
email: maddog at li.org 80 Amherst St.
Voice: +1.603.672.4557 Amherst, N.H. 03031-3032 U.S.A.
WWW: http://www.li.org
Board Member: Uniforum Association
Board Member Emeritus: USENIX Association (2000-2006)
(R)Linux is a registered trademark of Linus Torvalds in several countries.
(R)Linux International is a registered trademark in the USA used pursuant
to a license from Linux Mark Institute, authorized licensor of Linus
Torvalds, owner of the Linux trademark on a worldwide basis
(R)UNIX is a registered trademark of The Open Group in the USA and other
countries.
More information about the gnhlug-discuss
mailing list