LJ Archive

My Move to Solid State

Kyle Rankin

Issue #171, July 2008

If you are dissatisfied with your laptop hard drive's performance, you should consider moving to a new state—solid state. Read on for head-to-head comparisons between a standard laptop hard drive and a solid state model.

I love small laptops. If you ask any of my friends, they will tell you that even a laptop with a 12" screen, no matter how cool, is just too big for me. My very first laptop was a Toshiba Libretto 50CT, which was around the size of a VHS tape (for those of you who remember those), and from there, I have progressed through the Fujitsu P series with a P2110, P7010 and now a P1610—an 8.9" ultra-portable tablet. I use this laptop as my primary machine with few complaints, but when I made the jump to a tiny 8.9" tablet from my old 10.6" sub-notebook, I also had to drop from a 2.5" to a 1.8" hard drive.

For me, especially at first, a 1.8" hard drive wasn't the end of the world. Even though I had upgraded to 5400rpm drives on my other laptops, to me, the decrease in size for the overall laptop was worth any drop in performance. Plus, until recently, it wasn't like I had much choice: 1.8" drives maxed out at 4200rpm. Then I heard about solid state drives. Unlike a traditional hard drive that relies on a head and a spinning platter, solid state drives act more like Flash storage you might use in your camera or on a USB key. Not only are there no moving parts to wear out and much faster seek times, the 1.8" solid state drives I saw touted faster sustained read and write times as well.

Although I have read a number of benchmarks and anecdotes about solid state drives, it always seemed like a mixed bag. Windows users talked about much faster startup times and better overall responsiveness, while the Mac reviews I read seemed to indicate the difference in performance was minimal. I didn't see too many benchmarks about Linux systems, and with the high price tag of solid state drives, I went back and forth on which price point I was willing to pay.

One day I decided to take the plunge and bought a 1.8" Samsung solid state drive for my laptop. In the process, I have taken some comparison benchmarks between my old drive and my new solid state drive. Although statistics can be handy, I decided to take a more tangible approach to my comparisons. I used some standard benchmark tools, but the majority of my comparisons deal with everyday tasks to give you a better idea of what it's really like to have a solid state drive on a Linux system.

The Testing Methodology

First, I should tell you what hardware is being compared. All tests were run on my trusty Fujitsu P1610. It has an Intel 1.2GHz ULV Core Solo processor with 1GB of RAM and is running Ubuntu 7.10. The original hard drive was a 4200rpm Toshiba MK6006GAH, and I am comparing it to a Samsung MCBOE32G8APR solid state drive. When reasonable, I tried to run tests multiple times so I could get an average reading; however, just so you know, most of the tests ended up being pretty consistent between tries. Also, when necessary I rebooted the machine before performing follow-up tests so that any files Linux might have cached into RAM would not affect the results.

Test 1: GRUB to Login

For the first test, I used a stopwatch to time how long it took the system to go from the GRUB boot prompt to my login screen. Depending on how you use your laptop, you may boot it every day, or you may hibernate or suspend between uses. In either case, a slow boot time can be painful when you want to get right to work. The boot process is both disk- and processor-intensive, but even so, when comparing the results, you'll see a significant difference:

  • 4200rpm: 50 seconds

  • SSD: 34 seconds

Test 2: Login to Desktop

The next logical test is the time it takes from your login to a usable desktop. For my laptop, I use the default desktop environment that comes with Ubuntu (GNOME), but I also have terminals, applets and Firefox all launching at startup. As a result, my numbers might differ a bit from yours, but they give a good sense of the difference between the two drives:

  • 4200rpm: 59 seconds

  • SSD: 23 seconds

Wow. Although I knew to a degree that it took some time for my desktop to come up with the old hard drive, I didn't realize until this test that it actually took almost an entire minute! By comparison, the SSD took less than half the time, in part due to the increased read speed and the much faster seek times, especially when loading files at random (see the bonnie++ test below to corroborate this). So far, the SSD is looking pretty good. If you combine both tests, the 4200rpm drive took 109 seconds—almost two minutes—to go from the GRUB prompt to a usable desktop, and the SSD took 57 seconds—almost half the time.

Test 3: Untar the Kernel

For the next test, I decided to time how long it took to extract the 2.6.22 kernel bzipped tarball. Now, because this tarball is bzipped, a good deal of the stress on the system will be on the CPU, not the disk. However, because most tarballs are compressed, and it is a pretty common desktop activity, I thought it was still worth comparing. The results weren't nearly as dramatic as the first two tests (due to the activity being mostly CPU-bound), but the SSD still beats the 4200rpm drive by 13 seconds:

  • 4200rpm: 66 seconds

  • SSD: 53 seconds

Test 4: Suspend to Disk

Many laptop users (myself included) rarely boot and shut down their systems between uses. Instead, they rely on the hibernation and suspend features to save their current state and resume to it quickly. With hibernation, the laptop writes its current state to disk and powers off. With suspend, the laptop keeps its current state in RAM and stays on in a low-power state. Because the hibernation process is so disk-heavy, I decided it would be a good way to test whether an SSD gave any speed benefit. So, for the first test, I measured the time from enabling hibernation until the system powered off:

  • 4200rpm: 75 seconds

  • SSD: 50 seconds

Again, before I saw the numbers, I didn't realize it had taken more than one minute 15 seconds to shut down and preserve my 1GB of RAM. Although the SSD still took some time, it beat the old drive by 25 seconds.

Test 5: GRUB to Resume

The follow-up to my hibernate test was to resume from the hibernation state. I started the clock once I pressed Enter at the GRUB prompt and stopped it once I got to the login window for my locked screen:

  • 4200rpm: 83 seconds

  • SSD: 38 seconds

This result really surprised me. The SSD fared better than the 4200rpm drive when suspending to disk, but it was more than twice as fast when resuming! When you compare the combined tests, the 4200rpm drive takes 158 seconds to suspend and resume, and the SSD shortens the process down to 88 seconds.

Test 6: Traditional Benchmarks with hdparm and bonnie++

Even though the everyday benchmarks were enough to convince me of the speed benefit of an SSD, I knew a lot of you also would want some raw data to compare. So, I also ran hdparm and bonnie++ on both drives with some interesting results. First, I ran hdparm three times in a row:

4200rpm:

/dev/sda3:
 Timing cached reads: 1842 MB in 2.00 seconds = 921.90 MB/sec
 Timing buffered disk reads: 64 MB in 3.08 seconds = 20.79 MB/sec
/dev/sda3:
 Timing cached reads: 1814 MB in 2.00 seconds = 907.56 MB/sec
 Timing buffered disk reads: 64 MB in 3.08 seconds = 20.78 MB/sec
/dev/sda3:
 Timing cached reads: 1794 MB in 2.00 seconds = 897.43 MB/sec
 Timing buffered disk reads: 62 MB in 3.04 seconds = 20.39 MB/sec

SSD:

/dev/sda:
 Timing cached reads: 1894 MB in 2.00 seconds = 947.80 MB/sec
 Timing buffered disk reads: 80 MB in 3.07 seconds = 26.02 MB/sec
/dev/sda:
 Timing cached reads: 1894 MB in 2.00 seconds = 947.61 MB/sec
 Timing buffered disk reads: 80 MB in 3.08 seconds = 26.00 MB/sec
/dev/sda:
 Timing cached reads: 1886 MB in 2.00 seconds = 943.86 MB/sec
 Timing buffered disk reads: 78 MB in 3.00 seconds = 25.99 MB/sec

As you can see, the SSD certainly is faster; however, there is not nearly as large a margin as with some of the other tests. The bonnie++ results show a different story:

4200rpm:

 ------Sequential Output------ --Sequential Input- --Random-
 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
2G 11309  52 11272   3  4921   2 10715  44 11471   2  83.8   0
 ------Sequential Create------ --------Random Create--------
 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
 16   190   2 +++++ +++   177   1   196   2 +++++ +++   154   1
minimus,2G,11309,52,11272,3,4921,2,10715,44,11471,2,83.8,0,16,190,
↪2,+++++,+++,177,1,196,2,+++++,+++,154,1

SSD:

 ------Sequential Output------ --Sequential Input- --Random-
 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
2G 18155  94 23125   8 12521   8 20818  94 28149   8  1226   5
 ------Sequential Create------ --------Random Create--------
 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
16  1128  11 +++++ +++  1101  10  1158  10 +++++ +++   449   4
minimus,2G,18155,94,23125,8,12521,8,20818,94,28149,8,1226.4,5,16,
↪1128,11,+++++,+++,1101,10,1158,10,+++++,+++,449,4

Well, that's certainly a lot of data. A few numbers do stand out though. On sequential output and input, the SSD's performance is almost twice that of the 4200rpm drive, except in random seeks where it is actually 14 times faster with 1,226 seeks per second! Because there is no spinning platter, random seeks are one area where a solid state drive really shines. The next level of stats compares the speed of creating files on the system sequentially and at random. It is here that we see another huge advantage for the SSD, as it is five times faster at sequential creates, six times faster at sequential deletes and almost six times faster at random creates.

Is It Worth It?

All of these numbers aside, the question you might be asking is, “Is it worth it?” For me, the answer is a definite yes. Not only is my system back to the snappiness I remember with past laptops, it also no longer seems to get bogged down during disk-heavy operations like when my backup software kicks off. That reminds me of another point—noise. With no moving parts, the SSD is basically silent. The only noise on my laptop now is from the fan. The other day I was using my laptop and noticed that the fan had gone to almost top speed. After some time, I decided to check the system temperature to see whether my laptop was really that hot. It turned out that my network backup job had kicked off and was rsyncing. This is a CPU- and disk-heavy operation, and with my old drive, I instantly would know when it kicked off, because the system would slow down, and I would hear the all-too-familiar clicking and clacking of my hard drive. Now, due to the snappiness of the desktop and silence of the SSD, I wasn't even aware the backup was happening.

Whether the performance of an SSD is worth it to you depends on a variety of things. If you are stuck with a 1.8" 4200rpm drive like I was, there aren't too many other options for you (although a 5400rpm 1.8" drive should be available for purchase soon), but if you have a larger drive with up to 7200rpm spindle speeds and SATA interfaces, you definitely will want to compare the posted speeds of comparable drives—it's possible that the current generation of SSDs won't offer you many speed benefits. There also are other factors to consider, including the potential power savings some SSDs offer. Plus, with the lack of moving parts, you not only get a quieter system, you also potentially get a more durable one. On the downside, even with write-leveling technologies, there still are a finite number of writes you can make to an SSD, although most manufacturers claim that the life of an SSD still exceeds that of traditional drives.

If you do decide to get a solid state drive, be sure to do your homework. There are a number of different laptop hard drive interfaces these days, so if you have a 1.8" drive, be sure to check whether you use a ZIF or non-ZIF connector. And, if you want to use a 1.8" SSD in your 2.5" laptop, be sure that a compatible adapter exists (I've seen some sellers include adapters as a package deal).

Kyle Rankin is a Senior Systems Administrator in the San Francisco Bay Area and the author of a number of books, including Knoppix Hacks and Ubuntu Hacks for O'Reilly Media. He is currently the president of the North Bay Linux Users' Group.

LJ Archive