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 337829
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: I have a better way...
by parentaladvisory on Thu 20th Nov 2008 07:05 UTC in reply to "I have a better way..."
parentaladvisory
Member since:
2006-12-18

Hmm, I can agree with your reasonings, but how is it with applikations that "requires" a pagefile(windows terminology)? _If_ you had 32GB of RAM and you use an app that is not going to install or whatever if you do not have a swapspace, what you recomend then?

Reply Parent Score: 1

RE[2]: I have a better way...
by BiPolar on Thu 20th Nov 2008 11:21 in reply to "RE: I have a better way..."
BiPolar Member since:
2007-07-06

_If_ you had 32GB of RAM and you use an app that is not going to install or whatever if you do not have a swapspace, what you recomend then?


File a bug report about that silly app and/or search for an alternative program.

Reply Parent Score: 2

RE[2]: I have a better way...
by looncraz on Thu 20th Nov 2008 22:18 in reply to "RE: I have a better way..."
looncraz Member since:
2005-07-24

Well, if you ABSOLUTELY NEED that poorly written program, then you will need to satisfy its "needs." You will need to experiment or research to find out how much swap space for which the thing is checking.

Regardless, I agree with BiPolar completely, file a bug report or use a different program, if possible.

--The loon

Reply Parent Score: 2

RE[2]: I have a better way...
by B. Janssen on Sun 23rd Nov 2008 11:35 in reply to "RE: I have a better way..."
B. Janssen Member since:
2006-10-11

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