Difference speed in HD Sata / SSD

5

I have MongoDB running on a 500GB SSD.

But as the folder / data began to get very large, we put a 3TB HD slave , but this being SATA and not SSD as the first.

But after changing the folder date to this new HD, we noticed a considerable difference in performance. Has this performance drop been due to the simple switch from SSD to SATA? I even imagined it would have a small difference, but not a big difference.

    
asked by anonymous 10.05.2016 / 15:05

1 answer

6

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 deep down it is just an HDD that has an SSD module to do an internal cache. There is some gain, but it is minimal. This is called a hybrid HDD, though it's a mistake to call it that.

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

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

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

Accessing a disk data needs to shift the read / write head to get to the correct path, and must wait for the disk to rotate and position itself in the cluster where the data is. This time is very fast for human standards, but for computational standards, it seems like forever.

A disk is something mechanical and although we say that it can do random access, it is never random in fact. It's just streamlined optimized. It is better than a tape, for example, that 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 around the drive , after all they work with trees or in rare cases with buckets of data that is not sequential, on the other hand, being widely spread is the great advantage.

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

    
10.05.2016 / 15:17