Linked by David Adams on Thu 20th Nov 2008 04:19 UTC
General Unix Linux and other Unix-like operating systems use the term "swap" to describe both the act of moving memory pages between RAM and disk. It is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions. Now, many admins (both Windows and Linux/UNIX) follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. Let us say I’ve 32GB RAM, should I set swap space to 64 GB? Is 64 GB of swap space really required? How big should your Linux / UNIX swap space be?
Thread beginning with comment 338126
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: I have a better way...
by B. Janssen on Sun 23rd Nov 2008 11:35 UTC in reply to "RE: I have a better way..."
B. Janssen
Member since:

Just wirte a little script (read the manual pages of dd, mkswap, swapon) that adds a swapfile to a partition of your choice, e. g. /home or /opt, for the application and cleans up after you exit the application (check swapoff and rm).

This will increase your application's start-up time significantly if the swapfile is very huge, i. e. hundreds of GB, but satisfy the app's requirements. After you have done that, send the script and a bug report to the programmers of the app and tell them that a userspace application has no business poking its nose into memory management ;)

Reply Parent Score: 2