Java Performance Services
Training, Seminars, Benchmarking, Tuning

Java Performance Tuning Course


Chania Crete, May 17-20, 2010


Sun Extreme Learning EXL-2025

Houston, December 1-4,2009
New York, December 8-11, 2009
Washington DC, January 5-8, 2010



San Francisco, January 11-14

Anti-if

I have joined Anti-IF Campaign

Calendar

««Nov 2009»»
SMTWTFS
1234
5
67
891011121314
15161718192021
22232425262728
2930

Performance Anti-Patterns

My Top Tags

                                       

Mailing List

My RSS Feeds








Can SSD deliver on it's promises

posted Friday, 6 March 2009

It's been a while since high end laptops started being sold with solid state drives (SSD). While the hope of some that SSD would decrease power consumption, my hope was that it would also help with latency. My interest was again peaked yesterday when John Davies finally took delivery of his new 17" fully decked out MBP. The machine was delivered with a 256Gig SSD. So, the question was, just how much better was this drive than the sickly little 5400 rpm drive that I have in my older 17" MBP. To answer this question, John and I used two different applications.

The first application is a pure Mac hardware benchmark called Xbench. The resulting differences were stunning. Here are John's results of the disk test (one of many)

Disk Test    83.23   
    Sequential    82.84   
       Uncached Write    137.80    84.61 MB/sec [4K blocks]
       Uncached Write    107.65    60.91 MB/sec [256K blocks]
       Uncached Read    37.58    11.00 MB/sec [4K blocks]
       Uncached Read    194.89    97.95 MB/sec [256K blocks]
    Random    83.62   
        Uncached Write    48.42    5.13 MB/sec [4K blocks]
        Uncached Write    43.44    13.91 MB/sec [256K blocks]
        Uncached Read    571.17    4.05 MB/sec [4K blocks]
        Uncached Read    414.46    76.91 MB/sec [256K blocks]

So, the numbers don't really mean much without a point of comparison. My numbers are;

Disk Test    41.50   
    Sequential    70.37   
        Uncached Write    70.61    43.35 MB/sec [4K blocks]
        Uncached Write    68.32    38.65 MB/sec [256K blocks]
        Uncached Read    64.36    18.84 MB/sec [4K blocks]
        Uncached Read    79.97    40.19 MB/sec [256K blocks]
    Random    29.43   
        Uncached Write    10.62    1.12 MB/sec [4K blocks]
        Uncached Write    60.40    19.34 MB/sec [256K blocks]
        Uncached Read    66.27    0.47 MB/sec [4K blocks]
        Uncached Read    98.54    18.28 MB/sec [256K blocks]


The results are eye opening!  The overall rating for SSD is 2x that of my conventional disk. That said, SSD isn't a win everywhere. My machine won the sequential uncached reads race as well as the uncached write of blg blocks race. In fact, I was surprised to see that overall sequential score isn't all that different between the two technologies. In retrospect, that result confirms why we often feel a performance boost after we've defragmented our disks. Disks are highly tuned to read data sequentially. The other win would also appear to play right into disk technologies performance sweet spot.

My question became; if these numbers can be extrapolated to the general experience, how does a 2x better score translate into a significantly better user experience as is being reported by those using SSD? The activities that just everyone is reported as benefitting from SSD is faster boot time and application startup times. But then bootup activities are dominated by random uncached reads as are many application startup sequences. Hence this activity falls into SSD's sweet spot. If rebooting is the same cost as waking up from sleep, it is no wonder that users are thrilled with SSD.

From that benchmark we went on to run an application that is included in my performance tuning course. The application reads data from disk and then does some work. There are two versions of the application, one that uses java.io.BufferedReader and one that doesn't. While the app is not purely IO, it is dominated by IO. First numbers from the unbuffered version.

 

The results from John's laptop were;

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
500000 (count); time 2658
250000 (count); time 2611
150000 (count); time 3152

From my laptop I got;

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
500000 (count); time 4538
250000 (count); time 3641
150000 (count); time 4242

 As one would expect, results change dramatically when we add in java.io.BufferedReader. First from John's machine we have;

500000 (count); time 254
250000 (count); time 207
150000 (count); time 438

where as I report

500000 (count); time 362
250000 (count); time 316
150000 (count); time 588

While adding the buffer to the application reduced the overall execution time, it did little to change the runtime ratios. In fact I suspect that the majority of the time difference between the two laptops in the last test can be attributed to John's newer faster version of the MBP. That run has a much greater amount of computation for the same amount of IO.

No Free Lunch

It's not often that we get something for free and I'm not talking about price. SSD is currently much more expensive than a traditional hard drive but then, SSD (at this scale and purpose) is still quite new and the price / capacity ratio is still high and while capacities are still pretty small. I can quite easily get a traditional disk at 4x capacity at 1/10 the cost. This makes SSD about 40x price gap more expensive. However, this has always been the case when new technologies have been introduced, especially new disk technology.

The bigger SSD promise was in power savings. SSD should be much much cheaper on power than running all of those motors needed to move arms and spin platters. And it should except hard drive manufacturers have come a long long way in reducing the amount of juice needed to make these things work. So much in fact that the power requirements for a first generation SSD is about 10x that of a conventional  disk drive! Those number only look worse if you compare them against the requirements for an advanced drive such as the Hitachi Travelstar.

Of course this data has been derived from benchmarks and as everyone knows, your milage may vary. But there is some credience to these result. For one, the SSD manufacturers themselves are saying that power management in first generation SSD technology isn't quite there yet. They are also claiming that drives that don't include smart power management capabilities will soon be driven from the market. It is this assertion that SSD's are finally starting to deliver on and when they do, it is clear that SSD will leave convential drive technology in the dust! Until then you may want to hold off on SSD unless the idea of new and shiny is too appealing.

tags:      




1. Paris Apostolopoulos left...
Friday, 6 March 2009 11:12 am :: http://javapapo.blogspot.com

Hello Kirk greetings from Athens, Very nice article by the way, really helpfull. You are right at the end, we can still wait a bit , until we invest on a upgrade boost for our old mac?


2. Patrick Wright left...
Friday, 6 March 2009 3:10 pm

Interesting, thanks for posting the stats. I was just talking with a friend this week about the wisdom of hosting our source code modules (and build output directories) on an SSD drive, especially since the smaller drives are now reasonably priced. I'd be interested in seeing stats for a full/clean build of a large project, as well as comparisons against a RAM FS (as an alternative for hosting source modules).

Patrick


3. Nick left...
Friday, 13 March 2009 6:52 pm

Very interesting results. Would it be possible to have access to the java code you used for the benchmark? thanks!


4. Kirk Pepperdine left...
Sunday, 15 March 2009 9:18 am :: http://www.kodewerk.com/

I'd suggest that you compile a large project on SSD or a regular disk as one of your own tests. You could try compiling the JDK sources for example.


5. Intel X25-M left...
Monday, 13 July 2009 3:00 am

Thanks for the post, I'm a noob when it comes to tech but it seems like getting an SSD would offer a great performance boost to my MBP. Some people are even claiming that buying an SSD for there computer was the best money spent.