HN Hall of Fame Weekly email

In defense of swap: common misconceptions (2018)

chrisdown.name Essays & writing Essays & articles Software engineering Class of 2022-04 Hall of Fame
Screenshot of chrisdown.name captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 7 calendar years, with breakout response in 5 of them.

submissions
9
submitters
9
observed span
2018–2025
peak thread · 165 comments
182 pts
latest 20+ return · 2025-09-21
116 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

(The article is from 2018.) I think the article is strongly from the point of view of what to do "in production". If you have a bunch of servers with known specialized workloads, I can believe that enabling swap is good for efficiency. You can run more tasks and get closer to the memory limit while remaining safe. Coming from a Facebook employee, this makes sense. However, for individual development machines, the pragmatic situation is completely different. The truth is…

thxg·182-point thread·

In my experience, a misbehaving linux system that's out of RAM and has swap to spare will be unusably slow. The process of switching to a tty, logging in, and killing whatever the offending process is can easily take a good 15 minutes. Xorg will just freeze. Oh, and hopefully you know what process it is, else good luck running `top`. Until this is fixed, I'll just keep running my systems with very small amounts of swap (say, 512MB in…

On my desktop system, most of my problems with swap come from dealing with the aftermath of an out-of-control process eating all my RAM. In this case, the offending program demands memory so quickly that everything from legitimate programs gets swapped out. These programs proceed to run poorly for the next several minutes to an hour depending on usage, since the OS only swaps pages back in once they are referenced, even if there is plenty of free space not…

Swap is still actively harmful if placed on an unsuitable device. A few days ago, I got a complaint about slow ops in a Ceph cluster, and one of the Ceph OSDs spent quite a visible amount of time in response to a simple "ceph tell osd.13 ops" query that is a natural first step when debugging slow ops. Upon investigation, it was found that one of the nodes had a significantly higher load average (50) vs others (14-18). In…

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
5

100+ points or 50+ comments

Total points
611

reference only — not used in Hall rules or ranking

Total comments
630

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2018-01-09In defence of swap: common misconceptionscdown21
2018-01-14In defence of swap: common misconceptionsFirst breakoutc4urself150148
2020-06-08In defence of swap: common misconceptionsrwmj6862
2021-11-09In defence of swap: common misconceptions (2018)1_player87
2022-04-20In defense of swap: common misconceptions (2018)Hall induction · Best threadlinsomniac182165
2023-11-14In defence of swap: common misconceptionsvoxadam10
2024-03-09In defense of swap: common misconceptions (2018)yla9220
2024-06-05In defence of swap: common misconceptions (2018)ingve8297
2025-09-21In defence of swap: common misconceptions (2018)Latest 20+ point returnjitl116150