Origin of the rule that swap size should be 2x of the physical memory

Who invented the “2x swap” rule? Old‑school geeks feud while everyone demands receipts

TLDR: A retrocomputing thread hunts the origin of the old “swap = 2x RAM” rule and finds competing theories: BSD-era memory reservations and fork behavior, a possible DEC origin, and 1990s economics. The crowd demands sources, trades war stories, and turns a setup tip into a history brawl worth watching.

A simple retrocomputing question—why did old systems say your swap file (the hard‑drive space used when memory runs out) should be twice your RAM—ignited pure comment‑section chaos. The OP brought receipts from a 1989 Sun manual and a 2001 FreeBSD note, then asked the real tea: why exactly 2x, not 1.5x or 3x? Cue veterans rolling up with war stories, skeptics asking for sources, and a side bet on which ancient vendor started it.

One camp insists it’s engineering, not superstition: early BSD reserved swap for every chunk of memory, and when a program did a “fork” (making a copy of itself before launching another app), you temporarily needed double the space. Commenter [dirk94018] breaks it down like a vintage insurance policy—reserve first, page later—so 2x wasn’t a vibe, it was a safeguard. Another faction shouts “follow the money”: [bandrami] says in the ’90s, disks were cheap and RAM was not, so 2x was just the best bang for your buck. Meanwhile, [xen2xen1] throws down a playful wager that this rule smells like DEC (Digital Equipment) lore, and [petcat] calls out the thread for drifting into opinions without historical proof. Even [LowLevelKernel] turns it into a vibe check—how much swap do you use today? It’s part detective story, part nostalgia tour, and 100% comment‑section energy.

Key Points

  • The article investigates the origin of the rule that swap should be twice physical memory.
  • An early documented reference is in the SunOS 4.0.3 installation manual from 1989.
  • FreeBSD’s man 7 tuning (added in 2001) states VM algorithms perform best with at least 2x swap.
  • FreeBSD’s installer required 2x RAM for swap as early as 1993, predating the tuning man page.
  • The author checked 4.4BSD documentation but found little on swap and seeks why 2x specifically.

Hottest takes

“It’s old enough that I’d put money on DEC. Any takers on that.” — xen2xen1
“The OP clearly states that he wants to know the earliest origin of the rule” — petcat
“this 2x represented an optimal use of money” — bandrami
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.