public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...?
@ 2009-12-26 22:54 Paul Hartman
  2009-12-27  1:00 ` Hung Dang
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2009-12-26 22:54 UTC (permalink / raw
  To: gentoo-user

Hi,

I got a Nokia N900 linux internet tablet/phone a few days ago, and
when I connect it in USB Mass Storage mode to a Windows Vista computer
I can write at 17MB/sec, but when I connect it to my Gentoo box my
writes are really slow, between 500-900kb/sec depending on if I mount
in "sync" mode or not. As far as I know it should be just a totally
standard/generic mass storage device. (there were no drivers or
software install needed in windows, it just worked)

Other USB devices plugged into the same port go full speed, and AFAIK
everything appears as if it should be high speed USB 2.0. Has anyone
seen something like this before? I'm not sure what the deal is. It
takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
minute to do the same in Windows.

I'm not sure about debugging USB or what the options are. Everything
I've used previously has worked without any hassle.

lsusb -vv output for this device:

Bus 001 Device 031: ID 0421:01c7 Nokia Mobile Phones
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0421 Nokia Mobile Phones
  idProduct          0x01c7
  bcdDevice            3.16
  iManufacturer           1 Nokia
  iProduct                2 N900 (Storage Mode)
  iSerial                 3 (censored)
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Max power
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              6 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     2
    iConfiguration          5 Self-powered
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              6 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      2
Device Status:     0x0000
  (Bus Powered)



dmesg output when it is plugged in:

[2920730.031010] usb 1-4: new high speed USB device using ehci_hcd and
address 31
[2920730.146451] usb 1-4: New USB device found, idVendor=0421, idProduct=01c7
[2920730.146455] usb 1-4: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[2920730.146458] usb 1-4: Product: N900 (Storage Mode)
[2920730.146460] usb 1-4: Manufacturer: Nokia
[2920730.146462] usb 1-4: SerialNumber: (censored)
[2920730.146540] usb 1-4: configuration #1 chosen from 2 choices
[2920730.148268] scsi27 : SCSI emulation for USB Mass Storage devices
[2920730.148342] usb-storage: device found at 31
[2920730.148345] usb-storage: waiting for device to settle before scanning
[2920735.150436] scsi 27:0:0:0: Direct-Access     Nokia    N900
      031 PQ: 0 ANSI: 2
[2920735.150567] sd 27:0:0:0: Attached scsi generic sg7 type 0
[2920735.155882] sd 27:0:0:0: [sdg] Attached SCSI removable disk
[2920735.156449] usb-storage: device scan complete
[2920741.306353] sd 27:0:0:0: [sdg] 56631296 512-byte logical blocks:
(28.9 GB/27.0 GiB)
[2920741.306721] sd 27:0:0:0: [sdg] Assuming drive cache: write through
[2920741.307970] sd 27:0:0:0: [sdg] Assuming drive cache: write through
[2920741.307972]  sdg:


And I mounted with these options:
/dev/sdg        /mnt/usb        vfat
user,sync,umask=1000,rw,noauto,check=relaxed    0       0


thanks
paul



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...?
  2009-12-26 22:54 [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...? Paul Hartman
@ 2009-12-27  1:00 ` Hung Dang
  2009-12-27  3:18   ` Paul Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Hung Dang @ 2009-12-27  1:00 UTC (permalink / raw
  To: gentoo-user

Have you received a lot of debugging messages at the output of dmesg
when copying files?

Hung

On 12/26/09 15:54, Paul Hartman wrote:
> Hi,
>
> I got a Nokia N900 linux internet tablet/phone a few days ago, and
> when I connect it in USB Mass Storage mode to a Windows Vista computer
> I can write at 17MB/sec, but when I connect it to my Gentoo box my
> writes are really slow, between 500-900kb/sec depending on if I mount
> in "sync" mode or not. As far as I know it should be just a totally
> standard/generic mass storage device. (there were no drivers or
> software install needed in windows, it just worked)
>
> Other USB devices plugged into the same port go full speed, and AFAIK
> everything appears as if it should be high speed USB 2.0. Has anyone
> seen something like this before? I'm not sure what the deal is. It
> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
> minute to do the same in Windows.
>
> I'm not sure about debugging USB or what the options are. Everything
> I've used previously has worked without any hassle.
>
> lsusb -vv output for this device:
>
> Bus 001 Device 031: ID 0421:01c7 Nokia Mobile Phones
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x0421 Nokia Mobile Phones
>   idProduct          0x01c7
>   bcdDevice            3.16
>   iManufacturer           1 Nokia
>   iProduct                2 N900 (Storage Mode)
>   iSerial                 3 (censored)
>   bNumConfigurations      2
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           32
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          4 Max power
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass         8 Mass Storage
>       bInterfaceSubClass      6 SCSI
>       bInterfaceProtocol     80 Bulk (Zip)
>       iInterface              6 Mass Storage
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x01  EP 1 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           32
>     bNumInterfaces          1
>     bConfigurationValue     2
>     iConfiguration          5 Self-powered
>     bmAttributes         0xc0
>       Self Powered
>     MaxPower              100mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass         8 Mass Storage
>       bInterfaceSubClass      6 SCSI
>       bInterfaceProtocol     80 Bulk (Zip)
>       iInterface              6 Mass Storage
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x01  EP 1 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               1
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   bNumConfigurations      2
> Device Status:     0x0000
>   (Bus Powered)
>
>
>
> dmesg output when it is plugged in:
>
> [2920730.031010] usb 1-4: new high speed USB device using ehci_hcd and
> address 31
> [2920730.146451] usb 1-4: New USB device found, idVendor=0421, idProduct=01c7
> [2920730.146455] usb 1-4: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [2920730.146458] usb 1-4: Product: N900 (Storage Mode)
> [2920730.146460] usb 1-4: Manufacturer: Nokia
> [2920730.146462] usb 1-4: SerialNumber: (censored)
> [2920730.146540] usb 1-4: configuration #1 chosen from 2 choices
> [2920730.148268] scsi27 : SCSI emulation for USB Mass Storage devices
> [2920730.148342] usb-storage: device found at 31
> [2920730.148345] usb-storage: waiting for device to settle before scanning
> [2920735.150436] scsi 27:0:0:0: Direct-Access     Nokia    N900
>       031 PQ: 0 ANSI: 2
> [2920735.150567] sd 27:0:0:0: Attached scsi generic sg7 type 0
> [2920735.155882] sd 27:0:0:0: [sdg] Attached SCSI removable disk
> [2920735.156449] usb-storage: device scan complete
> [2920741.306353] sd 27:0:0:0: [sdg] 56631296 512-byte logical blocks:
> (28.9 GB/27.0 GiB)
> [2920741.306721] sd 27:0:0:0: [sdg] Assuming drive cache: write through
> [2920741.307970] sd 27:0:0:0: [sdg] Assuming drive cache: write through
> [2920741.307972]  sdg:
>
>
> And I mounted with these options:
> /dev/sdg        /mnt/usb        vfat
> user,sync,umask=1000,rw,noauto,check=relaxed    0       0
>
>
> thanks
> paul
>
>   




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27  1:00 ` Hung Dang
@ 2009-12-27  3:18   ` Paul Hartman
  2009-12-27  6:01     ` Michael Holmes
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2009-12-27  3:18 UTC (permalink / raw
  To: gentoo-user

On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
> On 12/26/09 15:54, Paul Hartman wrote:
>> Hi,
>>
>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>> writes are really slow, between 500-900kb/sec depending on if I mount
>> in "sync" mode or not. As far as I know it should be just a totally
>> standard/generic mass storage device. (there were no drivers or
>> software install needed in windows, it just worked)
>>
>> Other USB devices plugged into the same port go full speed, and AFAIK
>> everything appears as if it should be high speed USB 2.0. Has anyone
>> seen something like this before? I'm not sure what the deal is. It
>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>> minute to do the same in Windows.
>>
>> I'm not sure about debugging USB or what the options are. Everything
>> I've used previously has worked without any hassle.
> Have you received a lot of debugging messages at the output of dmesg
> when copying files?
>
> Hung

No errors, no strange messages at all, it seems normal (only slow). I
have other USB devices like SD card reader, external HDD, and they
perform at full speed when plugged into the same port, so it's weird
to me.

Thanks
Paul



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27  3:18   ` Paul Hartman
@ 2009-12-27  6:01     ` Michael Holmes
  2009-12-27 18:10       ` Paul Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Holmes @ 2009-12-27  6:01 UTC (permalink / raw
  To: gentoo-user

2009/12/27 Paul Hartman <paul.hartman+gentoo@gmail.com>:
> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
>> On 12/26/09 15:54, Paul Hartman wrote:
>>> Hi,
>>>
>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>>> writes are really slow, between 500-900kb/sec depending on if I mount
>>> in "sync" mode or not. As far as I know it should be just a totally
>>> standard/generic mass storage device. (there were no drivers or
>>> software install needed in windows, it just worked)
>>>
>>> Other USB devices plugged into the same port go full speed, and AFAIK
>>> everything appears as if it should be high speed USB 2.0. Has anyone
>>> seen something like this before? I'm not sure what the deal is. It
>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>>> minute to do the same in Windows.
>>>
>>> I'm not sure about debugging USB or what the options are. Everything
>>> I've used previously has worked without any hassle.
>> Have you received a lot of debugging messages at the output of dmesg
>> when copying files?
>>
>> Hung
>
> No errors, no strange messages at all, it seems normal (only slow). I
> have other USB devices like SD card reader, external HDD, and they
> perform at full speed when plugged into the same port, so it's weird
> to me.
>
> Thanks
> Paul
>
>

This isn't that helpful, but in Windows I get good thoroughputs in
mass storage mode, but compartively weak ones in sync mode. But this
shouldn't be the problem because as far as I know, there are no
ync-mode drivers for good old Linux (which is ironic if you consider
it).



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27  6:01     ` Michael Holmes
@ 2009-12-27 18:10       ` Paul Hartman
  2009-12-27 19:46         ` Paul Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2009-12-27 18:10 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 27, 2009 at 12:01 AM, Michael Holmes
<holmesmich@googlemail.com> wrote:
> 2009/12/27 Paul Hartman <paul.hartman+gentoo@gmail.com>:
>> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
>>> On 12/26/09 15:54, Paul Hartman wrote:
>>>> Hi,
>>>>
>>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>>>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>>>> writes are really slow, between 500-900kb/sec depending on if I mount
>>>> in "sync" mode or not. As far as I know it should be just a totally
>>>> standard/generic mass storage device. (there were no drivers or
>>>> software install needed in windows, it just worked)
>>>>
>>>> Other USB devices plugged into the same port go full speed, and AFAIK
>>>> everything appears as if it should be high speed USB 2.0. Has anyone
>>>> seen something like this before? I'm not sure what the deal is. It
>>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>>>> minute to do the same in Windows.
>>>>
>>>> I'm not sure about debugging USB or what the options are. Everything
>>>> I've used previously has worked without any hassle.
>>> Have you received a lot of debugging messages at the output of dmesg
>>> when copying files?
>>>
>>> Hung
>>
>> No errors, no strange messages at all, it seems normal (only slow). I
>> have other USB devices like SD card reader, external HDD, and they
>> perform at full speed when plugged into the same port, so it's weird
>> to me.
>>
>> Thanks
>> Paul
>>
>>
>
> This isn't that helpful, but in Windows I get good thoroughputs in
> mass storage mode, but compartively weak ones in sync mode. But this
> shouldn't be the problem because as far as I know, there are no
> ync-mode drivers for good old Linux (which is ironic if you consider
> it).

When I said "sync" mode I mean mounting the device in mass storage
mode with with "-o sync" (as opposed to the default cached/async
mode), which I believe is the default in Windows Vista & Win7 (because
most windows users cannot be bothered to unmount before pulling the
plug).

Thanks



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27 18:10       ` Paul Hartman
@ 2009-12-27 19:46         ` Paul Hartman
  2009-12-27 19:57           ` Paul Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2009-12-27 19:46 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 27, 2009 at 12:10 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Sun, Dec 27, 2009 at 12:01 AM, Michael Holmes
> <holmesmich@googlemail.com> wrote:
>> 2009/12/27 Paul Hartman <paul.hartman+gentoo@gmail.com>:
>>> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
>>>> On 12/26/09 15:54, Paul Hartman wrote:
>>>>> Hi,
>>>>>
>>>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>>>>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>>>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>>>>> writes are really slow, between 500-900kb/sec depending on if I mount
>>>>> in "sync" mode or not. As far as I know it should be just a totally
>>>>> standard/generic mass storage device. (there were no drivers or
>>>>> software install needed in windows, it just worked)
>>>>>
>>>>> Other USB devices plugged into the same port go full speed, and AFAIK
>>>>> everything appears as if it should be high speed USB 2.0. Has anyone
>>>>> seen something like this before? I'm not sure what the deal is. It
>>>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>>>>> minute to do the same in Windows.
>>>>>
>>>>> I'm not sure about debugging USB or what the options are. Everything
>>>>> I've used previously has worked without any hassle.
>>>> Have you received a lot of debugging messages at the output of dmesg
>>>> when copying files?
>>>>
>>>> Hung
>>>
>>> No errors, no strange messages at all, it seems normal (only slow). I
>>> have other USB devices like SD card reader, external HDD, and they
>>> perform at full speed when plugged into the same port, so it's weird
>>> to me.
>>>
>>> Thanks
>>> Paul
>>>
>>>
>>
>> This isn't that helpful, but in Windows I get good thoroughputs in
>> mass storage mode, but compartively weak ones in sync mode. But this
>> shouldn't be the problem because as far as I know, there are no
>> ync-mode drivers for good old Linux (which is ironic if you consider
>> it).
>
> When I said "sync" mode I mean mounting the device in mass storage
> mode with with "-o sync" (as opposed to the default cached/async
> mode), which I believe is the default in Windows Vista & Win7 (because
> most windows users cannot be bothered to unmount before pulling the
> plug).
>
> Thanks

Well, after a bit more plugging/unplugging of all my USB devices into
various ports in different orders, it seems to be going fast now. I
hate USB :)

Thanks for the help



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27 19:46         ` Paul Hartman
@ 2009-12-27 19:57           ` Paul Hartman
  2009-12-27 20:58             ` Paul Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2009-12-27 19:57 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 27, 2009 at 1:46 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Sun, Dec 27, 2009 at 12:10 PM, Paul Hartman
> <paul.hartman+gentoo@gmail.com> wrote:
>> On Sun, Dec 27, 2009 at 12:01 AM, Michael Holmes
>> <holmesmich@googlemail.com> wrote:
>>> 2009/12/27 Paul Hartman <paul.hartman+gentoo@gmail.com>:
>>>> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
>>>>> On 12/26/09 15:54, Paul Hartman wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>>>>>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>>>>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>>>>>> writes are really slow, between 500-900kb/sec depending on if I mount
>>>>>> in "sync" mode or not. As far as I know it should be just a totally
>>>>>> standard/generic mass storage device. (there were no drivers or
>>>>>> software install needed in windows, it just worked)
>>>>>>
>>>>>> Other USB devices plugged into the same port go full speed, and AFAIK
>>>>>> everything appears as if it should be high speed USB 2.0. Has anyone
>>>>>> seen something like this before? I'm not sure what the deal is. It
>>>>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>>>>>> minute to do the same in Windows.
>>>>>>
>>>>>> I'm not sure about debugging USB or what the options are. Everything
>>>>>> I've used previously has worked without any hassle.
>>>>> Have you received a lot of debugging messages at the output of dmesg
>>>>> when copying files?
>>>>>
>>>>> Hung
>>>>
>>>> No errors, no strange messages at all, it seems normal (only slow). I
>>>> have other USB devices like SD card reader, external HDD, and they
>>>> perform at full speed when plugged into the same port, so it's weird
>>>> to me.
>>>>
>>>> Thanks
>>>> Paul
>>>>
>>>>
>>>
>>> This isn't that helpful, but in Windows I get good thoroughputs in
>>> mass storage mode, but compartively weak ones in sync mode. But this
>>> shouldn't be the problem because as far as I know, there are no
>>> ync-mode drivers for good old Linux (which is ironic if you consider
>>> it).
>>
>> When I said "sync" mode I mean mounting the device in mass storage
>> mode with with "-o sync" (as opposed to the default cached/async
>> mode), which I believe is the default in Windows Vista & Win7 (because
>> most windows users cannot be bothered to unmount before pulling the
>> plug).
>>
>> Thanks
>
> Well, after a bit more plugging/unplugging of all my USB devices into
> various ports in different orders, it seems to be going fast now. I
> hate USB :)
>
> Thanks for the help

Maybe I spoke too soon. It seems what's happening is when I write a
large amount of data, there are several "pdflush" threads at near 100%
i/o wait. I'm thinking it's writing multiple streams over USB which is
causing the massive slow-down.

I'm using 2.6.31, and I see in 2.6.32 there is something called
"Per-backing-device based writeback" which may help me here... I'll
try the new kernel and report back :)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] USB mass storage device slow in Gentoo, fast in  Windows...?
  2009-12-27 19:57           ` Paul Hartman
@ 2009-12-27 20:58             ` Paul Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Hartman @ 2009-12-27 20:58 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 27, 2009 at 1:57 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Sun, Dec 27, 2009 at 1:46 PM, Paul Hartman
> <paul.hartman+gentoo@gmail.com> wrote:
>> On Sun, Dec 27, 2009 at 12:10 PM, Paul Hartman
>> <paul.hartman+gentoo@gmail.com> wrote:
>>> On Sun, Dec 27, 2009 at 12:01 AM, Michael Holmes
>>> <holmesmich@googlemail.com> wrote:
>>>> 2009/12/27 Paul Hartman <paul.hartman+gentoo@gmail.com>:
>>>>> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungptit@gmail.com> wrote:
>>>>>> On 12/26/09 15:54, Paul Hartman wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and
>>>>>>> when I connect it in USB Mass Storage mode to a Windows Vista computer
>>>>>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my
>>>>>>> writes are really slow, between 500-900kb/sec depending on if I mount
>>>>>>> in "sync" mode or not. As far as I know it should be just a totally
>>>>>>> standard/generic mass storage device. (there were no drivers or
>>>>>>> software install needed in windows, it just worked)
>>>>>>>
>>>>>>> Other USB devices plugged into the same port go full speed, and AFAIK
>>>>>>> everything appears as if it should be high speed USB 2.0. Has anyone
>>>>>>> seen something like this before? I'm not sure what the deal is. It
>>>>>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1
>>>>>>> minute to do the same in Windows.
>>>>>>>
>>>>>>> I'm not sure about debugging USB or what the options are. Everything
>>>>>>> I've used previously has worked without any hassle.
>>>>>> Have you received a lot of debugging messages at the output of dmesg
>>>>>> when copying files?
>>>>>>
>>>>>> Hung
>>>>>
>>>>> No errors, no strange messages at all, it seems normal (only slow). I
>>>>> have other USB devices like SD card reader, external HDD, and they
>>>>> perform at full speed when plugged into the same port, so it's weird
>>>>> to me.
>>>>>
>>>>> Thanks
>>>>> Paul
>>>>>
>>>>>
>>>>
>>>> This isn't that helpful, but in Windows I get good thoroughputs in
>>>> mass storage mode, but compartively weak ones in sync mode. But this
>>>> shouldn't be the problem because as far as I know, there are no
>>>> ync-mode drivers for good old Linux (which is ironic if you consider
>>>> it).
>>>
>>> When I said "sync" mode I mean mounting the device in mass storage
>>> mode with with "-o sync" (as opposed to the default cached/async
>>> mode), which I believe is the default in Windows Vista & Win7 (because
>>> most windows users cannot be bothered to unmount before pulling the
>>> plug).
>>>
>>> Thanks
>>
>> Well, after a bit more plugging/unplugging of all my USB devices into
>> various ports in different orders, it seems to be going fast now. I
>> hate USB :)
>>
>> Thanks for the help
>
> Maybe I spoke too soon. It seems what's happening is when I write a
> large amount of data, there are several "pdflush" threads at near 100%
> i/o wait. I'm thinking it's writing multiple streams over USB which is
> causing the massive slow-down.
>
> I'm using 2.6.31, and I see in 2.6.32 there is something called
> "Per-backing-device based writeback" which may help me here... I'll
> try the new kernel and report back :)

There is a slight improvement but it's still very slow (less than
2MB/sec). It seems the problem happens if I try to copy more than 1
file to the device. If I copy/sync/copy/sync/copy/sync etc it goes
faster, but that's extremely annoying!



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-27 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-26 22:54 [gentoo-user] USB mass storage device slow in Gentoo, fast in Windows...? Paul Hartman
2009-12-27  1:00 ` Hung Dang
2009-12-27  3:18   ` Paul Hartman
2009-12-27  6:01     ` Michael Holmes
2009-12-27 18:10       ` Paul Hartman
2009-12-27 19:46         ` Paul Hartman
2009-12-27 19:57           ` Paul Hartman
2009-12-27 20:58             ` Paul Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox