USB Flash Disk

Hi

I am testing the write speed of a USB flash disk, and the results are very poor (also getting kernel panics occasionally):

  dd count=100 bs=1M if=/dev/urandom of=/mnt/usbdisk01/test
  100+0 records in
  100+0 records out
  104857600 bytes (105 MB) copied, 95.6082 s, 1.1 MB/s

Is this due to the limitation of the realtime kernel?

From top, I can see dd saturating one of the cpu cores:

Tasks: 119 total,   2 running, 117 sleeping,   0 stopped,   0 zombie
%Cpu0  :  2.2 us,  2.2 sy,  0.0 ni, 95.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.0 us,  9.2 sy,  0.0 ni, 90.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.0 us, 11.1 sy,  0.0 ni, 88.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.0 us,100.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:    883716 total,    83204 used,   800512 free,    11872 buffers
KiB Swap:        0 total,        0 used,        0 free,    37876 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 2460 root      20   0  6288 3676 2716 R  86.7  0.4   0:11.81 dd
   67 root     -51   0     0    0    0 S  15.7  0.0   2:10.30 irq/75-dwc_otg_
   65 root     -51   0     0    0    0 S  14.1  0.0   2:05.51 irq/75-dwc_otg
   66 root     -51   0     0    0    0 S  11.5  0.0   1:36.63 irq/75-dwc_otg_

Regards
Keith

Please ignore, I have changed the test to use /dev/zero, not quite the best test, but it removes the bottleneck from dd.

Along similar lines switching from Class 10 or U1 SD cards to U3 (recently dropped in price from SanDisk and Samsung) differs from about 25mb/s to 95mb/s write. Maybe you don’t need a stick and can save space if an upgraded SD will do. Assuming you’re not using some crazy big USB memory stick beyond the reasonably priced U3 SD cards.

I am planning to store recorded video/audio to the USB disk, so it is really more for robustness. Ie USB stick dying will not kill OS running on SD…