USB transmission speed

I’m trying to use the BBB as a (very) lightweight NAS. Unfortunately, I’m a bit disappointed with the transfer speed I can achieve over the USB port. I’ve now tried different kernels such as Robert C Nelsons 3.8.13-bone28 and 3.12.0-rc5-bone6, different USB storage devices (such as a USB 2.0 flash drive and a USB 3.0 hard disk), and tried both directly attaching the flash drive to the BBB as well as using a powered USB hub. The HD of course only works on the hub. The BBB is running on a 5V external power supply.

Using different tools (hdparm and dd) the USB read speed always maxes out at about 9MB/s which is far less than the same devices deliver on other systems (e.g. about 25MB/s on my Raspberry Pi).

Does anyone have an idea why this is the case or how this can be improved?

Well anything above 12 Megabytes/second is going to go to waste for your case anyhow. Max theoretical for 100Mbit / fast ethernet is 12 Megabytes / second. You will never see that ever. Still, I’ve booted from USB over the host port and I am getting 10.6 MB/s. This is even with an old PATA<->USB 2.0 with no features according to hdparm.

Also, you do not need a hub. Using an external powered hard drive case would work fine. I’d also imagine the hub is slowing things down some for you.

I am also using one of RCN’s Kernels . . .

It seems 3.12 has DMA support enabled for USB (3.8 isn’t) so it should be a bit better or at least not choke the CPU on interrupts.

Anyway it seems USB isn’t the brilliant part of the BBB :frowning:

Maybe the BBW with 3.2 runs faster on USB.

Well, this page http://processors.wiki.ti.com/index.php/AM335x-PSP_04.06.00.06_Features_and_Performance_Guide#USB_Driver certainly suggests that the BBW can do much better. I’ll try to investigate this further …

Well, I’ve checked out the official TI Kernel v3.2 and now I get speeds well beyond 20MB/s. Does anyone have a clue why the newer Kernels are so much worse?

Well the "dma" side of musb was just merged in v3.13-rcX
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/musb?id=5328f35b1584a9849ffe46afa42018946aa43851

quote: "MUSB should now work out of the box on AM335x-based boards
(beagle bone white and black) with DMA thanks to Sebastian's work."

Something the ti 3.2 kernel has had for awhile now...

Regards,

Great, that sounds promising :slight_smile:

Unfortunately, with 3.13.0-rc3 USB currently does not seem to work at all (also no ethernet).

Ok, so with 3.13.0-rc6-bone2.8 and

CONFIG_USB_TI_CPPI41_DMA=y

CONFIG_MUSB_PIO_ONLY is not set

I’m getting about 14MB/s which is much better than before but still less than with the TI v3.2 Kernel.

Can I ask what your root file system is? We are using Ubuntu 12.04 and require faster USB throughput, but have not yet gotten any newer kernels to work for us.

I was using Robert C Nelson’s Ubuntu 13.10 rootfs.

Thanks Thomas. Can I also ask how you managed to get TI Kernel 3.2 running on BBB? Did you have to cross-compile with Linaro yourself?

Version 6.00 of the TI Sitara SDK supports(*) the BBB:

http://www.ti.com/tool/linuxezsdk-sitara

It allows you to cross compile the TI kernel. Note that you need a serial connection to access the console (an FTDI cable probably is the best choice). I couldn’t get the network based boot to work, but creating an SD card with the TI root file system and the TI kernel on it was successful after some trial and error. I only tried USB, so I don’t know if the rest of the BBB hardware works with this kernel.

(*) There still seem to be some rough edges with respect to the BBB

Thanks Thomas. I was able to compile a kernel using that route but received some errors on boot. I’ll try again, with the knowledge that someone has gotten it to work. :slight_smile:

Best regards,
Neel