Speed difference in HD Sata/SSD

Asked

Viewed 1,177 times

5

I have Mongodb running on a 500GB SSD HD.

But as the folder /date started to get too big, we put a HD slave 3TB, but this being SATA and not SSD as the first.

But after changing the date folder to this new HD, we noticed a considerable difference in performance. Could this performance drop be due to the simple change from SSD to SATA? I even imagined that there would be a small difference, but not a big difference.

1 answer

7


First I will consider that the 500GB device is an SSD. Either it is SSD (Solid State Drive) or it is HDD (Hard Disk Drive). There is even the HDD sold as HDD SSD, but in the background it is just an HDD that has an SSD module to make an internal cache. There is some gain, but it is minimal. This is called hybrid HDD, although it is a mistake to call it that.

SSD exists mainly to give more speed. It costs considerably more expensive than an HDD. What is the reason people pay more for something? It has to have a clear advantage. Some people will even consider that there is less power consumption, others will consider that it is less susceptible to failures (although they may also last less for recording), there are even those who see the reduced size an advantage for high-density laptops and servers. But the biggest advantage is speed.

An SSD usually has sequential end speed of 5 to 25 times higher than a normal HDD. This does not change much compared to the "hybrid" HDD. It’s a brutal difference.

But the greatest speed gain is in access time. What for database, which makes more random access, something extremely important. Since the SSD is a pure random memory and the HDD is a disk, the access mechanics is completely different, giving an advantage to the SSD of at least 100 times. There are extreme cases up to 1000 times. And I’m not even talking about the (not so) new generation of SSD based on RAM, there are already devices marketed 10 or 100 times faster than traditional Ssds, and there is something in the lab almost at the same speed as normal RAM, and even faster... crazy!

Keep an eye on Nvrams.

SSD NVe

Access to a given disk needs to displace the read/write head to get to the correct track, and needs to wait for the disk to rotate and position itself on the cluster where the die is. That time is very fast for human standards, but for computational patterns, it seems an eternity.

A disk is something mechanical and although we talk that it can do random access, it is never actually random. It’s just optimized sequential. It is better than tape, for example, than 100% sequential access (complexity O(n)). The SSD is electronic, so it can be 100% random (complexity O(1)).

A database, most of the time, accesses the data pages scattered throughout drive, after all they work with trees, or in rare cases with Buckets of data, which are not sequential, on the contrary, be quite spread is the great advantage.

The huge difference is precisely for the exchange. The cheap came out expensive. Before making decisions one must research and obtain reliable information, deciding based on speculation only brings harm.

  • Thank you for your clarification Glad that in our case we still have option to test other options. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.