Swap or not?

It makes no difference for SSD’s longevity whether you write to a file or a swap partition. Writing is writing.


You may also want to read about Zram/zswap


I’m not really 100% sure to be honest. @keybreak said about what I’ve read, although I do don’t exactly understand it. Basically since you partition it it will always write to the exact same block which is fine on spinning rust, but not ideal for an SSD. Although I’m not sure why that wouldn’t also be true with a swap file,I don’t know. But that’s what i read on the internet, so I know it’s gotta be true, even if I don’t understand it.

1 Like

Looks like we’re not the only ones who can’t find a good answer :grin:

My other computer has a swap partition on a Samsung Evo 850 SSD. I’m going to leave it and see how long it goes before the HD fails. It’s been there since May 1, so I’ll let you know when it fails.

Well either way they’ll wear SSD about the same, coz however you look at it - it’s still a part of disk which physically writes, regardless if it is partition or file…

I doubt there is some drastic difference…

Samsung SSDs are best ones, hopefully it will live for years and years :slight_smile:


Please correct me if I am wrong, but today’s SSDs will survive several hundred TBs (or more) worth of writing. For a swap partition/file that at any rate will seldom or rarely be used, I wouldn’t think there is so much to worry about the disk’s longevity. It very well might fail for other reasons than having a swap partition/file set up, hibernating included. I can’t see a scenario when a user hibernates so many times during a day and then writing many GB data to the disk each time. That is not my use case anyway.

1 Like

Depends on system / tasks at hand (for example if you use Android studio routinely :rofl: ), but to me it is just completely excluding most obvious possible point of failure - which is always good.

1 Tb may be way faster than you probably think, with some setups and use cases - you’d be surprised :wink:

For example after analyzing disk writes on Windows back in a day - i always disable Firefox’s disk cache (again, you’d be very surprised it’s daily writes), and you don’t really need it if you have enough RAM.

1 Like

At the end of the day, the use case is then a far more important factor when it comes to a disk longevity than the “evils” of a swap file/partition “per se”.

As an average user, who doesn’t strain my systems that much, I wouldn’t think swapping is something to worry about.

Actually, if I don’t think I need hibernation I set up an small amount of zram for just in case the kernel is in dire need to move some files out of the way.

1 Like

For the most part yes, but you know…
If you’re thinking about mitigation of risks :slight_smile:

Imagine that you left some program in the night and gone to sleep, on the next morning you see that it’s memory-leaking like crazy (think of Deepin for example :rofl: ) and you have additional i don’t know…30 Tb written by your swap :laughing:

  • Is it rare?

  • Is it possible?

Swap is for punks: “live fast - die young!” :upside_down_face:

P.S. Never trust robots :robot:


That would be an extreme and a rare occurrence. It is possible, yes. But how probable?

But I do get your point. If it is possible that anything exists at all, rather than nothing, then everything is possible.

ps. I hadn’t really thought of swap as a philosophical issue…hmm… :thinking:


That would be my guess, but I figured, it’s easier to setup and I’m willing to buy another SSD is it fails withina couple of years. Let’s see if this whole thing holds any water.