Why ssds are too fast?
Why ssds are faster than normal mechanical hard drives. Whats the technical reason behind it.
Because memory has much faster access times(hard drives have to wait while the disc turns to get to the next section when doing anything non sequentially).
Hard drives(or drives in raid) can get very high sequential read/writes, but waiting on that head to move and then the platter to turn to the right place takes time(even with this time in the milliseconds, we do notice it as slow over many workloads).
Muneeb Ahsan said:Why ssds are faster than normal mechanical hard drives. Whats the technical reason behind it.
Mechanical drives use a rotating ferromagnetic platter to store data
Data is stored in sectors (512 bytes each). Sectors are arranged into tracks, with tracks forming a series of concentric circles radiating outward from the inside edge to the outer edge. There's a set of tracks on each side of each platter, and up to four platters per drive assembly.
Most mechanical hard disks spin at standard rotation speeds, typically 5400 RPM, 5900 RPM, 7200 RPM, 10K RPM, and 15K RPM. As the RPM increases, the noise, error rate, and power consumption of the drive also increases.
Most modern consumer hard drives use a rotational velocity of 7200RPM, or 120 rotations per second. At a nominal speed, the platter completes one full rotation every 8.33 milliseconds.
At any point in time a desired block of data (a sector) may be anywhere from immediately behind the read head, to immediately in front of the read head. Sectors that is immediately behind the read head will not be readable until the platter has completed one full rotation; sectors that are immediately in front of the read head are readable right away if the read head is centred on the correct track. If the desired sector is randomly and evenly distributed, it is expected that on average the sector will be one half of a rotation away, which makes it readable in approximately 4.16 milliseconds if and only if the read head is on the right track.
This is known as rotational latency.
The other factor is the seek latency, which is the time taken to bring the read head onto the right track. Whereas mean rotational latency averages out to one half of the worst case rotational latency, seek latency ends up being much more flat because the drive can only be centered on one of a very large number of tracks at once, necessitating a track switch which almost always adds a rather constant 8 to 10 milliseconds compounded with the rotational delay.
Together, this creates a mean access time of about 12 to 14 milliseconds for any random sector on most consumer hard disks (enterprise hard disks are much faster). Fortunately data access patters are not random; they are usually sequential. It is not necessary for every read/write to incur a seek or lengthy rotational delay. Once the hard disk has found the start of what it needs to read or write, it can perform a large number of read/write operations in a row on that same track before having to seek again. This data is read from or written to the hard disk cache.
Flash memory on the other hand stores data by manipulating the arrangement of electric charges in order to create desired field effects using what's called a Floating Gate MOSFET or FGMOS. The operation of flash memory is purely electrical, no moving parts are involved. As a result of this, the average latency for a read or write operation on a Flash memory device is about three orders of magnitude smaller than than on a mechanical hard disk. A random access operation which may take 12-14 milliseconds on a hard drive may be performed in 12-14 microseconds on a flash memory device.
SSDs work by interleaving a number of independent Flash memory devices and throwing a controller in front of them to manage them as one single unit.