SD speed class - it matters for Raspberry Pi disk performance.

The Raspberry Pi uses Secure Digital (SD) cards for non-volatile internal storage.

SD cards vary mainly on two factors:

  1. Size (GB)
  2. Speed

The cost of SD cards is usually a function of their size and speed. There are many different levels of “speed” for SD card represented by a “class” rating of 2, 4, 6, and 10. The number is ideally (but not always) the maximum throughput of the card in MB/Sec.

Raspberry Pi disk performance

While it may have been a silly thing to wonder, I was curious if the Raspberry Pi disk performance would be impacted by the SD speed class I selected. I wanted to see if I’d actually see a practical real-world difference between different SD card “classes” in two of my Raspberry Pi computers.

Comparing SD class performance

For this test, I used two Raspberry Pi “B” models, revision 1.1. I obtained two SD cards and installed the newest clean version of Raspbian on them. The SD cards I used were these two units:

To benchmark the IO performance, I used Phoronix Test Suite v4.4.1 with the Dbench 4 test. All services which would cause disk performance degradation were stopped. The two units were set up identically (same file system, services, etc.)

The results

The results show a signifiant difference in performance between the class 4 and class 10 cards. The class 4 card had an average performance of 0.87 MB/sec while the class 10 card had an average performance of 5.75 MB/sec

Class 4 results

Phoronix Test Suite v4.4.1 System Information Hardware: Processor: ARMv6-compatible rev 7 @ 1.00GHz (1 Core), Motherboard: BCM2708, Memory: 485MB, Disk: 4GB SD04G Software: OS: Debian Linux 7.0, Kernel: 3.6.11+ (armv6l), Compiler: GCC 4.6, File-System: ext4, Screen Resolution: 656x416 Would you like to save these test results (Y/n): n Dbench 4.0: pts/dbench-1.0.0 [Client Count: 1] Test 1 of 1 Estimated Trial Run Count: 3 Estimated Time To Completion: 37 Minutes Started Run 1 @ 20:39:29 Started Run 2 @ 20:51:32 Started Run 3 @ 21:03:35 [Std. Dev: 1.01%] Test Results: 0.860377 0.861668 0.876174 Average: 0.87 MB/s

Class 10 results

Phoronix Test Suite v4.4.1 System Information Hardware: Processor: ARMv6-compatible rev 7 @ 1.00GHz (1 Core), Motherboard: BCM2708, Memory: 485MB, Disk: 16GB SD Software: OS: Debian Linux 7.0, Kernel: 3.6.11+ (armv6l), Compiler: GCC 4.6, File-System: ext4, Screen Resolution: 656x416 Would you like to save these test results (Y/n): n Dbench 4.0: pts/dbench-1.0.0 [Client Count: 1] Test 1 of 1 Estimated Trial Run Count: 3 Estimated Time To Completion: 37 Minutes Started Run 1 @ 12:24:17cd .. Started Run 2 @ 12:36:21 Started Run 3 @ 12:48:23 [Std. Dev: 5.57%] Started Run 4 @ 13:00:26 [Std. Dev: 6.80%] Started Run 5 @ 13:12:29 [Std. Dev: 5.91%] Started Run 6 @ 13:24:34 [Std. Dev: 5.88%] Test Results: 6.0909 5.55299 6.15532 5.36009 5.88421 5.46419 Average: 5.75 MB/s

Conclusion

There was a major difference between the two cards. Given the small incremental cost difference between the two, the class 10 cards are likely worth the extra expense, especially in cases where disk IO is important. I also won’t be using class 4 cards in my units as it looks rather pitiful.

One should keep in mind that the performance will vary with other tests and by manufacturer. Moreover, there are “ultra” cards which offer better performance and may offer better IO than the class 10 card I tested.