HDD vs SSD for mongodb database server

hardwarehardware-raidhddraidssd

I am setting up a physical server for an application that we have developed, the purpose of this server is to run the server's own software and store its database (mongodb).

On the server machine we want to configure a RAID 1 storage system to keep the information safe, but we do not know what would be better for this, whether to use SSD or HDD.

We have many questions about it such as

  • Will the performance improvement when using SSD be noticeable or is HDD enough?

  • Will SSDs have the same endurance as HDDs to be running 24-7?

  • Would the combined use of RAID 0 + RAID 1 with HDD be a better option than SSD?

I don't know if someone could help me solve some of these doubts or give me some kind of information or help in this regard.

Thank you!

Best Answer

Will the performance improvement when using SSD be noticeable or is HDD enough?

While there are scenarios where the SSD will be no quicker than using a HDD that would be pretty unlikely, for 90%+ (probably higher) you will see significantly higher performance using SSD over HDD.

Will SSDs have the same endurance as HDDs to be running 24-7?

Probably not no - you can spend a lot of money on SSD and get broadly the same write endurance as HDD (Intel Optane is particularly good in this regard) but generally speaking you will get less endurance with SSDs than with HDDs - especially with Consumer SSDs. The term that's most important here is 'DWPD', Daily Writes Per Day - how much you can write to an SSD on average per day without impacting the endurance of the SSD. Often Consumer SSDs have low DWPD figures such as 0.3 - i.e. you can only write 30% of the SSDs capacity per day before negatively impacting the SSD's endurance. Many top-end Consumer SSDs have a DWPD of 0.7, 1.0, even as much as 3.0 - whereas for Enterprise SSDs you may see this as much as 30.0, and those Optane SSDs can be in the hundreds or more.

Anyway have a look at how much writing you're doing and use that, compared to the size of the volume you need, to decide what level of DWPD you need.

Would the combined use of RAID 0 + RAID 1 with HDD be a better option than SSD?

"It depends", though probably not, just use R1/10 or R6/60 depending on your volume sizes - you'll be fine.