Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #187428 > unrolled thread

Supper slow USB disk

Started byMostafa Shahverdy <mostafa@mostafa.info>
First post2017-09-30 19:20 +0200
Last post2017-10-01 17:20 +0200
Articles 9 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  Supper slow USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-09-30 19:20 +0200
    Re: Supper slow USB disk Michael Stone <mstone@debian.org> - 2017-09-30 20:10 +0200
      Re: Supper slow USB disk Michael Stone <mstone@debian.org> - 2017-10-01 14:40 +0200
        Re: Supper slow USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-10-01 17:00 +0200
          Re: Supper slow USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-10-01 17:00 +0200
            Re: Supper slow USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-10-01 17:20 +0200
              Re: Supper slow USB disk Joe <joe@jretrading.com> - 2017-10-01 18:50 +0200
                Re: Supper slow USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-10-02 04:50 +0200
            Re: Supper slow USB disk Joe <joe@jretrading.com> - 2017-10-01 17:20 +0200

#187428 — Supper slow USB disk

FromMostafa Shahverdy <mostafa@mostafa.info>
Date2017-09-30 19:20 +0200
SubjectSupper slow USB disk
Message-ID<uvtAK-75a-21@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi everyone

I have an issue with the speed of my USB3 Trancend disk, while I am using my motherboard with USB2 ports (and also
some usb1 ports). It seems it is using usb1 driver for my usb disk, and
because of that, I am expericing a very slow speed. I have to mention
that using an Ubuntu live CD I can have the normal speed. Any kind of
help would be really appreciated.


here is the output of my `lsusb`:

Bus 004 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 8564:1000 Transcend Information, Inc. JetFlash
Bus 003 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 24ae:2000  
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


here is the output of my `lsbusb -t`:

/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8188eu, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M

and this is the output of `lsmod | grep hci`:

ehci_pci               16384  0
uhci_hcd               45056  0
ehci_hcd               81920  1 ehci_pci
usbcore               245760  7 usbhid,usb_storage,ehci_hcd,uhci_hcd,uas,8188eu,ehci_pci

-- 
Regards,
Mostafa Shahverdy <http://www.mostafa.info/pgp>

[toc] | [next] | [standalone]


#187430

FromMichael Stone <mstone@debian.org>
Date2017-09-30 20:10 +0200
Message-ID<uvun7-7CT-3@gated-at.bofh.it>
In reply to#187428
On Sat, Sep 30, 2017 at 08:49:27PM +0330, Mostafa Shahverdy wrote:
>I have an issue with the speed of my USB3 Trancend disk, while I am using my motherboard with USB2 ports (and also
>some usb1 ports). It seems it is using usb1 driver for my usb disk, and
[...]
>/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
>    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>    |__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M

It seems pretty clearly to be operating at USB 2 speed. Are there any 
error messages in your dmesg output? Can you quantify the performance?

Mike Stone

[toc] | [prev] | [next] | [standalone]


#187443

FromMichael Stone <mstone@debian.org>
Date2017-10-01 14:40 +0200
Message-ID<uvLHj-2as-3@gated-at.bofh.it>
In reply to#187430
On Sun, Oct 01, 2017 at 05:11:12AM +0330, Mostafa Shahverdy wrote:
>    Can you quantify the performance
>
>Using my own system, it copies at most 200kps while using a live cd it copies
>up to 4Mps

measured how?

>[    1.516112] usb 3-3: new high-speed USB device number 2 using ehci-pci
>[    1.666461] usb 3-3: New USB device found, idVendor=058f, idProduct=6362
>[    1.666464] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>[    1.666467] usb 3-3: Product: Mass Storage Device
>[    1.666469] usb 3-3: Manufacturer: Generic
>[    1.666471] usb 3-3: SerialNumber: 058F312D81B

So this is your card reader

>[    1.937460] usb 3-4: New USB device found, idVendor=8564, idProduct=1000
>[    1.937463] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>[    1.937465] usb 3-4: Product: Mass Storage Device
>[    1.937467] usb 3-4: Manufacturer: JetFlash
>[    1.937469] usb 3-4: SerialNumber: 357F6FFRKM51A594

This is the flash drive

>[   14.180104] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[   46.180106] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[   78.948116] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  121.956112] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  154.724113] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  187.496100] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  218.212114] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  355.428111] usb 3-3: reset high-speed USB device number 2 using ehci-pci
>[  388.196116] usb 3-3: reset high-speed USB device number 2 using ehci-pci

And the card reader is resetting every 30 seconds. Can you either unplug 
the card reader or move the flash drive to the bus where the wireless 
adapter is located to see what effect that has?

Mike Stone

[toc] | [prev] | [next] | [standalone]


#187454

FromMostafa Shahverdy <mostafa@mostafa.info>
Date2017-10-01 17:00 +0200
Message-ID<uvNSN-3pJ-5@gated-at.bofh.it>
In reply to#187443

[Multipart message — attachments visible in raw view] — view raw

>> Using my own system, it copies at most 200kps while using a live cd it
>> copies
>> up to 4Mps
>>
>
> measured how?
>
​That's what Nautilus show while copying a movie to my disk.​

​but to make sure, I tried using dd to have a better measurement:


$ sudo dd if=/dev/zero of="/media/mostafa/Transcend2/largefile" bs=1M
count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 15.6461 s, 670 kB/s​



> And the card reader is resetting every 30 seconds. Can you either unplug
> the card reader or move the flash drive to the bus where the wireless
> adapter is located to see what effect that has?
>

​I removed card reader and changed the port of the flash drive  and still
the same.

I also noticed something in my dmesg log:

[    1.173522] ehci-pci 0000:00:1a.7: cache line size of 32 is not supported

can this be the reason?

[toc] | [prev] | [next] | [standalone]


#187456

FromMostafa Shahverdy <mostafa@mostafa.info>
Date2017-10-01 17:00 +0200
Message-ID<uvNSO-3pJ-15@gated-at.bofh.it>
In reply to#187454

[Multipart message — attachments visible in raw view] — view raw

Maybe this is something with my /etc/fstab? because I tried to change the
content. Right now there is no entry for my USB disk there.

On Sun, Oct 1, 2017 at 6:19 PM, Mostafa Shahverdy <mostafa@mostafa.info>
wrote:

>
>
>
>>> Using my own system, it copies at most 200kps while using a live cd it
>>> copies
>>> up to 4Mps
>>>
>>
>> measured how?
>>
> ​That's what Nautilus show while copying a movie to my disk.​
>
> ​but to make sure, I tried using dd to have a better measurement:
>
>
> $ sudo dd if=/dev/zero of="/media/mostafa/Transcend2/largefile" bs=1M
> count=10
> 10+0 records in
> 10+0 records out
> 10485760 bytes (10 MB, 10 MiB) copied, 15.6461 s, 670 kB/s​
>
>
>
>> And the card reader is resetting every 30 seconds. Can you either unplug
>> the card reader or move the flash drive to the bus where the wireless
>> adapter is located to see what effect that has?
>>
>
> ​I removed card reader and changed the port of the flash drive  and still
> the same.
>
> I also noticed something in my dmesg log:
>
> [    1.173522] ehci-pci 0000:00:1a.7: cache line size of 32 is not
> supported
>
> can this be the reason?
>
>

[toc] | [prev] | [next] | [standalone]


#187457

FromMostafa Shahverdy <mostafa@mostafa.info>
Date2017-10-01 17:20 +0200
Message-ID<uvOca-3Ly-19@gated-at.bofh.it>
In reply to#187456

[Multipart message — attachments visible in raw view] — view raw

The whole idea for changing the content came from the fact that my usb
drives were mounting as read-only for non-root users, so I tried to fix it
and no luck. So at the end I removed my entries for removable media.
I still have that very problem of read-only removable media for my user.

On Sun, Oct 1, 2017 at 6:40 PM, Joe <joe@jretrading.com> wrote:

> On Sun, 1 Oct 2017 18:26:58 +0330
> Mostafa Shahverdy <mostafa@mostafa.info> wrote:
>
> > Maybe this is something with my /etc/fstab? because I tried to change
> > the content. Right now there is no entry for my USB disk there.
>
> On the whole, there is no need for entries for removable media
> in /etc/fstab, unless you have some really specific need. The wretched
> systemd handles automounting of removable drives in a per-user
> directory.
>
> If you do put removable media entries in /etc/fstab, you need to put
> nofail among the options, or else boot will fail when they are not
> present (my first-ever systemd gotcha).
>
> --
> Joe
>
>

[toc] | [prev] | [next] | [standalone]


#187462

FromJoe <joe@jretrading.com>
Date2017-10-01 18:50 +0200
Message-ID<uvPBg-4ux-19@gated-at.bofh.it>
In reply to#187457
On Sun, 1 Oct 2017 18:46:18 +0330
Mostafa Shahverdy <mostafa@mostafa.info> wrote:

> The whole idea for changing the content came from the fact that my usb
> drives were mounting as read-only for non-root users, so I tried to
> fix it and no luck. So at the end I removed my entries for removable
> media. I still have that very problem of read-only removable media
> for my user.

I have a directory named /media/joe, with joe:joe 750 permissions. I'm
reasonably sure that systemd originally created that, but if you have
an appropriate directory which was created with different permissions,
that may be a problem.

If I plug in an arbitrary extN or FAT USB stick, it is automounted
under /media/joe, and I have write permissions (as long as the extN
location does). I don't have any that are formatted NTFS, so I don't
know how permissions might map.

This is unstable, by the way, Wheezy has an incomplete version of
systemd and may well be using usbmount or pmount for automounting.
I think anything later than Wheezy ought to have systemd handling
automounting.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#187469

FromMostafa Shahverdy <mostafa@mostafa.info>
Date2017-10-02 04:50 +0200
Message-ID<uvYXT-1Jf-1@gated-at.bofh.it>
In reply to#187462

[Multipart message — attachments visible in raw view] — view raw

> I have a directory named /media/joe, with joe:joe 750 permissions. I'm
> reasonably sure that systemd originally created that, but if you have
> an appropriate directory which was created with different permissions,
> that may be a problem.
>

Thank you! Mine was mostafa:root 755, I don't know why it was `root`, I
changed it back to `mostafa` and now it clearly fine!
I have the right permissions and speed:

(I can run dd without sudo)

$ dd if=/dev/zero of="/media/mostafa/Transcend/largefile" bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 50.4967 s, 20.8 MB/s​

[toc] | [prev] | [next] | [standalone]


#187458

FromJoe <joe@jretrading.com>
Date2017-10-01 17:20 +0200
Message-ID<uvOca-3Ly-21@gated-at.bofh.it>
In reply to#187456
On Sun, 1 Oct 2017 18:26:58 +0330
Mostafa Shahverdy <mostafa@mostafa.info> wrote:

> Maybe this is something with my /etc/fstab? because I tried to change
> the content. Right now there is no entry for my USB disk there.

On the whole, there is no need for entries for removable media
in /etc/fstab, unless you have some really specific need. The wretched
systemd handles automounting of removable drives in a per-user
directory.

If you do put removable media entries in /etc/fstab, you need to put
nofail among the options, or else boot will fail when they are not
present (my first-ever systemd gotcha).

-- 
Joe

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web