| ディスクの設定情報を表示する2022/06/30 | 
| 
コンピューターに搭載されたディスクの設定等の情報を表示します。
 | |
| [1] | 必要なパッケージをインストールします。 SCSI や SATA 接続のデバイスについては [hdparm]、NVMe 接続の M.2 SSD 等のデバイスについては [nvme-cli] をインストールします。 | 
| [root@dlp ~]# dnf -y install hdparm nvme-cli  | 
| [2] | [hdparm] の基本的な操作です。当例では設定情報の表示のみを例示します。 | 
| # ディスクの設定情報を表示 [root@dlp ~]# hdparm /dev/sdc  /dev/sdc: multcount = 0 (off) IO_support = 1 (32-bit) readonly = 0 (off) readahead = 256 (on) geometry = 243201/255/63, sectors = 3907029168, start = 0 # ディスクの詳細な情報を表示 [root@dlp ~]# hdparm -I /dev/sdc  
/dev/sdc:
ATA device, with non-removable media
        Model Number:       SanDisk SDSSDH32000G
        Serial Number:      182501420154
        Firmware Revision:  X61170RL
        Media Serial Num:
        Media Manufacturer:
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
        Used: unknown (minor revision code 0x005e)
        Supported: 11 10 9 8 7 6 5
        Likely used: 11
Configuration:
        Logical         max     current
        cylinders       16383   0
        heads           16      0
        sectors/track   63      0
        --
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  3907029168
        Logical  Sector size:                   512 bytes
        Physical Sector size:                   512 bytes
        Logical Sector-0 offset:                  0 bytes
        device size with M = 1024*1024:     1907729 MBytes
        device size with M = 1000*1000:     2000398 MBytes (2000 GB)
        cache/buffer size  = unknown
        Form Factor: 2.5 inch
        Nominal Media Rotation Rate: Solid State Device
.....
.....
# デバイスとキャッシュの読み出し性能をテストする [root@dlp ~]# hdparm -Tt /dev/sdc  /dev/sdc: Timing cached reads: 24446 MB in 2.00 seconds = 12239.55 MB/sec Timing buffered disk reads: 768 MB in 3.00 seconds = 255.70 MB/sec | 
| [3] | [nvme-cli] の基本的な操作です。当例では設定情報の表示のみを例示します。 | 
| # NVMe デバイスを表示する [root@dlp ~]# nvme list  Node SN Model Namespace Usage Format FW Rev --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- /dev/nvme0n1 P02139500965 PLEXTOR PX-1TM10PY 1 1.02 TB / 1.02 TB 512 B + 0 B 1.01 /dev/nvme1n1 P02204400751 PLEXTOR PX-512M10PGN 1 512.11 GB / 512.11 GB 512 B + 0 B 1.03 # デバイス情報を表示する [root@dlp ~]# nvme id-ctrl -H /dev/nvme0n1  NVME Identify Controller: vid : 0x1e95 ssvid : 0x1dbe sn : P02139500965 mn : PLEXTOR PX-1TM10PY fr : 1.01 rab : 2 ieee : 38f601 cmic : 0 [3:3] : 0 ANA not supported [2:2] : 0 PCI [1:1] : 0 Single Controller [0:0] : 0 Single Port mdts : 5 cntlid : 0x1 ver : 0x10400 rtd3r : 0x186a0 rtd3e : 0x1e8480 oaes : 0 ..... ..... # SMART ログを表示する [root@dlp ~]# nvme smart-log /dev/nvme0n1  Smart Log for NVME device:nvme0n1 namespace-id:ffffffff critical_warning : 0 temperature : 38 C (311 Kelvin) available_spare : 100% available_spare_threshold : 0% percentage_used : 0% endurance group critical warning summary: 0 data_units_read : 108,181 data_units_written : 2,171,940 host_read_commands : 798,902 host_write_commands : 14,460,425 controller_busy_time : 49 power_cycles : 17 power_on_hours : 931 unsafe_shutdowns : 4 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 38 C (311 Kelvin) Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0 # エラーログを表示する [root@dlp ~]# nvme error-log /dev/nvme0n1  Error Log Entries for device:nvme0n1 entries:64 ................. Entry[ 0] ................. error_count : 0 sqid : 0 cmdid : 0 status_field : 0(SUCCESS: The command completed successfully) parm_err_loc : 0 lba : 0 nsid : 0 vs : 0 trtype : The transport type is not indicated or the error is not transport related. cs : 0 trtype_spec_info: 0 ..... ..... | 
| [4] | 接続方式に関係なく使用可能なベンチマークツール [fio (Flexible I/O Tester)] コマンドでのディスク性能のテストです。 | 
| 
[root@dlp ~]#  dnf -y install fio  # ブロックサイズ 4K でのシーケンシャルリード性能をテストする [root@dlp ~]# 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.27
Starting 64 processes
testjob4K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 64 (f=64): [R(64)][100.0%][r=2537MiB/s][r=650k IOPS][eta 00m:00s]
testjob4K1G: (groupid=0, jobs=64): err= 0: pid=561094: Tue Oct 25 10:10:42 2022
  read: IOPS=638k, BW=2493MiB/s (2614MB/s)(24.3GiB/10002msec)
    clat (usec): min=5, max=10869, avg=99.88, stdev=73.97
     lat (usec): min=5, max=10870, avg=99.92, stdev=73.97
    clat percentiles (usec):
     |  1.00th=[   60],  5.00th=[   64], 10.00th=[   66], 20.00th=[   71],
     | 30.00th=[   77], 40.00th=[   84], 50.00th=[   92], 60.00th=[   98],
     | 70.00th=[  105], 80.00th=[  114], 90.00th=[  137], 95.00th=[  161],
     | 99.00th=[  281], 99.50th=[  351], 99.90th=[  693], 99.95th=[ 1090],
     | 99.99th=[ 2245]
   bw (  MiB/s): min= 1932, max= 2608, per=99.96%, avg=2491.64, stdev= 2.24, samples=1216
   iops        : min=494718, max=667718, avg=637860.53, stdev=572.26, samples=1216
  lat (usec)   : 10=0.06%, 20=0.02%, 50=0.01%, 100=62.63%, 250=35.85%
  lat (usec)   : 500=1.28%, 750=0.08%, 1000=0.04%
  lat (msec)   : 2=0.04%, 4=0.01%, 10=0.01%, 20=0.01%
  cpu          : usr=0.82%, sys=2.21%, ctx=6382319, majf=2, minf=1188
  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=6382170,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=2493MiB/s (2614MB/s), 2493MiB/s-2493MiB/s (2614MB/s-2614MB/s), io=24.3GiB (26.1GB), run=10002-10002msec
Disk stats (read/write):
  nvme0n1: ios=6325926/8, merge=0/1, ticks=612577/122, in_queue=612711, util=98.89%
# ブロックサイズ 512K でのシーケンシャルリード性能をテストする [root@dlp ~]# 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.27
Starting 64 processes
testjob512K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 64 (f=64): [R(64)][100.0%][r=5937MiB/s][r=11.9k IOPS][eta 00m:00s]
testjob512K1G: (groupid=0, jobs=64): err= 0: pid=561243: Tue Oct 25 10:14:28 2022
  read: IOPS=11.7k, BW=5865MiB/s (6150MB/s)(57.3GiB/10005msec)
    clat (usec): min=617, max=14179, avg=5453.70, stdev=612.95
     lat (usec): min=618, max=14179, avg=5453.73, stdev=612.95
    clat percentiles (usec):
     |  1.00th=[ 4752],  5.00th=[ 4883], 10.00th=[ 5014], 20.00th=[ 5145],
     | 30.00th=[ 5211], 40.00th=[ 5276], 50.00th=[ 5407], 60.00th=[ 5473],
     | 70.00th=[ 5538], 80.00th=[ 5669], 90.00th=[ 5800], 95.00th=[ 5997],
     | 99.00th=[ 8848], 99.50th=[ 9765], 99.90th=[11338], 99.95th=[11994],
     | 99.99th=[13435]
   bw (  MiB/s): min= 4198, max= 6037, per=99.98%, avg=5864.22, stdev= 6.15, samples=1235
   iops        : min= 8396, max=12074, avg=11728.44, stdev=12.31, samples=1235
  lat (usec)   : 750=0.01%
  lat (msec)   : 2=0.01%, 4=0.02%, 10=99.58%, 20=0.39%
  cpu          : usr=0.02%, sys=0.23%, ctx=117506, majf=0, minf=9104
  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=117365,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=5865MiB/s (6150MB/s), 5865MiB/s-5865MiB/s (6150MB/s-6150MB/s), io=57.3GiB (61.5GB), run=10005-10005msec
Disk stats (read/write):
  nvme0n1: ios=465684/0, merge=0/0, ticks=2375008/0, in_queue=2375007, util=98.86%
 | 
| Sponsored Link | 
|  |