4 ms·
> I swapped the HDD for an SSD and just threw Linux Mint on here - I disable the swap file so that it doesn't hammer the drive. If that's for the longevity of
by Delk 3y ago
> I swapped the HDD for an SSD and just threw Linux Mint on here - I disable the swap file so that it doesn't hammer the drive.
If that's for the longevity of the drive, I don't think that's really even necessary on a personal device, based on my limited experience. Unless you're aiming for a lifespan measured in decades or would expect to be swapping heavily if you had swap.
I have a basic consumer-grade Samsung 850 EVO SSD that I've been using daily in my laptop since ~2015 or 2016 or so. I've had zero problems with write performance so far, and the SSD reports a wear leveling count of ~140 which seems to indicate the (average?) number of writes per block so far. That value normalizes to a SMART value of 93 out of 100. While SMART may not be much of a reliable indicator of anything, if the number of blocks written is anywhere near realistic, that value seems to make approximate sense if TLC NAND lifetime expectancy is rated at ~1000 writes per block.
Samsung also seems to have a warranty of up to 5 years or 150 TB written for this SSD (depends on drive capacity). The drive reports a total of 23.7 TB written so far.
I haven't been doing a lot of data-heavy work on the device but I haven't really been particularly careful with the SSD either. I've got a swap that's seen some actual use (8 GB RAM), and I also hibernate semi-regularly. I've been trying to keep at least ~15 percent of the capacity free to help with wear leveling but that's about the only conserving I've been doing.
Of course it might be that my drive is just waiting to suddenly start failing writes but I'm not really expecting that.
And your disabling swap might be for some other reason, of course.
But if this is par for the course for consumer-grade SSDs in general, I wouldn't really be worried about the effects of swapping on life spans unless there's some particularly heavy hammering planned.
- justsomehnguy 3y ago> Unless you're aiming for a lifespan measured in decades or would expect to be swapping heavily if you had swap. This one. My VERTEX3 is running fine, though it's not TLC, of course. And with auto-leveling all you really need (if you care that much) is to.. increase the swap size, so there would be less evictions from the swap => less writes. But anyway, even modern TLC drives would be fine for a decade if this is just a machine used for a couple of hours everyday. You need like a constant 3MB/s 24/7 to even be close for their rated TBW.
- Delk 3y ago> And with auto-leveling all you really need (if you care that much) is to.. increase the swap size, so there would be less evictions from the swap => less writes. How does that work out? To where would data be evicted from swap? Increased swap size might of course help with wear leveling if that means there's just more unallocated space on the device. > But anyway, even modern TLC drives would be fine for a decade if this is just a machine used for a couple of hours everyday. You need like a constant 3MB/s 24/7 to even be close for their rated TBW. Mine hasn't even been just a couple of hours every day. Sure, during a regular work week it might not be used a whole lot, but I've used it for entire days e.g. when I was doing my master's full-time. Again, not a whole lot of memory intensive work, but not intentionally conservative for a general-purpose laptop either. Running just about any kind of a game often means some of the memory of the umpteen browser processes get swapped out.
- justsomehnguy 3y ago> To where would data be evicted from swap? This is actually an interesting question, but this is quite obvious if you know how it works. Consider this scenario: Some app loads data (it goes to RAM), sometime later this data is moved to the swap. Now the app is trying to access it, so there are two ways: there is no free RAM (eg other apps locked the physical memory), so the access is going through the swap there are free memory blocks so the OS copies the accessed data to the RAM, app is working fast... but till the data is modified, there is no need to mark the data in the swap as a stale, so until it happens the OS can wipe the RAM and redirect the app to the swap. Now consider another app is pressured to moved to the swap at the same time: If there is not enough swap space, then the data of the first app, which has [a valid, synced] data both in the RAM and the swap is just left with with the data in the RAM and the swap space is freed to accomodate the data of the second app. If turntables (sic) the process would repeat, just with the both apps trading places. But if there is enough swap space available, the second app data is just written to the spare swap blocks, and both apps' data could be read from the swap at any time. Quite simple. > Increased swap size might of course help with wear leveling if that means there's just more unallocated space on the device. This is a thing too, ofc, but the main point is having less 'overwrites' per usable space. > Mine hasn't even been just a couple of hours every day. It's even 'worse' than that. I've seen a server with 850/860 Evos and LUKS (so the worst case: cheap drives and all writes are new), even after the 3 years they were only 50% of 'ssd health'. TLC is the worst thing happened to SSDs as a technology, but people are forgetting what 3MB/s * 3600 * 24 is whooping 259GB a day, and you need to write ~259GB a day for 3 years to totally deplete the [official] write endurance (YssdMV). Wanna hear about 5 WD10JUCT?