Linux 下 USB3 速度慢

Linux 下 USB3 速度慢

我在 Linux 下遇到了 USB 3.0 速度问题。我正在使用以下部件进行测试:

  • “NEC 公司 uPD720200 USB 3.0 主机控制器”(pcie)
  • “Pretec 240” USB 3.0 读卡器
  • Sandisk Extreme Compact Flash 60 MB/s

在 Windows 7 中,“HD-Tune Pro”报告读取速度为 60-70 MB/s,但在 Linux 中“hdparm -t”/“dd if=/dev/sdX of=/dev/null”报告仅约为 25-30 MB/s。

uname -a

Linux workstation 3.1-0.slh.2-aptosid-amd64 #1 SMP PREEMPT Tue Oct 25 01:47:47 UTC 2011 x86_64 GNU/Linu

连接读卡器时/var/log/syslog:

Nov  3 19:20:33 localhost kernel: [ 1973.293522] usb 4-1: new SuperSpeed USB device number 10 using xhci_hcd
Nov  3 19:20:33 localhost kernel: [ 1973.314354] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.346584] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.375744] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.404950] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.405189] usb 4-1: New USB device found, idVendor=0bda, idProduct=0301
Nov  3 19:20:33 localhost kernel: [ 1973.405195] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov  3 19:20:33 localhost kernel: [ 1973.405199] usb 4-1: Product: USB3.0 Card Reader
Nov  3 19:20:33 localhost kernel: [ 1973.405202] usb 4-1: Manufacturer: Realtek
Nov  3 19:20:33 localhost kernel: [ 1973.405206] usb 4-1: SerialNumber: 201006010301
Nov  3 19:20:33 localhost mtp-probe: checking bus 4, device 10: "/sys/devices/pci0000:00/0000:00:1c.4/0000:06:00.0/usb4/4-1"
Nov  3 19:20:33 localhost kernel: [ 1973.408167] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.411443] xhci_hcd 0000:06:00.0: WARN: short transfer on control ep
Nov  3 19:20:33 localhost kernel: [ 1973.412056] scsi15 : usb-storage 4-1:1.0
Nov  3 19:20:34 localhost mtp-probe: bus: 4, device: 10 was not an MTP device
Nov  3 19:20:35 localhost kernel: [ 1974.429746] scsi 15:0:0:0: Direct-Access     Generic- USB3.0 CRW-CF/MD 1.00 PQ: 0 ANSI: 0 CCS
Nov  3 19:20:35 localhost kernel: [ 1974.445740] scsi 15:0:0:1: Direct-Access     Generic- USB3.0 CRW-SM/xD 1.00 PQ: 0 ANSI: 0 CCS
Nov  3 19:20:35 localhost kernel: [ 1974.462208] scsi 15:0:0:2: Direct-Access     Generic- USB3.0 CRW-SD    1.00 PQ: 0 ANSI: 0 CCS
Nov  3 19:20:35 localhost kernel: [ 1974.478117] scsi 15:0:0:3: Direct-Access     Generic- USB3.0 CRW-MS    1.00 PQ: 0 ANSI: 0 CCS
Nov  3 19:20:35 localhost kernel: [ 1974.494461] scsi 15:0:0:4: Direct-Access     Generic- USB3.0 CRW-SD/MS 1.00 PQ: 0 ANSI: 0 CCS
Nov  3 19:20:35 localhost kernel: [ 1974.495905] sd 15:0:0:0: Attached scsi generic sg3 type 0
Nov  3 19:20:35 localhost kernel: [ 1974.496225] sd 15:0:0:1: Attached scsi generic sg4 type 0
Nov  3 19:20:35 localhost kernel: [ 1974.497412] sd 15:0:0:2: Attached scsi generic sg5 type 0
Nov  3 19:20:35 localhost kernel: [ 1974.497732] sd 15:0:0:3: Attached scsi generic sg6 type 0
Nov  3 19:20:35 localhost kernel: [ 1974.497972] sd 15:0:0:4: Attached scsi generic sg7 type 0
Nov  3 19:20:35 localhost kernel: [ 1975.165150] sd 15:0:0:1: [sde] Attached SCSI removable disk
Nov  3 19:20:35 localhost kernel: [ 1975.168154] sd 15:0:0:0: [sdd] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB)
Nov  3 19:20:35 localhost kernel: [ 1975.170400] sd 15:0:0:0: [sdd] Write Protect is off
Nov  3 19:20:35 localhost kernel: [ 1975.170406] sd 15:0:0:0: [sdd] Mode Sense: 03 00 00 00
Nov  3 19:20:35 localhost kernel: [ 1975.172895] sd 15:0:0:4: [sdh] Attached SCSI removable disk
Nov  3 19:20:35 localhost kernel: [ 1975.173277] sd 15:0:0:0: [sdd] No Caching mode page present
Nov  3 19:20:35 localhost kernel: [ 1975.173283] sd 15:0:0:0: [sdd] Assuming drive cache: write through
Nov  3 19:20:35 localhost kernel: [ 1975.174211] sd 15:0:0:2: [sdf] Attached SCSI removable disk
Nov  3 19:20:35 localhost kernel: [ 1975.175141] sd 15:0:0:3: [sdg] Attached SCSI removable disk
Nov  3 19:20:35 localhost kernel: [ 1975.183265] sd 15:0:0:0: [sdd] No Caching mode page present
Nov  3 19:20:35 localhost kernel: [ 1975.183271] sd 15:0:0:0: [sdd] Assuming drive cache: write through
Nov  3 19:20:35 localhost kernel: [ 1975.211534]  sdd: sdd1
Nov  3 19:20:35 localhost kernel: [ 1975.219096] sd 15:0:0:0: [sdd] No Caching mode page present
Nov  3 19:20:35 localhost kernel: [ 1975.219101] sd 15:0:0:0: [sdd] Assuming drive cache: write through
Nov  3 19:20:35 localhost kernel: [ 1975.219106] sd 15:0:0:0: [sdd] Attached SCSI removable disk

lsusb-v:

Bus 004 Device 010: ID 0bda:0301 Realtek Semiconductor Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x0301 
  bcdDevice            1.20
  iManufacturer           1 Realtek
  iProduct                2 USB3.0 Card Reader
  iSerial                 3 201006010301
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 CARD READER
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              5 Bulk-In, Bulk-Out, Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
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
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   0
      Lowest fully-functional device speed is Low Speed (1Mbps)
    bU1DevExitLat           1 micro seconds
    bU2DevExitLat        2815 micro seconds
Device Status:     0x0000
  (Bus Powered)

答案1

看起来好像Linux和读卡器互相不喜欢。

今天我测试了一个 USB3 转 SATA 适配器,测试的硬盘速度与直接使用 SATA 的速度差不多。

相关内容