Blog Post

Solid State Drive Performance Hands-On: Part 1

,

(Punch it, Hurb
Yo, I don't think we should talk about this
Come on, why not?
People might misunderstand what we're tryin' to say, you know?
No, but that's a part of life)

Let's talk about S-S-D
Let's talk about you and me
Let's talk about all the good things
And the bad things that may be
Let's talk megabytes\secs
Let's talk megabytes\secs

OK, I'm no Salt-N-Pepa, but now that I've got your attention (maybe even made you laugh?) I walk to spend some time talking about Solid State Drives (aka SSDs). This is the first in a series of posts about the state of SSDs as they relate to the SQL Server landscape today. Here's what I'm going to cover:

Part 1: Introduction and SSD Fundamentals
Part 2: Fusion-IO ioDrive
Part 3: OCZ Z-Drive
Part 4: SSD Performance Shootout
Part 5: Are SSDs Right For You?

So let's get started!

Introduction
Traditional hard drives (HDDs) have long been one of the biggest, if not the biggest) bottleneck in database performance. At the 2009 PASS Summit Dr. David DeWitt asserted during his keynote that disk performance has gotten slower in relative comparison to the improvements made in CPU and memory over the last 30 years. So much slower, in fact, that some of the smartest people on the planet are spending their time trying to figure out how to store data differently to get around the disk bottleneck. He mentioned that SSDs will really change our lives and provide "the only real hope" for fixing the disk performance issues.

Unfortunately one of the biggest problems with SSDs is that for years they've been extraordinarily expensive – so expensive that only the likes of the military have been able to afford them. The good news is that they're finally coming down to a price point that even SMBs can swallow. Today you can purchase SSDs in new laptops and the storage technology behind SSDs exists in mobile phones, MP3 players, and USB thumb drives.

But are SSDs a good match for SQL Server? Before I can answer that question, I'll start at the very beginning with a look at how SSDs work.

Form Factor
SSDs come in one of four form factors: SATA, PCI Express, SAS, and Fibre Channel. Generally you'll find SATA drives in notebooks and desktops ($), PCI Express drives in servers ($$), and SAS & Fibre Channel drives in SANS ($$$). PCI Express based drives are usually not bootable and require some sort of driver or software install before they can be used by the OS. Also, PCI Express based drives contain their own controller card; as such if you want to put these into a RAID solution you're limited to a software based RAID.

Storage – SLC vs. MLC
Unlike HDDs which have a lot of moving parts, SSDs are all the same at heart: a bunch of NAND flash chips and no mechanical components. Data on flash memory is stored in individual memory cells made of floating gate transistors. Today's memory cells are capable of storing either two or four states. Cells that store two states are called Single Level Cell (SLC) and hold one bit (e.g. 0 or 1). Cells that store four states are called Multi Level Cell (MLC) and hold two bits. Because SLC stores less data per cell than MLC it not only costs more to manufacture but requires a larger physical footprint to store the same amount of memory as its MLC counterpart so consequently you pay (a lot) more for an SLC based SSD.

Write Endurance
NAND flash has a limited number of times that it can be written to before it fails. SLC based flash have a lifetime of approximately 100,000 writes per cell and MLC's lifetime is around 3,000-10,000 writes per cell. A technique called wear levelling is used to avoid burning out a cell by ensuring that writes take place evenly across all cells on the SSD. A simple example is a least recently used (LRU) queue, but every manufacturer has their own wear levelling "secret sauce" to maximize the life of their drive.

Eventually cells do fail for one reason or another, so to counter this manufacturers add extra capacity to their drives that isn't available to the OS. For example, if you buy a 120 GB drive there may actually be 144 GB of capacity (e.g. 20% extra) on the board. This is known as "over provisioning".

Space Management
When data is deleted from an SSD it isn't really deleted – it's just marked as not in use…in order to reuse the space safely the SSD needs to be told it's OK to overwrite. This is referred to as a TRIM command, and prior to Windows 7 & Windows 2008 R2 implementation of TRIM was left to each SSD manufacturer (Win7 & 2008 R2 now support this as part of the OS). Some implementations required massive amounts of RAM, and in some cases very undesirable things could happen to performance (or to the drive itself) if there wasn't enough RAM available. TRIM is a background process and not something that you need to be concerned about running manually.

Performance
Know that you know the fundamentals of how SSDs work, let's talk performance. In part 2 of this series I will take a look at how the ioDrive, a PCI Express based solution from Fusion IO, handles SQL Server activity.

Note: This post is part of T-SQL Tuesday #004 which is focused on IO this week. Follow the link to check out the other IO related posts from some great SQL bloggers!

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating