Mailinglist Archive: opensuse-factory (949 mails)

< Previous Next >
[opensuse-factory] Improving SSD performance
  • From: Jeff Mahoney <jeffm@xxxxxxxx>
  • Date: Fri, 28 Aug 2009 10:17:43 -0400
  • Message-id: <4A97E707.8040009@xxxxxxxx>
Hi all -

I did some performance testing with SSDs to gauge what factors are
important in trying to tune for them. I've ignored parameters that will
increase performance in all cases (noatime,nodiratime,etc) and focused
on SSD-specific (and RAID) factors like striping and alignment.

The thing about SSD devices is that they have more in common with RAID
controllers than spinning disks. Behind the ATA interface lie a number
of chips which the device's firmware is responsible for managing. Like
RAID controllers, some do this better than others. The higher end
devices will have smarter firmware and better chips. They may even make
this research moot. For performance on netbooks, the cheap low-end
devices are of particular interest.

All of the following numbers were the result of running dbench -s 2
(synchronous mode, 2 threads). My test systems are dual core.

Some details:
- Unaligned means that the first partition starts at sector 63 and each
cylinder is 16065 sectors.
- Aligned means that the first partition starts at sector 256. For my
testing the cylinder size was ignored, but it's possible to align
cylinders to 128k with H=224 and S=56.
- The file system is ext4 with various options.
- I ran each test 3 times.
- All tests were run from a rescue image of the 32 bit version of
openSUSE 11.2m3. The only reason for this is that I hadn't downloaded
a newer version for 32-bit systems yet.

The columns correspond to:
Run 1 MB/s Run 2 MB/s Run 3 MB/s Avg MB/s Percent improvement

Acer Aspire One, PATA, 8 GB Intel SSD (SSDPAMM008G1)
hdparm results unavailable (took the disk out)
Unaligned, no options: 2.187 2.118 2.169 2.158 0%
Unaligned, -E stripe-width=32: 2.410 2.472 2.415 2.432 +12.7%
Unaligned, -E stripe-width=128: 2.281 2.446 2.263 2.330 +7.8%
Unaligned, -E stride=32: 2.165 2.241 2.145 2.184 +1.2%

Aligned, no options: 2.379 2.517 2.268 2.388 +10.7%
Aligned, -E stripe-width=32: 2.604 2.541 2.816 2.654 +23.0%
Aligned, -E stripe-width=128: 2.544 2.816 2.574 2.645 +22.6%
Aligned, -E stride=32: 2.368 2.313 2.445 2.375 +10.0%

Lenovo Thinkpad X300, SATA, 64 GB Samsung SSD (MCCOE64G)
hdparm -t: 88.92 MB/s
hdparm --direct -t: 103.27 MB/s
Unaligned, no options: 21.239 21.511 21.317 21.356 +0%
Unaligned, -E stripe-width=32: 21.231 21.345 21.529 21.368 +0.06%
Unaligned, -E stripe-width=128: 21.648 21.410 21.370 21.476 +0.06%
Unaligned, -E stride=32: 21.674 21.583 21.289 21.513 +0.07%

Aligned, no options: 24.381 24.619 24.430 24.569 +15.0%
Aligned, -E stripe-width=32: 24.580 24.523 24.605 24.569 +15.0%
Aligned, -E stripe-width=128: 24.282 24.369 24.436 24.362 +14.0%
Aligned, -E stride=32: 24.600 24.577 24.546 24.574 +15.1%

I had another SSD for my Aspire but its performance under dbench is very
suspect (< 1MB/s despite a hdparm of ~ 60 MB/s), so I haven't included
those results.

The results, with a whopping two test devices, seem to indicate that
alignment helps on low and high end devices while striping seems to help
on low end devices. I'd be interested to hear how a larger cross section
of devices perform. I'll also have results from LVM volumes later today.
Since the placement of LVs can also affect alignment, it may be worth
looking at as well.

To reproduce, boot from a rescue image. Copy the test script and the
dbench rpm to the host. Install dbench under /lib/firmware (it's a tmpfs
dir) with rpmcpio <rpm> | cpio -id. Run the test script. Note that the
test script *will* overwrite whatever data is on /dev/sda including the
partition table. You can't have anything else from that disk mounted
since you're messing with the partition table, which is why you need the
rescue image. You'll have to reinstall from scratch afterwards unless
you're using a "test" device somehow.

-Jeff

--
Jeff Mahoney
SUSE Labs
< Previous Next >