I am writing files to a USB 2.0 drive from a RAM disk, that has a 256MB random filled file on it (created from /dev/urandom to stop the file being compressed too much). When I look at the speeds of the file writes which is output from dd, they are averaging around 75MB/s. This is particularly interesting, because the theoretical maximum speed of USB 2.0 is 60MB/s.
The command that I'm running is:
dd if=/var/mnt/temp_data/urandom of=/mnt/usb/$FILE_NAME bs=10M count=1
Note that I'm running this multiple times, and I fill the drive to 95% full. The reason for the 10MB files is to make sure that the drive is pretty close to 95% full, and I wouldn't get that sort of fill with larger files, as I don't know what size memory stick will be plugged in, and having multiple files is part of the test.
If motives affect write speed, what I'm doing is testing the write speed of the USB ports on a system to see if they conform to USB standards. Hence this being relatively distressing, and the filling from /dev/urandom (indirectly).
So why is this happening and how do I fix it? I'm assuming that the measurements that dd is outputting is inaccurate, otherwise I'll start selling USB driver writers my secrets.
(Apologies if this should be on unix.se, I wasn't sure)