release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox's USB Stack Performance

Rockbox's USB Stack Performance

Since the early part of February 2008, there has been working USB Mass Storage code available which works with Rockbox targets based on the PortalPlayer SOC. This page endeavours to list performance figures for this new code, and where appropriate, compare it to the performance of the existing USB implementation of the original firmware of the device in question. The test is run using a variation of the below command from a GNU/Linux based host computer :

time dd if=/dev/sdb1 of=/dev/null bs=32k count=1000

This will copy around 32MB from the device to the host and time the process.

In the below tables, there is a column included for the iPod's emergency disk mode. No other target has this, so if you're logging stats for a Sansa, or an H10 - just put an N/A there.

If possible, please also provide results from the test_disk plugin (enable it in apps/plugins/SOURCES first), preferably the 4k and 1M read and write results

Read Tests

Read Tests
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 30GB 33 MB copied, 36.3426 seconds, 902 kB/s 33 MB copied, 6.96309 seconds, 4.7 MB/s 33 MB copied, 5.04788 seconds, 6.5 MB/s
Apple iPod G5.5 80GB 33 MB copied, 7.13356 seconds, 4.6 MB/s 33 MB copied, 5.59582 seconds, 5.9 MB/s 33 MB copied, 2.10249 seconds, 15.6 MB/s
Apple iPod G4 Color 20GB 33 MB copied, 37.7545 seconds, 868 kB/s 33 MB copied, 2.77807 seconds, 11.8 MB/s 33 MB copied, 4.77862 seconds, 6.9 MB/s
Sansa e280 33 MB copied, 31.8638 seconds, 1.0 MB/s N/A 33 MB copied, 6.49272 seconds, 5.0 MB/s

Write tests

All the below write tests were carried out using the "Full speed" code in svn, since the "High speed" code is still unstable.

Write Tests without file system

For writing tests, I've chosen a smaller file (Exactly 2,000 KBs). This is written to a blank portion of the firmware partition on an iPod to avoid file system overheads.

dd if=usb_write_test_file of=/dev/sdb1 seek=81481328 of=/dev/sdb1 bs=1 count=2048000
Write Tests without file system, 1 byte blocks
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 80GB 2.0 MB copied, 11.4601 seconds, 179 kB/s 2.0 MB copied, 13.6215 seconds, 150 kB/s 2.0 MB copied, 5.67416 seconds, 361 kB/s
Sansa e280 2.0 MB copied, 13.0877 seconds, 156 kB/s N/A 2.0 MB copied, 5.41716 seconds, 378 kB/s

dd if=usb_write_test_file of=/dev/sdb1 bs=512 seek=159168
Write Tests without file system, 512 byte blocks
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 80GB 2.0 MB copied, 7.80524 seconds, 262 kB/s 2.0 MB copied, 3.06318 seconds, 669 kB/s 2.0 MB copied, 1.66251 seconds, 1.2 MB/s
Sansa e280 2.0 MB copied, 7.31831 seconds, 280 kB/s N/A 2.0 MB copied, 1.54657 seconds, 1.3 MB/s

dd if=usb_write_test_file of=/dev/sdb1 bs=32K seek=2487
Write Tests without file system, 32768 byte blocks
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 80GB 2.0 MB copied, 2.19708 seconds, 932 kB/s 2.0 MB copied, 0.639433 seconds, 3.2 MB/s 2.0 MB copied, 0.453703 seconds, 4.5 MB/s
Sansa e280 2.0 MB copied, 2.06509 seconds, 992 kB/s N/A 2.0 MB copied, 0.416359 seconds, 4.9 MB/s

Write Tests with file system mounted in "sync" mode

Using mounts "-o sync" option means that the linux kernel doesn't try to cache reads or writes to the filesystem, so gives a better idea of true performance.

dd if=usb_write_test_file of=/mnt/ipod/Data/usb_test bs=512
Write Tests with file system, 512 byte blocks
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 80GB 2.0 MB copied, 56.3868 seconds, 36.3 kB/s 2.0 MB copied, 135.977 seconds, 15.1 kB/s 2.0 MB copied, 59.9473 seconds, 34.2 kB/s
Sansa e280 2.0 MB copied, 73.2372 seconds, 28.0 kB/s N/A 2.0 MB copied, 13.9875 seconds, 146 kB/s

dd if=usb_write_test_file of=/mnt/ipod/Data/usb_test bs=32K
Write Tests with file system, 32768 byte blocks
Device Name Time taken by RB USB Time taken by Emergency Disk Mode Time taken by OF
Apple iPod G5.5 80GB 2.0 MB copied, 7.10808 seconds, 288 kB/s 2.0 MB copied, 13.8099 seconds, 148 kB/s 2.0 MB copied, 6.26915 seconds, 327 kB/s
Sansa e280 2.0 MB copied, 17.757 seconds, 115 kB/s N/A 2.0 MB copied, 3.0539 seconds, 671 kB/s


I Attachment Action Size Date Who Comment
usb_write_test_fileEXT usb_write_test_file manage 2000.0 K 22 Feb 2008 - 15:59 BryanChilds File used to do write tests. Exactly 2MB in size.
r14 - 22 Mar 2008 - 23:00:16 - AlexZajac
Copyright by the contributing authors.