Database performance is ultimately constrained by the need to read and write data from persistent storage – indeed this is the primary purpose of the database. For almost the entire history of modern relational database systems (RDBMS), this persistent storage has been provided by magnetic spinning disks. The relative performance of magnetic disk has been so poor when compared to the rest of the hardware stack that supports the RDBMS, that database performance tuning has focused primarily on minimising this disk IO.
Only now, with the advent of practical solid state disk (SSD) technology, are we experiencing an increase in IO performance to match the improvements we have come to take for granted in CPU and memory access speeds. The arrival of SSD promises to revolutionize database performance management.
Although replacing all magnetic disk with SSD is an unattractively expensive option for many Oracle databases, almost all Oracle databases can benefit dramatically from the judicious use of solid state disk. However, it’s not always obvious how best to leverage limited quantities of SSD in order to get the best performance return from your investment. In this paper, we’ll review the performance characteristics, economics, and architecture of solid state disk with the aim of formulating best practices recommendations for solid state disk deployment in Oracle database systems.
Magnetic disk has been a ubiquitous component of mainstream computer equipment for generations of IT professionals. First introduced in the 1950s, the fundamental technology has remained remarkably constant: one or more platters contain magnetic charges that represent bits of information. These magnetic charges are read and written by an actuator arm, which moves across the disk to a specific position on the radius of the platter, and then waits for the platter to rotate to the appropriate location. The time taken to read an item of information is the sum of the time taken to move the head into position (seek time), the time taken to rotate the item into place (rotational latency) and the time taken to transmit the item through the disk controller (transfer time).
Moore’s Law – first articulated by Intel founder Gordon Moore – observes that transistor density doubles every 18-24 months. In its broadest interpretation, Moore’s Law reflects the exponential growth that is commonly observed in almost all electronic components – influencing CPU speed, RAM, and disk storage capacity.
While this exponential growth is observed in almost all electronic aspects of computing – including hard disk densities – it does not apply to mechanical technologies such as those underlying magnetic disk IO. For instance, had Moore’s Law been in effect for the rotation speed of disk devices, disks today should be rotating 20 million times faster than in the early 1960s – in fact they are rotating only eight times faster.
So as the other key components of computer performance have been advancing exponentially, magnetic disk drives have been improving only incrementally. Consequently, disk drives today are slower now (when compared to other components or even their own storage capacity) than they were 10 years ago.
Heroic efforts have been made over the years to avoid the increasingly onerous bottleneck of the magnetic disk drive. The most prevalent, and until recently most practical, solution has been to “short stroke” discs: essentially installing more discs than are necessary for data storage in order to increase total IO. This increases the overall IO capacity of the disk subsystem but has a limited effect on latency for individual IO operations.
Solid state disk technologies have far lower latencies than magnetic disk and – having only electronic components – are accelerating in both performance and capacity, as predicted by Moore’s Law.
The two main categories of Solid State Disk technology are:
- DDR RAM-based SSD, in which memory not very different from computer RAM, is used as the storage medium. A capacitor or battery is incorporated so that data can be written to a non-volatile storage medium in the event of a power failure.
- Flash-based SSDs, in which data is stored in NAND flash memory – similar to that used in USB drives and consumer devices. This memory is non-volatile, so it will not lose data in the event of a power failure.
For the purposes of this paper, we will consider only flash-based SSD. DDR RAM-based SSD is not yet a viable economic alternative to magnetic disk for mainstream Oracle databases.
Performance of SSD is orders of magnitude superior to magnetic disk devices — especially for read operations. Figure 2 compares the read latency of various types of SSD and traditional magnetic disk.
Figure 1.2. Seek times for various drive technologies
Flash technology also promises significant reductions in power consumption – a Flash-based SSD device will typically consume about 100th of the power of a magnetic disk per IO operation – see Figure 1.3.
Figure 1.3 Power consumption advantages for flash based SSD.
The promise of solid state disk has led some to anticipate a day in which all magnetic disk is replaced by solid state disk. While this might someday come to pass, in the short term the economics of storage and the economics of IO are at cross purposes and can only be resolved by combining solid state and magnetic disk technologies.
Figure 1.4 illustrates the two competing trends: while the cost of IO reduces with solid state technology, the cost per gigabyte increases. The SSD devices that offer good economics of IO offer poorer economies for mass storage. Of course the cost per GB for SSD is dropping rapidly, but no faster than the falling cost of magnetic disk or the growth in database storage demand.
Figure 1.4. Economics of storage for solid state and magnetic disk
Since most databases include both hot and cold data – small amounts of frequently accessed data as well as large amounts of idle data – most databases will experience the best economic benefit by combining both solid state and traditional magnetic disk technologies.
 Short stroking disks can improve IO seek latency by reducing the average distance the actuator arm needs to move across the disk and by concentrating data in the outer sectors of the platter where the overall rotational speed is highest.