Almost quit EOS because I forgot to set up a swap

Story time :
I couldn’t run VSCode with Chrome/Firefox open; sometimes, even Chrome alone would crash. JetBrains IDEs were very slow, and I was about to give up on EOS. Then I realized I had no swap…

1 Like

I have no swap and use firefox and vscodium without such issues.
Depends on how much RAM you have, and how you are using it.

2 Likes

swap is best done with a swapfile, anyway - no need for a partition.

3 Likes

Same. No swap at all here, and I can run Firefox, Obsidian, Dolphin (which I use as a media manager - so many thumbnails to generate) and all while playing Cyberpunk 2077 at max settings.

So, there is something very specific to the OP’s setup that is causing an issue. If swap is what fixes it, then either they have very little RAM or something is very incorrectly configured.

This is what I tend to post almost routinely in threads which somehow tends to gravitate toward the “to be or not to be” of swap:

6 Likes

I agree and also what the hardware is. My personally feeling is with current hardware swap is not of any concern on linux.

1 Like

You’re both objectively wrong. Doesn’t matter how much RAM you have, you will benefit from at least some swap.

5 Likes

And even if you don’t get any tangible benefits, a little Swap ain’t hurtin’ nobody.

3 Likes

WROOOOOOOONG!!!

It hurts my feelings and disk…
Unless it’s zram, which is freaking great!

2 Likes

Sorry but i disagree. With today’s current hardware and ample ram i see no need to have swap. Even so i use swap file over a separate swap partition.

1 Like

It doesn’t matter how much RAM you have, you benefit from swap regardless. The purpose of swap should not be to make up for the lack of RAM, that’s a common misconception. If you don’t have enough RAM, buy more RAM, swap is a poor substitution for that. But regardless, swap helps the kernel better utilise RAM.

2 Likes

It doesn’t matter if you have swap either. :wink:

1 Like

That’s just wrong, but believe what you want :slight_smile:

1 Like

zram is the best thing since zwap sliced bread!

:bread:

3 Likes

And you’re both right. Swap is useful, if it gets used. And if it doesn’t, well, it isn’t hurting anything.
Yeah, I typically don’t see usage of swap on anything that has over 8 GB of memory (and only my server has so little), I don’t remember how many years since I’ve seen swap utilized more than 512k on my desktops. Even then, it’s only when cache is full and it decides to swap some niggling thing out…

1 Like

I have 32 GB memory and very fast hardware. I also don’t use hibernation so for me as an average desktop user I don’t see it would be necessary. But as i say i do still include it by using a swap file.

Even if you had 128 GB, you’d benefit from swap. :rofl:

1 Like

Well i was going to go 64 GB just due to cost. Otherwise yes 128 would be nice swap or not.

Edit: If you run it without swap you’ll see. If you have issues you can add swap file. No big deal.

Indeed.

But even then, you’d still be wrong about swap.

I’m not wrong. I firmly believe that i can run my system without swap.