Hacker News new | ask | show | jobs
by jamiesonbecker 1984 days ago
Only if it's used.

Not being facetious -- if you operate entirely within RAM (as if you had disabled swap), then it won't really be used much.

1 comments

For linux this is not (always) true. How about FreeBSD? Any sources?
The article says "It is thus common to see moderate swap space usage even when plenty of free memory is available", with an explanation above. So it sounds like it's not always true for FreeBSD either.
The notion there is that at some point in the past free memory was scarce, so the kernel swapped out some pages, and that swap space may still be in use long after the shortage is alleviated. FreeBSD won't swap anything out unless there's a shortage of free pages.
You can set the swapiness of both systems if you want for it to be true. Modern SSDs won’t last a second longer without a swap and now a days of swap files there’s really no excuse to not have one.