Everyone defending swap like crazy in the comments… so let me give a counter argument specifically for desktop:
Many years ago I stopped using swap on all my computers (I exclusively use linux) and the reason is: every time anything regarding interactivity went to swap, my system would freeze and literally become unusable for a really long time until I killed something. Since I got tired if that behaviour I decided I prefer for random shit to die but my computer still be usable.
It wasn’t very often, but I don’t get OOM killer often either (as in I don’t remember the last time it happened and I use linux every day for both work and fun), and the freezing situation was way more annoying, to the point I sometimes ended up cold switching off the computer. I’m surprised on how many people run out of memory constantly. I guess you all are just using linux for servers and have crazy processing of infinite data…
Were you using a HDD for swap? It’s nearly unnoticeable on an NVMe drive.
swapfile gang
.rw------- root root 4.0 GB Mon Jun 1 04:10:37 2026 /var/swapYes, swap partitions are shit.
The real hotness is swap drives.
Just the use that your old 64GB SSDs were waiting for!
(Fun fact: in Linux, if you have multiple swap partitions mounted, the kernel will automatically use striping (like RAID) in order to read and write from them as fast as possible. If you have multiple small SSDs used for swap, the read/write speed from swap can actually become pretty fast.)
How many SSDs do you need for it to match the speed of RAM? Can I use this to make cheap RAM?
Definitely configure swap, but I don’t think there is much benefit of a swap partition over a swap file these days and swap files are trivial to configure.
Real Linux users do not use MacOS window decorations in their graphics.
;)
Real real Linux users use whatever the hell they want.
right real linux user do everything in the tty and maybe put something in the framebuffer if they want to view an image or similar
Used a website to make the windows since I was on mobile. Thought it looked too plain w/o the window decorations, but yeah. I mean there’s so many distros and themes, who’s to say it couldn’t be Linux. I’ve seen KDE reskinned to look like OSX
It’s fine, I really like MacOS X too. To be fair those window decorations looks real nice as demos.
I have a small home server that I occasionally push through huge batch processing jobs. During the pushes, I might collide with other projects that use a pretty big chunk of the RAM. So, to make sure it’s never a killer (just a major slow down), I made a 32GB swap file. If I need it, it’s there and disk is hella cheap.
This machine has never had a GUI installed. No browsers to complain about, just plain old data processing, stats models, and old skool computing.
Now, my worst case scenario was building a C++ program on a raspberry pi gen 1. That has 256MB of RAM. g++ ran out building, so I NFS mounted a huge disk from my desktop machine and made the swap file there. The build took a while… but the program ran fine after the week long build, no swap needed.
Then what is the setup if my computer only has 4GB of memory for daily driving? Just curious because swap partitions are what I normally do on limited resource machines.
Dunno how well zswap handles at that size, but the point is that is compresses swap into RAM, so it would use a max of 819.2M for a total of 2457.6M of swap space. If you need more, then by all means, use a swap file or partition lol.
Actually linux easily supports multiple and tiered swap mounts, so you could even go zswap + ssd swap + hdd swap, or a cheapo “burn at your own risk” usb flash swap lol.
I used to be this guy. We have huge amount of memory in our storage server. Why would we need swap? Well, once the system started killing programs I read up on swap and how the system handles its caches, especially ZFS ARC.
Short version is that while the system can evict its caches syncronously, it can only async notify ZFS that it should also shrink its caches, but the out-of-memory killer will start killing before ZFS and its kernel counterpart can start to free up memory.
A tiny bit of swap completely solved this, since swapping is sync for the kernel and the OOM killer will wait for it.
As well as oom situations, swapping allows the memory to be used more effectively by swapping out anonymous pages that aren’t likely to be used but can’t be dropped.
> linuxmemes
> macos screenshot
ಠ_ಠ
i’m sure someone has made a KDE theme or a Gnome theme that replicates MacOS, let’s pretend that’s what’s happened.
Shit did I botch it? I made this on my phone and the toot I copied the script from was just text. Wanted to make it look more interesting so I found this site that let you make the windows. I just went with what I thought looked best.
Is this tongue in cheek i swear I cannot tell any longer.
Some swap is beneficial
I hope the phone is running PostmarketOS ;)
TBH I’m sure you could configure a linux terminal to look like that, but yeah it looks very default macos to me
Idk. KDE has themes like this but yeah I get it
Building a PC in 2026 be like “I cant afford RAM, but I can use a whole TB hard disk I shucked from an old WD external as swap and maybe my PC will feel modern”
No

It turns out the computer mostly freezes once you go past 200% RAM used.
I init a ramdisk and put a swap file there and call it L4 cache
I actually did this for a laugh a very, very long time ago. I had upgraded my 75MHz Pentium machine from 8MB to a whopping 40MB, so since I knew it would run fine with just 8, I installed a TSR RAMdisk and told Windows 3.1 to put its swap on that drive.
It worked great, but I decided I’d rather use the memory for other things.
But in more modern times, I’ve literally forced browser caches into memory-based tmpfs to take the load off system disks, which is basically the same thing. And it reduces wear on my hardware.
“Unresizeable block device at end of disk”
Classically the swap partition was located at the physical middle of the drive so that on average, no matter where the heads where, the swap partition wasn’t far away
“Hello I would like to torture my SSD’s FTL because I left three Electron apps open”
If you don’t actually need the swap, Linux isn’t going to make use of swap. If you need the swap, then you’d probably rather use it than have the OOM killer take out a process.
My desktop has plenty of swap available, but is using none of it, because the system isn’t under memory pressure.
If you don’t actually need the swap, Linux isn’t going to make use of swap.
Eh, yes and no.
It will offload things from RAM into swap in order free up RAM space for disk cache. Which is kind of a weird reversal when you think about it, loading your RAM contents onto disk so that you can load your disk contents onto RAM. But by doing this to idle processes in order to disk cache files you’re likely to use soon, the system does become significantly faster and more responsive.
OMG I miss this meme format










