Re: Swap partition and fdisk
Hi all,
I might not be a UNIX (Linux) guru yet (if ever), but I do know a thing or
two about OS handling.
As someone (sorry I dumped the mail so I can't use your name) pointed out
correctly:
Swap partition=Total memory requirements - Available memory
Now if anyone can tell me the correct value for "Total memory requirements"
I would be very pleased because I also need to know the length of a piece
of string.
For quite a few systems, the "recommended" size of the swap partition (AKA
virtual memory) is 1.5 - 2 times the available memory. This is not because
of some magical relationship between the amount of memory required and the
amount of money spent on memory, but rather due to 2 basic concepts:
1) If you have an active system and you need a large amount of virtual
memory, then the probability that the memory required being swapped out is
fairly high. This means that the time that the system spends swapping can
become more that the time spent on "useful" processing (all depending on
the access speed on the swap device, transfer rates, etc.). When this
becomes acute the system starts "thrashing" at which time, for all intents
and purposes, the system is unavailable and must be rebooted. If the
virtual memory is capped then the system will just say "no way" before a
dangerous swap level is reached. Given the typical physical constraints on
low end devices such as those we find in a UNIX, Windoze, DOS box 2 is
about good enough a ratio to use for the swap partition.
2) Whatever people say Apple, IBM, etc. employ some pretty clever people.
Originally Apple said we only needed about 64 KB memory, IBM said 640 KB
(Why back in the good old days I worked on a DEC System-10 which served
about 80 users with 128KB RAM, but fast swap devices). If these people can
get it wrong, I'm not even going to try. Now given the cost of a hard disk
(1GB=US$500 I suppose, which means about 1.5 cents per 32 KB swap
partition) and the cost of bringing down a server to repartition and
reinstall (say about an hour of a systems administrator, plus an hour for
everyone who cannot access the server...) and I think people will agree
that it may be a good idea to install a swap partition, even though I don't
think I need it, because tomorrow...
Sorry I got so long winded but I think that this is a very important
subject and I have fairly flame-retardant skin.
"Simon Martin"<smartin@reuna.cl>
"Old software engineers never die, they just fail to boot"
Any Trademarks used in this document are recognized as Registered
Trademarks of their respective owners.
Reply to: