RAM Disk vs Hard Disk

A couple of days ago I posted a small program that I created to facilitate easy creation and management of RAM disks on a Linux system. At the time, I missed a prime opportunity to do some benchmarking:

Using a RAM disk, you gain a working folder with speed way far in excess of any hard disk or even solid state drive

Just how ‘way far in excess’ is the speed of a RAM disk than a traditional hard drive? Way far indeed, and here comes the proof:

The Disks:

  • Western Digital Caviar Green (SATA, 5400RPM)
  • Western Digital Protégé (IDE, 5400RPM)
  • Intel X25-M (SATA SSD)
  • RAM Disk (DDR3, 1067MHz)
  • RAM Disk (DDR2, 800MHz)
  • RAM Disk (DDR, 400MHz)

The Tests:

I used two Linux disk tests – ‘hdparm’, which measures the speed of buffered sequential disk read operations, and ‘seeker’, a 30 second random-access test.

hdparm is a core Linux utility and will be installed on your system by default. ‘seeker’ is available from LinuxInsight. To download and compile seeker on Linux, use the following commands:

$ wget http://linuxinsight.com/files/seeker.c

$ gcc seeker.c -o seeker

To run ‘hdparm’ (where ‘/dev/sda’ is the name of your disk):

$ sudo hdparm -t /dev/sda

To run ‘seeker’ (again, where ‘/dev/sda’ is the test disk):

$ sudo ./seeker /dev/sda

The Results:

As expected, RAM disks proved to be ‘way far’ quicker than traditional drives indeed. Surprisingly, RAM disks on 800MHz DDR2 outperformed 1067MHz DDR3 in all tests, although the DDR3 tests were run under a live Linux instance, which may have skewed the results somewhat. I am a huge advocate of solid-state storage, and so was very impressed to see the Intel X25-M outperforming the DDR RAM disk – the Pentium 4 system I used to test the DDR RAM disk was no slouch a decade ago, and today we have fixed disks outperforming the volatile memory in use then.

What’s also clear from these tests is how much faster access gets when you compare mechanical with solid-state memory: the random seek test results for the X25-M are around 80x faster than both mechanical drives. Of course, the RAM drives are up to 250x faster than even the X25-M for random seek operations, reporting a 0.0ms seek time versus 0.26ms for the Intel SSD.

Detailed results below:

hdparm

Seeker (Seeks)

Seeker (Random Access Time)

3 Responses to “RAM Disk vs Hard Disk”

  1. TBWOTH (Professional Website Reviews.com) says:

    YES!!! Loving the layout and +1 button…

    • Zebedee Pedersen says:

      Thanks, the +1 button was actually super easy to add, seemed like a good idea to get a jump on G+ if it takes off.

  2. […] tool, as well as stacking the volatile disks up against fixed hard drives in a Linux I/O benchmark shootout. One thing which has always bothered me about synthetic benchmarking, however, is how far removed […]

Leave a Reply