LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2015, 05:17 PM   #1
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Rep: Reputation: Disabled
Linux running slow on external hard drive.


Hi!

I installed linux (arch) on external hard drive. It is connected through USB 3.0. Its read/wright speed is 225/135 MB/s which is faster than my computers internal hdd. But os installed on an external hard drive runs alot slower and sometime freezes. Then I tried installing debian but it still ran slow. I also tried puting it on a diferent hdd (slightly slower r/w USB 3.0) and it was just as slow as on the other hdd.

So my question is why is this happening and is there a way to fix it?

p.s. My friend has USB 2.0 external hdd and it runs faster than my USB 3.0 hdd (when doing light tasks it is as fast as computers internal HDD).
 
Old 11-25-2015, 10:34 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
I can only guess, you may need to check logs: there is no proper driver loaded for usb3.
 
Old 11-25-2015, 05:11 PM   #3
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
I added xhci-hcd to modules in initrd and added earlymodules=xhci_hcd modules-load=xhci_hcd to grub.
I followed instructions on this site http://www.wyae.de/docs/boot-usb3/.
 
Old 11-27-2015, 01:57 PM   #4
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
^ so did that solve the problem?

your first post did sound like linux is using the usb3 as a usb2.
output of lsusb with hd plugged in might help.
 
Old 11-27-2015, 07:01 PM   #5
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Budalas View Post
I added xhci-hcd to modules in initrd and added earlymodules=xhci_hcd modules-load=xhci_hcd to grub.
I followed instructions on this site http://www.wyae.de/docs/boot-usb3/.
My post was confusing I did that when I installed the os (before starting the thread).

lsusb:
Code:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 062a:0001 Creative Labs Notebook Optical Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 002: ID 04e8:61c3 Samsung Electronics Co., Ltd 
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -D /dev/bus/usb/009/002:
Code:
Device: ID 04e8:61c3 Samsung Electronics Co., Ltd 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x61c3 
  bcdDevice           13.01
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              6 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
lsusb -t:
Code:
/:  Bus 09.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/2p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
 
Old 11-28-2015, 05:46 AM   #6
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
wow, you provided better info than what i'd have been able to ask for.

so bus 2 and 9 are usb3. the samsung hd is plugged in properly into one of those.
the command "lsusb -D /dev/bus/usb/009/002" seems to suggest that it is recognized as usb3, but is the appropiate driver working on it?
you should repeat that command with sudo to get more info.

anyhow, what is the appropriate driver for usb3?

i have seen similar problems before, sometimes seems hardware dependent.
what did your searches on wiki.archlinux, bbs.archlinux and the internet return?

you have linked an article boot from usb3 - why? why is booting from usb3 so important to you? why would it solve your problem?
i thought the hd is just a storage device.

maybe related: how is the strage device formatted? ntfs? would it maybe help to format it to ext4? maybe this helps.
 
Old 11-28-2015, 05:53 AM   #7
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Misaligned partitions perhaps?
 
Old 11-28-2015, 07:50 AM   #8
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
@ondoho
The external HDD isn't just a storage device. I installed arch on it that is why i am booting from it. And os on it is running slow copying files to and from it seams normal. So i added that link to show you what i did (if it is correct thing to do).

When i searched for slow HDD i could only find threads about slow HDDs used as storage not as os host. When i searched about installing linux to external HDD i found out about adding xhci-hcd as i posted before. I found a lot of different methods to do so but the link i posted above seamed the most trust worthy because i found it on arch wiki https://wiki.archlinux.org/index.php...x_on_a_USB_key.

sudo lsusb -D /dev/bus/usb/009/002:
Code:
Device: ID 04e8:61c3 Samsung Electronics Co., Ltd 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x61c3 
  bcdDevice           13.01
  iManufacturer           1 Samsung P3 Portable
  iProduct                2 Samsung P3 Portable
  iSerial                 3 020F7DEC010000BE
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 USB Mass Storage
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              6 MSC Bulk-Only Transport
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      HIRD Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat          32 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered
@Emerson
# blockdev --getalignoff /dev/sdb1
returned 0

Last edited by Budalas; 11-28-2015 at 07:59 AM. Reason: I forgot to wright something
 
Old 11-28-2015, 07:51 AM   #9
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Oh and file system is ext4
 
Old 11-28-2015, 08:44 AM   #10
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
^ yes of course it is if you installed arch on it.

unfortunately i have nothing more to offer at this point; it looks like your device is working correctly.

how exactly did you make those speed measurements and what did you compare them to?
what is on the internal hard drive(s)?

maybe something else is amiss, not directly related to usb3 drivers.
 
Old 11-28-2015, 09:18 AM   #11
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
r/w speeds were given by the manufacturer
Internal HD has windows on it.

I read somewhere that external HD could be interfering with other devices in the room causing a distorted signal. Could this be the problem?

Thanks for all your help.
 
Old 11-28-2015, 10:12 AM   #12
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Just guessing, have you tried another USB cable? Low quality cable can cause data loss and slowdown as a result.
 
Old 11-28-2015, 11:53 AM   #13
Budalas
LQ Newbie
 
Registered: Nov 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
I only have one cable. Should i get one? If so what should i look for?
 
Old 11-28-2015, 12:40 PM   #14
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 15 , Slackel 14.1, ChromeOS
Posts: 4,713
Blog Entries: 19

Rep: Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970
Quote:
Originally Posted by Budalas View Post
I only have one cable. Should i get one? If so what should i look for?
Made by 3M usually works OK for me.
 
Old 11-28-2015, 01:24 PM   #15
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
sorry, I do not really understand what connected and how. (As far as I understood you have two OSs. One is running on your external hdd and the other is your host you use).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
external hard drive seems extremely slow after formatting to ex4 denmich1997 Linux - Hardware 4 11-25-2009 03:19 PM
Running Windows with LINUX on an external hard-drive. andrew_w_munro Linux - General 3 05-23-2006 03:27 PM
Suse 9.3 & WD external hard drive TO SLOW !! memo007 Linux - Hardware 4 01-08-2006 10:33 PM
External hard drive running slow Tom Cumming Linux - Hardware 0 08-19-2004 08:30 PM
USB external hard drive too slow TheShemeta Slackware 3 12-02-2003 04:33 PM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration