[12] Informacje o dysku twardym

19 marca 2022 Wyłączono przez Adam [zicherka] Nogły

Wyświetl informacje o ustawieniach dysku na swoim komputerze.

[1] Zainstaluj wymagane pakiety.

# w przypadku urządzeń SCSI lub SATA zainstaluj [hdparm], w przypadku urządzeń NVMe, takich jak M.2 SSD, zainstaluj [nvme-cli].
[root@vlsr01 ~]# dnf install hdparm nvme-cli

[2] To jest podstawowe zastosowanie [hdparm].

# pokaż podstawowe informacje o dysku
[root@vlsr01 ~]# hdparm /dev/sda
/dev/sda:
 multcount     = 255 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 8192 (on)
 geometry      = 2610/255/63, sectors = 41943040, start = 0

# pokaż szczegółowe informacje o dysku
[root@vlsr01 ~]# hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
        Model Number:       VMware Virtual SATA Hard Drive
        Serial Number:      00000000000000000001
        Firmware Revision:  00000001
Standards:
        Used: ATA/ATAPI-6 T13 1410D revision 0
        Supported: 6 5 4
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           15      15
        sectors/track   63      63
        --
        CHS current addressable sectors:    15481935
        LBA    user addressable sectors:    41943040
        LBA48  user addressable sectors:    41943040
        Logical  Sector size:                   512 bytes
        Physical Sector size:                   512 bytes
        device size with M = 1024*1024:       20480 MBytes
        device size with M = 1000*1000:       21474 MBytes (21 GB)
        cache/buffer size  = 32 KBytes
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Vendor, with device specific minimum
        R/W multiple sector transfer: Max = 255 Current = 255
        Advanced power management level: disabled
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    Power Management feature set
           *    NOP cmd
                Advanced Power Management feature set
           *    48-bit Address feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    64-bit World wide name
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
Logical Unit WWN Device Identifier: 5000c2930e6bdc04
        NAA             : 5
        IEEE OUI        : 000c29
        Unique ID       : 30e6bdc04
Checksum: correct

# uruchom test odczytów z pamięci podręcznej i buforowanej
[root@vlsr01 ~]# hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21250 MB in  1.99 seconds = 10682.04 MB/sec
 Timing buffered disk reads: 1400 MB in  3.00 seconds = 466.66 MB/sec

[3] To jest podstawowe użycie [nvme-cli].

# pokaż urządzenia NVMe
[root@vlsr01 ~]# nvme list

# pokaż informacje o urządzeniu
[root@vlsr01 ~]# nvme id-ctrl -H /dev/sda

# pokaż SMART log
[root@vlsr01 ~]# nvme smart-log /dev/nvme0n1

# pokaż log błędów
[root@vlsr01 ~]# nvme error-log /dev/nvme0n1

[4] Aby przeprowadzić test porównawczy na dowolnym dysku, można to zrobić za pomocą narzędzia [fio (Flexible I/O Tester)].

[root@vlsr01 ~]# dnf install fio

# testowe odczyty sekwencyjne z rozmiarem bloku 4K
[root@vlsr01 ~]# fio --bs=4k --size=1G --direct=1 --rw=read --numjobs=64 --runtime=10 --group_reporting --name=testjob4K1G --filename=/var/m2/testfile4K1G
testjob4K1G: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
...
fio-3.19
Starting 64 processes
testjob4K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 64 (f=64): [R(64)][100.0%][r=26.2MiB/s][r=6697 IOPS][eta 00m:00s]
testjob4K1G: (groupid=0, jobs=64): err= 0: pid=114641: Thu Mar 17 15:35:18 2022
  read: IOPS=6649, BW=25.0MiB/s (27.2MB/s)(260MiB/10017msec)
    clat (usec): min=160, max=699318, avg=9579.72, stdev=23316.81
     lat (usec): min=161, max=699318, avg=9579.83, stdev=23316.81
    clat percentiles (msec):
     |  1.00th=[    5],  5.00th=[    5], 10.00th=[    5], 20.00th=[    5],
     | 30.00th=[    5], 40.00th=[    5], 50.00th=[    6], 60.00th=[    6],
     | 70.00th=[    6], 80.00th=[    8], 90.00th=[   17], 95.00th=[   33],
     | 99.00th=[   67], 99.50th=[   90], 99.90th=[  368], 99.95th=[  651],
     | 99.99th=[  701]
   bw (  KiB/s): min= 2856, max=53872, per=95.96%, avg=25522.21, stdev=284.66, samples=1216
   iops        : min=  714, max=13468, avg=6379.11, stdev=71.14, samples=1216
  lat (usec)   : 250=0.09%, 500=0.01%, 750=0.01%, 1000=0.03%
  lat (msec)   : 2=0.12%, 4=0.52%, 10=85.69%, 20=4.63%, 50=6.99%
  lat (msec)   : 100=1.51%, 250=0.30%, 500=0.05%, 750=0.08%
  cpu          : usr=0.02%, sys=0.11%, ctx=66811, majf=0, minf=1070
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=66607,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
   READ: bw=25.0MiB/s (27.2MB/s), 25.0MiB/s-25.0MiB/s (27.2MB/s-27.2MB/s), io=260MiB (273MB), run=10017-10017msec
Disk stats (read/write):
    dm-0: ios=64564/0, merge=0/0, ticks=625232/0, in_queue=625232, util=98.89%, aggrios=34559/0, aggrmerge=32048/0, aggrticks=328553/0, aggrin_queue=328554, aggrutil=98.67%
  sda: ios=34559/0, merge=32048/0, ticks=328553/0, in_queue=328554, util=98.67%

# testowe odczyty sekwencyjne z rozmiarem bloku 512K
[root@vlsr01 ~]# fio --bs=512k --size=1G --direct=1 --rw=read --numjobs=64 --runtime=10 --group_reporting --name=testjob512K1G --filename=/var/m2/testfile512K1G
testjob512K1G: (g=0): rw=read, bs=(R) 512KiB-512KiB, (W) 512KiB-512KiB, (T) 512KiB-512KiB, ioengine=psync, iodepth=1
...
fio-3.19
Starting 64 processes
testjob512K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 25 (f=25): [R(2),_(6),R(2),E(1),_(2),R(1),E(1),R(2),_(1),E(1),_(3),R(1),E(1),R(2),_(4),R(3),_(2),R(1),_(1),R(1),_(4),R(1),E(1),R(4),_(1),R(1),_(1),R(2),_(1),E(1),_(1),R(1),_(2),R(1),_(1),E(1),_(2)][5.7%][r=423MiB/s][r=845 IOPS][eta 03m:01s]
testjob512K1G: (groupid=0, jobs=64): err= 0: pid=114709: Thu Mar 17 15:36:27 2022
  read: IOPS=878, BW=439MiB/s (461MB/s)(4438MiB/10098msec)
    clat (usec): min=1330, max=351053, avg=71767.40, stdev=15669.13
     lat (usec): min=1330, max=351053, avg=71767.53, stdev=15669.13
    clat percentiles (msec):
     |  1.00th=[   18],  5.00th=[   58], 10.00th=[   63], 20.00th=[   66],
     | 30.00th=[   67], 40.00th=[   69], 50.00th=[   70], 60.00th=[   71],
     | 70.00th=[   74], 80.00th=[   80], 90.00th=[   88], 95.00th=[   96],
     | 99.00th=[  116], 99.50th=[  133], 99.90th=[  165], 99.95th=[  222],
     | 99.99th=[  351]
   bw (  KiB/s): min=359428, max=524254, per=100.00%, avg=452163.68, stdev=728.94, samples=1241
   iops        : min=  675, max= 1022, avg=868.58, stdev= 1.45, samples=1241
  lat (msec)   : 2=0.70%, 10=0.05%, 20=0.33%, 50=1.85%, 100=93.21%
  lat (msec)   : 250=3.83%, 500=0.05%
  cpu          : usr=0.00%, sys=0.16%, ctx=9065, majf=0, minf=9125
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=8876,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
   READ: bw=439MiB/s (461MB/s), 439MiB/s-439MiB/s (461MB/s-461MB/s), io=4438MiB (4654MB), run=10098-10098msec
Disk stats (read/write):
    dm-0: ios=8876/0, merge=0/0, ticks=631084/0, in_queue=631084, util=98.91%, aggrios=5306/0, aggrmerge=3570/0, aggrticks=375228/0, aggrin_queue=375228, aggrutil=98.78%
  sda: ios=5306/0, merge=3570/0, ticks=375228/0, in_queue=375228, util=98.78%