this post was submitted on 24 Aug 2023
54 points (98.2% liked)

Asklemmy

43945 readers
21 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
 

Does having swap memory damage SSDs too much, what do you think about it?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 10 points 1 year ago (2 children)

I generally wouldn't recommend this, especially if you're using a cheaper SSD without cache or with QLC memory.

As you already know, cells on an SSD have limited write cycles (as low as 700 for QLC memory) and things like TRIM and wear leveling make sure that your SSD wears uniformly, but on cheaper SSDs the endurance is so low that without cache you will run into wearing issues in a few years of regular use or a few months if you're using it a lot or with swap enabled. I have seen it first hand many times working in a repair shop.

Keep in mind that endurance is not just a number of terabytes written that will cause your drive to suddenly switch to read-only mode, before it fails it will usually slow down to the point of making your PC unusable, I've seen SSDs write as slow as 9MB/s (specifically a Yucun drive from 2018 with TLC memory and no cache), it's not defective it just has to do a lot of error correction during writes.

Also, another issue that plagues cheap SSDs is that their controllers usually die well before the memory does, keep that in mind when choosing an SSD because this usually happens without early signs of failure or SMART errors.

So in general, unless your PC has a lot of RAM and that swap area will rarely be used, don't use swap and use zram instead (or just buy more RAM?).

[โ€“] peopleproblems 2 points 1 year ago (1 children)

Well, TIL.

Is there any way you can estimate the health status of an SSD?

[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Check the SMART status. If you're using KDE you can install plasma-disks which nicely integrates into it and warns you of potential failures.

This won't predict controller failures of course, those are generally unpredictable, but sometimes SSD controllers that are about to fail will show massive lag spikes or straight up disconnect while you're using them, if that happens back up your stuff immediately.

Another sign of early failure is extremely slow write speeds. All SSDs slow down a bit after a while once the cache is full, but if you see speeds slower than a mechanical drive, the memory is dying.

Very rarely, you'll see uncorrectable errors like being unable to open a file, a corrupt file system or files with corrupted chunks (usually 4kb blocks of zeros). If that happens it's already too late.

Also, the health status of a drive only indicates how worn the memory is, don't expect the drive to last until it gets to 0%, it's rare to even get to 60%.

[โ€“] peopleproblems 1 points 1 year ago
[โ€“] [email protected] 2 points 1 year ago (1 children)

Ooh, so... Would a crucial P3 2280 500gb fall into this category?

[โ€“] puffy 1 points 1 year ago (1 children)
[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Oh, saad didn't knew that, so like, that means this ssd is super bad? And should i remove the swap here? (I have 8gb of ram and 4 of swap)

Oh and how to i set up Zram?

[โ€“] [email protected] 2 points 1 year ago (1 children)

If you only have 8gb you're probably swapping a lot, depends on what you do with your PC.

Anyway, to set up zram the easiest way is to try this: https://github.com/systemd/zram-generator/tree/main Also, take a look at the zram page on the arch wiki, even if you're not using arch it's very well made: https://wiki.archlinux.org/title/Zram

[โ€“] [email protected] 1 points 1 year ago

I usually only see swapping when I'm like, playing on big Minecraft modpacks which i don't usually do much, but ok thanks!