2 ms·
The recommendation (swap == 2 x RAM) was more common in the nineties when RAM was much more expensive. It was a reflection that the resident set size (RSS) of a
by brian_cunnie 11y ago
The recommendation (swap == 2 x RAM) was more common in the nineties when RAM was much more expensive. It was a reflection that the resident set size (RSS) of a process is often a fraction of its Virtual Memory footprint (often an order of magnitude smaller), so a process could run effectively even with most of its data swapped out to disk.
There was a fair amount of interesting engineering to make swap effective.. For example, for the code (text) segment, which was read-only, you'd use the file itself (e.g. a.out) as the swap for the text (code) portion, and if you'd try to `rm a.out` while it was running, you'd get a "text file busy error".