Friday, August 16, 2019

hard drive - Is it safe to place write-intensive partitions on an SSD (in an SSD+HDD system)?



I'm setting up a (sort of) powerful workstation for SW development work on Linux. It's a Xeon system with multiple cores, 32GB memory, a large HDD and a 120 GB SSD (Samsung
MZ7WD120HAFV a.k.a. SM843T).



I have to decide which partitions to put on the HDD, and which on the SSD. I'm getting conflicting recommendations on this question:





  • "Don't put frequently-write-intensive partitions on the SSD, you'll shorten its lifetime significantly, it might fail within several months that way." (similar to this answer)

  • "If you have a 2nd or 3rd generation SSD (that means any drive with TRIM) then you don't have to treat it any different than a regular HDD: you can put write intensive files, journal and swap on it." (from this answer here on the site)



Both performance and stability are important to me, although this is not a mission-critical server. So, what should I do?



Notes:





  • Of course, I'll have some sort of backup scheme for my critical data, the question is not about that.


Answer



The Samsung SM843T is a very nice looking SSD. The key points you want to look at in an SSD datasheet are the figures talking about drive longevity, which may be expressed as device writes per day or TB written. The SM843T datasheet has both, and more usefully has the figure for both random and sequential workloads.



A random workload means 100% random 4K writes with an IO Queue depth of 32 - this is the figure that most SSD datasheets will quote, particularly for consumer grade drives that have figures like '20GB/day for 3 years'.



The SM843T, however, claims 2x device writes per day for 5 years for random workloads, or 11 x device writes per day for sequential workloads. This is much better than any of the other consumer grade SSDs currently available (and indeed, the SM843T is marketted as a datacentre drive).




I won't say you won't wear this SSD out ahead of time, because I'm sure you could (2x device writes per day on a 120GB drive is only a constant ~690 IOPs, which isn't that much after all), but if you're just doing software development on this machine I really doubt you'll come anywhere close to those figures.



If you're interested, you can monitor the SSD's internal SMART counters for wearout. The exact attributes are different depending on the SSD controller used, but if you want the general gist of what to look for then I wrote about it here.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...