Display Disk Settings2021/04/14 |
|
Display Disk Settings information on your Computer.
|
|
| [1] | Install required packages. For SCSI or SATA devices, Install [hdparm], For NVMe devices like M.2 SSD, Install [nvme-cli]. |
|
[root@dlp ~]# dnf -y install hdparm nvme-cli
|
| [2] | This is the basic usage for [hdparm]. |
|
# display basic disk settings [root@dlp ~]# hdparm /dev/sda /dev/sda: multcount = 16 (on) IO_support = 1 (32-bit) readonly = 0 (off) readahead = 8192 (on) geometry = 364801/255/63, sectors = 5860533168, start = 0 # display detailed disk info [root@dlp ~]# hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: ST3000VN007-2E4166
Serial Number: Z6A084MY
Firmware Revision: SC60
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x001f)
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 5860533168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 2861588 MBytes
device size with M = 1000*1000: 3000592 MBytes (3000 GB)
cache/buffer size = unknown
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 5900
.....
.....
# run cached and buffered reads test [root@dlp ~]# hdparm -Tt /dev/sda /dev/sda: Timing cached reads: 20780 MB in 1.99 seconds = 10442.32 MB/sec Timing buffered disk reads: 420 MB in 3.01 seconds = 139.68 MB/sec |
| [3] | This is the basic usage for [nvme-cli]. |
|
# display NVMe devices [root@dlp ~]# nvme list Node SN Model Namespace Usage Format FW Rev ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- /dev/nvme0n1 BTNH93310Q5T1P0B INTEL SSDPEKNW010T8 1 1.02 TB / 1.02 TB 512 B + 0 B 002C /dev/nvme1n1 P02724117355 PLEXTOR PX-1TM8SeY 1 1.02 TB / 1.02 TB 512 B + 0 B 1.00 # display device info [root@dlp ~]# nvme id-ctrl -H /dev/nvme0n1 NVME Identify Controller: vid : 0x8086 ssvid : 0x8086 sn : BTNH93310Q5T1P0B mn : INTEL SSDPEKNW010T8 fr : 002C rab : 6 ieee : 5cd2e4 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 : 0x10300 rtd3r : 0x7a120 rtd3e : 0x1e8480 oaes : 0x200 ..... ..... # display SMART log [root@dlp ~]# nvme smart-log /dev/nvme0n1 Smart Log for NVME device:nvme0n1 namespace-id:ffffffff critical_warning : 0 temperature : 38 C available_spare : 100% available_spare_threshold : 10% percentage_used : 0% endurance group critical warning summary: 0 data_units_read : 432,806 data_units_written : 2,757,072 host_read_commands : 5,074,446 host_write_commands : 17,428,499 controller_busy_time : 157 power_cycles : 4 power_on_hours : 12,037 unsafe_shutdowns : 0 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Thermal Management T1 Trans Count : 107 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 778 Thermal Management T2 Total Time : 0 # display error log [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] | For benchmarking to any Disk, it's possible to do with [fio (Flexible I/O Tester)] tool. |
|
[root@dlp ~]#
dnf -y install fio
# test sequential reads with 4K block size [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.19
Starting 64 processes
testjob4K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 64 (f=64): [R(64)][100.0%][r=1166MiB/s][r=299k IOPS][eta 00m:00s]
testjob4K1G: (groupid=0, jobs=64): err= 0: pid=286250: Wed Apr 14 15:28:52 2021
read: IOPS=302k, BW=1180MiB/s (1238MB/s)(11.5GiB/10002msec)
clat (usec): min=29, max=3019, avg=210.84, stdev=23.23
lat (usec): min=29, max=3019, avg=210.94, stdev=23.23
clat percentiles (usec):
| 1.00th=[ 176], 5.00th=[ 190], 10.00th=[ 196], 20.00th=[ 200],
| 30.00th=[ 204], 40.00th=[ 206], 50.00th=[ 208], 60.00th=[ 212],
| 70.00th=[ 215], 80.00th=[ 221], 90.00th=[ 229], 95.00th=[ 239],
| 99.00th=[ 265], 99.50th=[ 277], 99.90th=[ 343], 99.95th=[ 506],
| 99.99th=[ 1020]
bw ( MiB/s): min= 1142, max= 1216, per=100.00%, avg=1182.62, stdev= 0.34, samples=1216
iops : min=292486, max=311538, avg=302750.11, stdev=86.86, samples=1216
lat (usec) : 50=0.01%, 100=0.02%, 250=97.70%, 500=2.22%, 750=0.04%
lat (usec) : 1000=0.01%
lat (msec) : 2=0.01%, 4=0.01%
cpu : usr=0.99%, sys=2.56%, ctx=3022349, majf=0, minf=936
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=3022110,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=1180MiB/s (1238MB/s), 1180MiB/s-1180MiB/s (1238MB/s-1238MB/s), io=11.5GiB (12.4GB), run=10002-10002msec
Disk stats (read/write):
nvme1n1: ios=2992118/0, merge=0/0, ticks=613762/0, in_queue=351, util=99.04%
# test sequential reads with 512K block size [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.19
Starting 64 processes
testjob512K1G: Laying out IO file (1 file / 1024MiB)
Jobs: 64 (f=64): [R(64)][100.0%][r=2364MiB/s][r=4727 IOPS][eta 00m:00s]
testjob512K1G: (groupid=0, jobs=64): err= 0: pid=286398: Wed Apr 14 15:30:17 2021
read: IOPS=4750, BW=2375MiB/s (2491MB/s)(23.2GiB/10013msec)
clat (usec): min=3959, max=37848, avg=13456.49, stdev=2751.42
lat (usec): min=3959, max=37848, avg=13456.72, stdev=2751.42
clat percentiles (usec):
| 1.00th=[12911], 5.00th=[12911], 10.00th=[12911], 20.00th=[12911],
| 30.00th=[12911], 40.00th=[12911], 50.00th=[12911], 60.00th=[12911],
| 70.00th=[12911], 80.00th=[12911], 90.00th=[13042], 95.00th=[14484],
| 99.00th=[31589], 99.50th=[35390], 99.90th=[37487], 99.95th=[37487],
| 99.99th=[38011]
bw ( MiB/s): min= 2240, max= 2496, per=99.96%, avg=2374.50, stdev= 1.44, samples=1216
iops : min= 4480, max= 4992, avg=4746.11, stdev= 2.85, samples=1216
lat (msec) : 4=0.01%, 10=0.08%, 20=97.32%, 50=2.60%
cpu : usr=0.03%, sys=0.27%, ctx=48059, majf=0, minf=15647
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=47570,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=2375MiB/s (2491MB/s), 2375MiB/s-2375MiB/s (2491MB/s-2491MB/s), io=23.2GiB (24.9GB), run=10013-10013msec
Disk stats (read/write):
nvme1n1: ios=185902/8, merge=0/0, ticks=2483347/147, in_queue=2330555, util=98.72%
|
| Sponsored Link |
|
|