2.6 USB Throughput Issues? - Linux

This is a discussion on 2.6 USB Throughput Issues? - Linux ; Is anybody achieving bulk USB throughput greater than 15 MB/s with a 2.6 Linux kernel? We have an FX2-based device that we have driven in Windows at 30 MB/s. On Linux, I have a user-mode app that is making asynchronous ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: 2.6 USB Throughput Issues?

  1. 2.6 USB Throughput Issues?

    Is anybody achieving bulk USB throughput greater than 15 MB/s with a 2.6
    Linux kernel?

    We have an FX2-based device that we have driven in Windows at 30 MB/s. On
    Linux, I have a user-mode app that is making asynchronous bulk requests via
    ioctl to the default usbfs driver, and I cannot break about 12 MB/s. I've
    tried tweaking the number of simultaneous outstanding requests (from 12 up
    to 200 or more), I've tried raising the bytes-per-transfer from 512 bytes
    up to 16kB, but I still can't break about 12 MB/s.

    Anybody have experiences to share?
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

  2. Re: 2.6 USB Throughput Issues?

    > Is anybody achieving bulk USB throughput greater than 15 MB/s with a 2.6
    > Linux kernel?


    > ... but I still can't break about 12 MB/s.



    With an external harddrive connected via USB2.0 (PCI card 1033:00e0
    (rev 04); the usual NEC chip) on a SiS 730 board with Athlon Plain
    CPU at 1.1 GHz:

    $ time dd if=/dev/sdb1 of=/dev/null bs=32k count=10000
    10000+0 records in
    10000+0 records out
    327680000 bytes (328 MB) copied, 14.4957 seconds, 22.6 MB/s
    # Also >20 MB/s with a blocksize of 16KB.

    real 0m14.505s
    user 0m0.012s
    sys 0m2.552s
    $ cat /proc/version
    Linux version 2.6.17-1.2431.fc6 (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 4.1.1 20060718 (Red Hat 4.1.1-9)) #1 SMP Thu Jul 20 22:34:36 EDT 2006

    This does seem a bit slow. The same harddrive gives 30 MB/s
    on a 3.2 GHz CPU with similar 2.6.17 kernel.

    --

  3. Re: 2.6 USB Throughput Issues?

    On Thu, 27 Jul 2006 06:28:30 +0000, Tim Roberts wrote:

    > We have an FX2-based device that we have driven in Windows at 30 MB/s. On
    > Linux, I have a user-mode app that is making asynchronous bulk requests via
    > ioctl to the default usbfs driver, and I cannot break about 12 MB/s.


    I don't think anyone can guess what is up with that. You may be pegging
    your CPU, proc_do_submiturb() is not a lightweight operation, plus there's
    the upcall path which has to awaken your process, then you have to reap
    the URBs...

    -- Pete


  4. Re: 2.6 USB Throughput Issues?

    On Thu, 27 Jul 2006 08:46:23 -0700, John Reiser wrote:

    > $ time dd if=/dev/sdb1 of=/dev/null bs=32k count=10000
    > 10000+0 records in
    > 10000+0 records out
    > 327680000 bytes (328 MB) copied, 14.4957 seconds, 22.6 MB/s


    Just out of curiosity, how much can /dev/uba1 do for you?

    In any case, it does not help Tim, because usb-storage is an in-kernel
    driver and he struggles with usbfs.

    -- Pete


  5. Re: 2.6 USB Throughput Issues?

    >>$ time dd if=/dev/sdb1 of=/dev/null bs=32k count=10000
    >>10000+0 records in
    >>10000+0 records out
    >>327680000 bytes (328 MB) copied, 14.4957 seconds, 22.6 MB/s

    >
    >
    > Just out of curiosity, how much can /dev/uba1 do for you?


    All I have is the external harddrive [and USB flash devices],
    which is /dev/sdb under both Fedora Core (kernel-2.6.17)
    and Knoppix 4.0.2 (kernel-2.6.12).

    --

  6. Re: 2.6 USB Throughput Issues?

    On Thu, 27 Jul 2006 21:34:53 -0700, John Reiser wrote:

    >>>$ time dd if=/dev/sdb1 of=/dev/null bs=32k count=10000
    >>>10000+0 records in
    >>>10000+0 records out
    >>>327680000 bytes (328 MB) copied, 14.4957 seconds, 22.6 MB/s

    >>
    >> Just out of curiosity, how much can /dev/uba1 do for you?

    >
    > All I have is the external harddrive [and USB flash devices],
    > which is /dev/sdb under both Fedora Core (kernel-2.6.17)
    > and Knoppix 4.0.2 (kernel-2.6.12).


    On Fedora, it's dynamic actually. You can do this:
    - echo ub > /sys/module/libusual/parameters/bias
    - Unplug, replug
    To get it back:
    echo usb-storage > /sys/module/libusual/parameters/bias
    Replug

    -- Pete


  7. Re: 2.6 USB Throughput Issues?

    >>>>$ time dd if=/dev/sdb1 of=/dev/null bs=32k count=10000
    >>>>10000+0 records in
    >>>>10000+0 records out
    >>>>327680000 bytes (328 MB) copied, 14.4957 seconds, 22.6 MB/s
    >>>
    >>>Just out of curiosity, how much can /dev/uba1 do for you?


    > On Fedora, it's dynamic actually. You can do this:
    > - echo ub > /sys/module/libusual/parameters/bias
    > - Unplug, replug
    > To get it back:
    > echo usb-storage > /sys/module/libusual/parameters/bias
    > Replug


    $ time dd if=/dev/uba1 bs=16k count=10000 of=/dev/null
    10000+0 records in
    10000+0 records out
    163840000 bytes (164 MB) copied, 8.17977 seconds, 20.0 MB/s

    real 0m8.188s
    user 0m0.004s
    sys 0m1.320s

    --

  8. Re: 2.6 USB Throughput Issues?

    Pete Zaitcev wrote:

    >On Thu, 27 Jul 2006 06:28:30 +0000, Tim Roberts wrote:
    >
    >> We have an FX2-based device that we have driven in Windows at 30 MB/s. On
    >> Linux, I have a user-mode app that is making asynchronous bulk requests via
    >> ioctl to the default usbfs driver, and I cannot break about 12 MB/s.

    >
    >I don't think anyone can guess what is up with that. You may be pegging
    >your CPU, proc_do_submiturb() is not a lightweight operation, plus there's
    >the upcall path which has to awaken your process, then you have to reap
    >the URBs...


    Well, it turned out to be an application issue after all; a line of
    debugging code that escaped several levels of review. I'm now getting 28
    MB/s. Our firmware has a theoretical limit of 30 MB/s, so everyone is
    smiling again.
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

+ Reply to Thread