User: Password:
Subscribe / Log in / New account

Looking at Fedora 14 and Ubuntu 10.10

Looking at Fedora 14 and Ubuntu 10.10

Posted Sep 25, 2010 20:24 UTC (Sat) by gvy (guest, #11981)
In reply to: Looking at Fedora 14 and Ubuntu 10.10 by Wol
Parent article: Looking at Fedora 14 and Ubuntu 10.10

> And my default rule for swap anyway is (given that disk is cheap)
> is "twice max ram" which on my mobo is 32Gb.
So I should do 48G swap on an 1U server by that rule, and have done only 2G given 4G RAM. Ouch.

Did you consider multiple swap partitions, or emergency swap files (which aren't as nice as swap partitions/spindles but hey, if you need that much virtual memory actively you should go after more RAM)?

> People have been saying "the twice ram rule is obsolete" since before
> linux was born ...
I'm not to cry "prooflink!!11" but for 4, 8, 16, 32M RAM it was perfectly the rule. Somewhere near 64M RAM things became less apparent for desktop as working set more or less got into that plus 1x swap.

> then 2.4 proved they were wrong!
There were quite a few VM managers for 2.4.x, and at some time a bug has caused the "need" in 2x swap which is probably what you heard and recall when it was long fixed.

My main reasons for large swap these days are tmpfs for hasher package builds (with swap on 15kRPM SAS drives, and not heavily used -- rather "just to free up memory before having to clean up") and hiberation (where again, I have a hard time filling up RAM to get all of the RAM+VRAM+tinybit swap used by hibernation alone).

My, and probably yours either, main reason *not* to do uselessly large swaps is the time needed to write or read it all. If you're not going to wait for minutes, that is -- hdparm -t/-T will help to estimate both hard disk's and RAM read speed, and bc -l to turn that into full swap read time.

(Log in to post comments)

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds