Everyone loves SSD.  It’s a hot topic all around the MySQL community with vendors lining up all kinds of new solutions to attack the “disk io”  problem that has plagued us all for years and years.  At this year’s user conference I talked about SSD’s and MySQL.   Those who follow my blog know I love IO and I love to benchmark anything that can help overcome IO issues.  One of the most exciting things out their at this point are the Intel x-25e drives.  These bad boys are not only fast but relatively inexpensive.  How fast are they?  Let’s just do a quick bit of review here and peak at the single drive #’s from sysbench.    Here you can see that a single X25-e outperforms all my other single drive test.

Yep you have probably seen this type of chart on other sites…   The great thing about the Intel drives is their performance on writes, this difference gives them a significant leg up on other early generation SSD’s.  But enough single drive talk.  Everyone really wants to know how the drives perform in a RAID setup, So let’s jump right into my RAID tests.  My goal is to try and figure out the optimal settings for running the Intel drive in a RAID setup (basically start building a best practices for deploying SSD’s and RAID).  Then after we have figured out the “optimal configuration”  we can then use it to benchmark against standard disk.

First if you have read my blog or followed the MySQL Performance blog you know that by default the Intel drives are not exactly safe for use in the enterprise. They contain 64Mb of volatile write cache on the drive that during an unexpected  disruption of power will cause data to be lost. Unfortunately what that means is to ensure your data is protected, you have to trade off some performance disabling this extra cache.   That performance tradeoff can be huge, In fact in many of my test the performance is cut in half:

Still fast, just not the blazing speeds I had hoped for when I first started testing.  On top of performance concerns, I wonder what sort of reliability the Intel drive will  have if the drive cache is disabled long term? There is already a lot of concern around flash’s reliability long term as it is.  You see, flash has a finite number of write cycles ( number of times a block can be erased ).   Intel claims 100,000 write cycles for the x-25e SLC drive.  While this sounds small, but the wear leveling algorithms on the drive help significantly, so much so some reports claim even under the most heavy load you will not see issues for years and years.  For more background information  you can read lots more on this here:  http://techreport.com/articles.x/15931 and here:  http://www.tomshardware.com/reviews/Intel-x25-m-SSD,2012-5.html.   But back to my point:  I suspect the drive cache is heavily utilized in the drive wear leveling operations.  If it is, that means this is helping to stave off the “write” cycle issue.   Disabling the drive cache therefore could not only be hurting your performance, but also maybe hurting the drives reliability.  What does that mean to you?  probably nothing right now, it’s more something to keep in the back of your mind.     Uunfortunately with new technology like this its hard to give concrete examples of how long you can go before you start seeing issues.   I suspect more data will be available in the coming years ( which is not a comforting thought if you are an early adopter ).     But i suspect your reliability will be driven more  from your workload then the cache.  Has anyone else seen numbers or datat on wear leveling issues with the drive cache disabled?

Another concern with disabling the write cache is internal fragmentation of data. Once again I have no data or information to support this, it’s just a theory… but the MLC Intel drives actually have been plagued with insane amounts of drive fragmentation which causes significant performance slowdowns.  Intel has released  firmware for this on the MLC side and I have not seen reports on the SLC.  The question is will the lack of “write cache” increase the likelihood of this happening to the SLC drives over time? This will require more tests to understand.

Bottom line, disabling the write cache:  is good for data, is bad performance, and maybe bad for reliability. What can you do? One possible scenario is looking at adding a UPS to your SSD enabled servers.  Not the perfect solution, but using the UPS to shutdown the server cleanly when a power outage is detected can help mitigate this issue ( it will not eliminate it ). While many data centers ( and certainly the high end ones ) have lots of redundant power, there is still the chance that your sysadmin trips over the power cable, or accidentally yanks something out of the wrong server.   There has to be a better way, any ideas?  I heard that the SUN open storage boxes have SSD’s with capacitors on them that help solve this which is great.    In the commodity space hopefully vendors will step up here.

Part 2->

  • Controller Cache Tests
  • Raid 5 -vs- Raid 10
  • Software -vs- Hardware
  • IO Schedulers
  • DBT2 Tests
  • Comparison -vs- 10K Raid setup