Wednesday, September 14, 2011

Drive Types


Drive Types

Database servers have traditionally used magnetic hard drive storage. Seek times for traditional magnetic hard disks have not improved appreciably in recent years, and are unlikely to improve much in the future, since they are electro-mechanical in nature. Typical seek times for modern hard drives are in the 5-10ms range.
The rotational latency for magnetic hard disks is directly related to the rotation speed of the drive. The current upper limit for rotational speed is 15,000 rpm, and this limit has not changed in many years. Typical rotational latency times for 15,000 rpm drives are in the 3-4ms range.
This disk latency limitation lead to the proliferation of vast SAN (or DAS)-based storage arrays, allowing data to be striped across numerous magnetic disks, and leading to greatly enhanced IO throughput. However, in trying to fix the latency problem, SANs have become costly, complex and sometimes fault-prone. These SANs are generally shared by many databases, which adds even more complexity and often results in a disappointing performance, for the cost.
Newer solid state storage technology has the potential to displace traditional magnetic drives, and even SANs altogether, and allow for much simpler storage systems. The seek times for SSDs and other flash based storage is much, much lower than for traditional magnetic hard disks, since there are no electro-mechanical moving parts to wait on. With an SSD, there is no delay for an electro-mechanical drive head to move to the correct portion of the disk to start reading or writing data. With an SSD, there is no delay waiting for the spinning disk to rotate past the drive head to start reading or writing data, and the latency involved in reading data off of an SSD is much lower than it is for magnetic drives, especially for random reads and writes. SSD drives also have the additional advantage of lower electrical power usage, especially compared to large numbers of traditional magnetic hard drives.

Magnetic Disk Drives


Disks are categorized according to the type of interface they use. Two of the oldest types of interface, which you still occasionally see in older workstations, are Integrated Drive Electronics (IDE) or Parallel Advanced Technology Attachment (PATA) drives. Of course, it is not unusual for old, "retired" workstations, with PATA disk controllers, to be pressed into service as development or test database servers. However, I want to stress that you should not be using PATA drives for any serious database server use.
PATA and IDE drives are limited to two drives per controller, one of which is the Master and the other is the Slave. The individual drive needed to have a "Jumper Setting" to designate whether the drive was acting as a Master or a Slave drive. PATA 133 was limited to a transfer speed of 133MB/sec, although virtually no PATA drives could sustain that level of throughput.
Starting in 2003, Serial Advanced Technology Attachment (SATA) drives began replacing PATA drives in workstations and entry-level servers. They offer throughput capacities of 1.5, 3, or 6 Gbps (also commonly known as SATA 1.0, SATA 2.0, and SATA 3.0), along with hot-swap capability. Most magnetic SATA drives have a 7200rpm rotational speed, although a few can reach 10,000rpm. Magnetic SATA drives are often used for low-cost backup purposes in servers, since their performance and reliability typically does not match that of enterprise-level SAS drives.
Both traditional magnetic drives and newer SSDs can use the SATA interface. With an SSD, it is much more important to make sure you are using a 6Gbps SATA port, since the latest generation SSDs can completely saturate an older 3Gbps SATA port.
External SATA (eSATA) drives are also available. They require a special eSATA port, along with an eSATA interface to the drive itself. An eSATA external drive will have much better data transfer throughput than the more common external drives that use much slower USB 2.0 interface. The new USB 3.0 interface is actually faster than eSATA, but your throughput will be limited by the throughput limit of the external drive itself, not the interface.
Small Computer System Interface (SCSI) drives have been popular in server applications since the mid 1980's. SCSI drives were much more expensive than PATA drives, but offered better performance and reliability. The original parallel SCSI interface is now being rapidly replaced by the newer Serial Attached SCSI (SAS) interface. Most enterprise-level database servers will use either parallel SCSI or SAS internal drives, depending on their age. Any new or recent-vintage database server will probably have SAS internal drives instead of SCSI internal drives.
Server class magnetic hard drives have rotation speeds ranging from 7200 rpm (for SATA) to either 10,000 rpm or 15,000 rpm (for SCSI and SAS). Higher rotation speeds reduce data access time by reducing the rotational latency. Drives with higher rotation speed are more expensive, and often have lower capacity sizes compared to slower rotation speed drives. Over the last several years disk buffer cache sizes have grown from 2MB all the way to 64MB. Larger disk buffers usually improve the performance of individual magnetic hard drives, but often are not as important when the drive is used by a RAID array or is part of a SAN, since the RAID controller or SAN will have its own, much larger cache that is used to cache data from multiple drives in the array.

Solid State Drives

Solid State Drives (SSD), or Enterprise Flash Disks (EFD), are different from traditional magnetic drives in that they have no spinning platter, drive actuator, or any other moving parts. Instead, they use flash memory, along with a storage processor, controller and some cache memory, to store information.
The lack of moving parts eliminates the rotational latency and seek-time delay that is inherent with a traditional magnetic hard drive. Depending on the type of flash memory, and the technology and implementation of the controller, SSDs can offer dramatically better performance compared to even the fastest enterprise-class magnetic hard drives. This performance does come at a much higher cost per gigabyte, and it is still somewhat unusual for database servers, direct attached storage or SANs, to exclusively use SSD storage, but this will change as SSD costs continue to decrease.
SSDs perform particularly well for random access reads and writes, and for sequential access reads. Some earlier SSDs do not perform as well for sequential access writes, and they also have had issues where write performance declines over time, particularly as the drive fills up. Newer SSD drives, with better controllers and improved firmware, have mitigated these earlier problems.
There are two main types of flash memory currently used in SSDs: Single Level Cell (SLC) and Multi Level Cell (MLC). Enterprise level SSDs almost always use SLC flash memory since MLC flash memory does not perform as well and is not as durable as the more-expensive SLC flash memory.

Fusion-IO Drives

Fusion-IO is a company that makes several interesting "SSD-like" products that are getting a lot of visibility in the SQL Server community. The term "SSD-like" refers to Fusion-IO cards that use flash memory, just like SSDs do, but are connected to your server through a PCI-E slot, instead of a SAS or SATA controller.
The Fusion-IO products are relatively expensive, but offer extremely high performance. Their three current server-related products are the ioDrive, ioDrive Duo and the new ioDrive Octal. All three of these products are PCI-E cards, with anywhere from 80GB to 5.12TB of SLC or MLC flash on a single card. Using a PCI-E expansion slot gives one of these cards much more bandwidth than a traditional SATA or SAS connection. The typical way to use Fusion-IO cards is to have at least two of the cards, and then to use software RAID in Windows to get additional redundancy. This way, you avoid having a pretty important single point of failure, in the card itself and the PCI-E slot it was using (but incur the accompanying increase in hardware expenditure).
Fusion-IO drives offer excellent read and write performance, albeit at a relatively high hardware cost. As long as you have enough space, it is possible and feasible to locate all of your database components on Fusion-IO drives, and get extremely good I/O performance, without the need for a SAN. One big advantage of using Fusion-IO, instead of a traditional SAN, is the reduced electrical power usage and reduced cooling requirements, which are big issues in many data centers.
Since Fusion-IO drives are housed in internal PCI-E slots in a database server, you cannot use them with traditional Windows Fail-Over Clustering (which requires shared external storage for the cluster), but you can use them with database mirroring or the upcoming AlwaysOn technology in SQL Server Denali, which allows you to create a Windows Cluster with no shared storage.

No comments:

Post a Comment