- cross-posted to:
- linuxmemes@lemmy.world
- cross-posted to:
- linuxmemes@lemmy.world
cross-posted from: https://lemmy.world/post/51845693
Credit to @ryanc@infosec.exchange
I just did the graphic
What, you don’t have your SWAP set to 1TB Google Drive share?
Does it make a system more stable or less stable? What about under proxmox?
If you run out of RAM and have swap disabled, then some program must be killed to make room. That’s handled by OOM (out of memory).
Whatever got killed might have been important, and you as the user don’t get to pick at that point.
And if you need swap just do a swap file
If you need swap, you probably should look at the tradeoffs of a file vs. a partition, or maybe even adding another entire disk.
But if you don’t know if you’ll need it, it’s because you won’t.
I know right now you’re stuck exclusively using swap, but If you work hard and apply yourself, you may one day be able to afford one whole gigabyte of ram without going more than five figures into debt.
Sorry, my 8 GB study laptop freezes all the time on Librewolf and it has a Bay Trail chip. I gotta have it.
You must have a bajillion tabs open, until recently I used an old thinkpad with 8gb of soldered ram and never ran into ram issues with only librewolf running. It was a different story though when I started qGIS and a couple of libreoffice instances.
I usually have VSCode, Discord and MusicBee (with Wine) open in the background, but yeah I just open a bunch of tabs sometimes. I did make a swap file and not a partition however.
Remember when they said “swap should be 2 times the amount of RAM”.
Why would I waste 128 GiB of storage for nothing?
They stopped saying that a long time ago. It became something like 2x ram until beyond 4GB then it was something more sane.
Did the same thing but some apps are designed with that in mind and I had worse performance so had to do a swap file again
Never have I ever heard about apps that need a swap file to operate normally.
Docker.
Only half-joking.
Me neither but creating one fixed my performance issues so I figured that was the issue. TBF it was a pagefile under windows so it might be a windows specific quirk but the main point still stands
Yeah, your first mistake was using Windows and expecting performance.
Hey, “bad performance” is still a kind of performance!
Everytime I install a fresh OS I setup swap when I feel I’m having OOM issues or random freezes, it’s just creating one 16GB file and enabling it as swap. Much easier than going to read now about zswap zram or whatever I’m “supposed” to be using.
Please, for the love of who ever you hold in high esteem, use swap. See: https://chrisdown.name/2018/01/02/in-defence-of-swap.html Now I don’t really like the whole “Heres an article from some rando to prove my point” thing, but anecdotally, the article does line up with my experience (with 32 gigs of system memory). Namely, when I went without swap I experienced frequent system lock-ups, when I added swap on zram, lock ups still happened but less frequently, and when I eventually changed swap on zram to disk swap on the recommendation of this article lock ups never happened again.
To add some nuance to this, do not use ZRAM in combination with swap. There’s ZSWAP for that which does what you would expect, without clogging up your RAM and gracefully handling a backing device. (ZRAM is just another block device for the kernel, so you will get LRU inversion if it fills up and you have another layer of swap on disk. Meaning your cold pages will be needlessly stuck in zram.)
Yeah, the same person who wrote the article I linked above also wrote one on zram vs zswap, which I think is also a good read: https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html
Lol, I stopped swapping when I got enough RAM to never need swap
Even if you don’t run out of RAM your kernel will use swap to defragment your memory. Usually you end up with gaps in memory that are too small to effectively allocate as programs open, close or stay running over time.
pagefile.sys has entered the chat.
I’ll do whatever the fuck I want, thank you.
I often use FreeBSD on a system with 2 gigs of ram. I WISH swap was useful. OOM killer is so overzealous the thing just kills whatever before even touching swap.
Maybe tweak the swappiness?
I miss Intel optane
dont worry Samsung zNAND-O is coming to fill the gap at unaffordable prices.
Meanwhile here I am partitioning 20Gb of SWAP because I want 0 chance of an OOM moment.
I usually make swap partitions on hdds tho never on ssds. I can happily spare ~10GB hdd space in this memory drought.
nerddd
ḭṙṏṆṆṆṆṆ
🫸🫸I̸̛̦̱̪͙̮͇̍͋̒͑͋̂͊r̷̤̺̳͇̻̠̤͇͋ͅȮ̶͇̱̫͖̭͙̞̖͚̔ͅŇ̷̘̠͓͍̞̠͉͓͚̩̽̏̓̾n̸̡̛͉͌̐́̉͌̊͒͝Ń̴̢̯̟̯̙̤̑̋̓̉̄͗ņ̸̧͇͕̺͕̎͆̿̓̓͠N̷͙͈̫̰͉̋͐̍̈̿̄̋̓̕🫷🫷











