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

  • @danA
    link
    English
    9
    edit-2
    10 months ago

    I wouldn’t worry too much about it, since good modern SSDs have such high TBW values that you could usually rewrite half the disk every day and it’d still survive the warranty period. SSDs often survive longer than the TBW value - that’s just the amount that’s warrantied, and manufacturers are very conservative in their warranties.

    I’ve seen server systems that have been running 24/7 for over 10 years, with a consumer grade SSD (Samsung 830 EVO or equivalent), with swap enabled, and they’re still running fine.

    If you have plenty of RAM (i.e. you usually don’t actually need swap), reduce the value of vm.swappiness in /etc/sysctl.conf. 10 is a good value in that case. It’s a number between 0 and 100, where 0 means to never swap and 100 means to always swap (apps will be swapped out shortly after loading). The default on many distros is 60, which tends to start swapping quite a bit once the RAM is around 50% full).