外部USB HDDへのデータ書き込みが非常に遅い。大容量ファイルの場合も同様です。

外部USB HDDへのデータ書き込みが非常に遅い。大容量ファイルの場合も同様です。

外部USB HDDにデータをコピーしています。データ転送が非常に遅いです。時には15kB/sに過ぎません。
システム:
ノートブック: Lenovo Thinkpad L520 (シリアルタグ: 7859 - 5BG S/N LR - 9WZ84 11/09)
OS: Kubuntu 20.04.3
カーネル: 5.11.0-43-generic
ハードドライブ: Toshiba Canvio Basics 4TB(HDTB440EKステッカー:MSIP-REM-TSD-DTB4 DTB440)
KDEパーティションマネージャを使用してNTFSにすばやくフォーマットしました。 (パーティションテーブル:GPT)

出力journalctl -xb | grep -E 'sdc|7:0:0:0'

[...] kernel: scsi 7:0:0:0: Direct-Access TOSHIBA External USB 3.0 5438 PQ: 0 ANSI: 6
[...] kernel: sd 7:0:0:0: Attached scsi generic sg3 type 0
[...] kernel: sd 7:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
[...] kernel: sd 7:0:0:0: [sdc] 7814037164 512-byte logical blocks: (4.00 TB/3.64 TiB)
[...] kernel: sd 7:0:0:0: [sdc] 4096-byte physical blocks
[...] kernel: sd 7:0:0:0: [sdc] Write Protect is off
[...] kernel: sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00
[...] kernel: sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[...] kernel: sdc: sdc1 sdc2
[...] kernel: sd 7:0:0:0: [sdc] Attached SCSI disk
[...] kernel: sdc: sdc1
[...] kernel: sdc: sdc1
[...] kernel: sdc:
[...] kernel: sdc:
[...] kernel: sdc: sdc1
[...] kernel: sdc: sdc1
[...] ntfs-3g[68912]: Mounted /dev/sdc1 (Read-Write, label "massstorage", NTFS 3.1)
[...] ntfs-3g[68912]: Mount options: nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,rw,default_permissions,fsname=/dev/sdc1,blkdev,blksize=4096
[...] udisksd[627]: Mounted /dev/sdc1 at /media/alex/massstorage on behalf of uid 1000
[...] ntfs-3g[68912]: Unmounting /dev/sdc1 (massstorage)
[...] udisksd[627]: Unmounted /dev/sdc1 on behalf of uid 1000
[...] udisksd[627]: Successfully sent SCSI command SYNCHRONIZE CACHE to /dev/sdc
[...] udisksd[627]: Successfully sent SCSI command START STOP UNIT to /dev/sdc
[...] kernel: sd 7:0:0:0: [sdc] Synchronizing SCSI cache
[...] udisksd[627]: Powered off /dev/sdc - successfully wrote to sysfs path /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/remove
[...] kernel: scsi 7:0:0:0: Direct-Access TOSHIBA External USB 3.0 5438 PQ: 0 ANSI: 6
[...] kernel: sd 7:0:0:0: Attached scsi generic sg3 type 0
[...] kernel: sd 7:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
[...] kernel: sd 7:0:0:0: [sdc] 7814037164 512-byte logical blocks: (4.00 TB/3.64 TiB)
[...] kernel: sd 7:0:0:0: [sdc] 4096-byte physical blocks
[...] kernel: sd 7:0:0:0: [sdc] Write Protect is off
[...] kernel: sd 7:0:0:0: [sdc] Mode Sense: 23 00 00 00
[...] kernel: sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[...] kernel: sdc: sdc1
[...] kernel: sd 7:0:0:0: [sdc] Attached SCSI disk
[...] sudo[71823]: alex : TTY=pts/1 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/mount -o async,flush /dev/sdc1 /media/alex/massstorage/
[...] ntfs-3g[71826]: Mounted /dev/sdc1 (Read-Write, label "massstorage", NTFS 3.1)
[...] ntfs-3g[71826]: Mount options: flush,allow_other,nonempty,relatime,rw,fsname=/dev/sdc1,blkdev,blksize=4096

転送速度が変わります。
時には15kB/sから2MB/sの間です。その後、2つのCPUコアは100%、残りの2つは20%未満です。
時には15MB/sから28MB/sの間です。これにより、CPUコア4個とも約55%となります。
(他の外部HDDからこのHDDにコピーするほとんどのテストを実行しました。内部SSDからこのHDDにコピーするテストでも同じ動作を確認しました。)

転送速度と各ファイルサイズの間に相関関係があるかどうかはわかりませんが、非常に大きなファイルでは遅いようです。数ギガバイトのファイルでも、速度は15kB / sに低下します。 (混乱しているわけではありません。大容量ファイルの場合は時々遅くなります。)

Dolphinはコピーが完了したことを示すメッセージを表示し、端末で同期を実行しても戻ってくるのに10分以上かかります。それでも、100%のCPUコアは2つ、残りの2つは20%未満です。

出力lsusb -t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 1: Dev 12, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 16, If 0, Class=Mass Storage, Driver=usb-storage, 480M <-- this is where it's connected
        |__ Port 4: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 4: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 1: Dev 11, If 0, Class=Imaging, Driver=, 480M
        |__ Port 2: Dev 9, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
        |__ Port 4: Dev 10, If 0, Class=Hub, Driver=hub/6p, 480M

出力lsusb -s 16 -v

Bus 002 Device 016: ID 0480:0900 Toshiba America Inc MQ04UBF100
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0480 Toshiba America Inc
  idProduct          0x0900 MQ04UBF100
  bcdDevice            3.22
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    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-Only
      iInterface              0 
      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     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

MaxPower 500mAと言われていますが、ハードドライブラベルには1.0Aが必要だと言われています。ポートは黄色のUSB 2.0ポートですが、500mA以上の電力を供給する必要があると思います。 (以前は通常のUSB 2.0ポートで使ったことがあります。違いはありません。)

出力sudo smartctl -A -s on /dev/sdc

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.11.0-43-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       5441
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       59
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       41
 10 Spin_Retry_Count        0x0033   101   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       23
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       2
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       7
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       70
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       28 (Min/Max 19/43)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       0
222 Loaded_Hours            0x0032   100   100   000    Old_age   Always       -       25
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       273
240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       0

マザーボード:出力cat /proc/cpuinfo | grep "model name" && lshw | grep -A5 "Moth" && lshw | grep product | head -n1

model name      : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
model name      : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
model name      : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
model name      : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
       description: Motherboard
       product: 78595BG
       vendor: LENOVO
       physical id: 0
       version: Not Available
       serial: 1ZJJK19L10V
    product: 78595BG

33MB/s(内蔵SSDからUSB HDDにコピー):出力iostat -kyx /dev/sdc 1 5

Linux 5.11.0-43-generic (alex-laptop)   2022-01-07      _x86_64_        (4 CPU)


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7,27    0,00   11,17   27,53    0,00   54,03

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00  298,00  35560,00  8592,00  96,65    6,61   119,33    0,00      0,00     0,00   0,00    0,00     0,00    1,97  99,20


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           8,92    0,00   13,39   27,82    0,00   49,87

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00  295,00  35292,00  8528,00  96,66    6,82   119,63    0,00      0,00     0,00   0,00    0,00     0,00    2,01 100,80


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7,33    0,00   10,47   29,84    0,00   52,36

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00  247,00  29532,00  7136,00  96,65    8,08   119,56    0,00      0,00     0,00   0,00    0,00     0,00    2,00 100,00


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          10,36    0,00   12,18   26,94    0,00   50,52

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00  276,00  33000,00  7974,00  96,65    7,16   119,57    0,00      0,00     0,00   0,00    0,00     0,00    1,98  99,20


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7,11    0,00   12,44   26,90    0,00   53,55

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00  285,00  34064,00  8231,00  96,65    7,06   119,52    0,00      0,00     0,00   0,00    0,00     0,00    2,01 100,80

20kB/s(内部SSDからUSB HDDにコピー):出力iostat -kyx /dev/sdc 1 5:

Linux 5.11.0-43-generic (alex-laptop)   2022-01-07      _x86_64_        (4 CPU)


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,54    0,00    1,52   47,47    0,00   47,47

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 2104,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    2,10 101,60


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,78    0,00    1,51   48,11    0,00   46,60

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    0,00      0,00     0,00   0,00    0,00     0,00    0,00      0,00     0,00   0,00    0,00     0,00    0,00   0,00


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,81    0,00    0,76   47,97    0,00   47,46

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 2080,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    2,08 106,40


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           6,35    0,00    1,02   45,18    0,00   47,46

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 2181,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    2,18 111,60


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,31    0,00    1,27   38,17    0,00   57,25

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 2205,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    2,21 109,20

Dolphinに転送を中止するよう指示してから4分後(内部SSDからUSB HDDにコピー):出力iostat -kyx /dev/sdc 1 5

Linux 5.11.0-43-generic (alex-laptop)   2022-01-07      _x86_64_        (4 CPU)


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           4,05    0,00    2,03   23,54    0,00   70,38

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 1068,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    1,07 106,80


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           4,52    0,00    1,01   23,62    0,00   70,85

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 1045,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    1,04 104,40


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,81    0,00    1,27   24,37    0,00   70,56

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 1081,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    1,08 108,00


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           4,27    0,00    1,26   23,87    0,00   70,60

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    0,00      0,00     0,00   0,00    0,00     0,00    0,00      0,00     0,00   0,00    0,00     0,00    0,00   0,00


avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,30    0,00    1,02   23,60    0,00   72,08

Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz  aqu-sz  %util
sdc              0,00      0,00     0,00   0,00    0,00     0,00    1,00    120,00    29,00  96,67 1058,00   120,00    0,00      0,00     0,00   0,00    0,00     0,00    1,06 106,00

1週間前にシステムクラッシュが発生しました。

ima: Error Communicating to TPM chip
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.0-91-generic #102-Ubuntu
Hardware name: LENOVO 78595BG/78595BG

(必要に応じて通貨追跡も提供できます。)その後、Kubuntuを完全に再インストールしました。それ以来、TPMチップに関連するものは何も会わなかった。 (また、競合が発生する前にシステムパーティション/ dev / sda6を暗号化していましたが、今は暗号化されたパーティションはありません。)

私は読んだここasync、flushオプションを使用してfsをマウントしてこれを実行します。sudo mount -o async,flush <device> <mountpoint> その後、転送速度が再び低下するまで、20 MB / sの速度で9 GBのデータを正常に転送しました。マニュアルページには、非同期オプションがNTFSファイルシステムに影響を与えないことが示されているので、原因が異なる可能性があると思います。

ベストアンサー1

おすすめ記事