Display Disk Settings2025/02/25 |
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 = 256 (on) geometry = 15566/255/63, sectors = 250069680, start = 0 # display detailed disk info [root@dlp ~]# hdparm -I /dev/sda /dev/sda: ATA device, with non-removable media Model Number: TOSHIBA THNSNH128GCST Serial Number: Y3TS108TTPEY Firmware Revision: HTRAN101 Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0 Standards: 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: 250069680 LBA48 user addressable sectors: 250069680 Logical Sector size: 512 bytes Physical Sector size: 512 bytes Logical Sector-0 offset: 0 bytes device size with M = 1024*1024: 122104 MBytes device size with M = 1000*1000: 128035 MBytes (128 GB) cache/buffer size = unknown Form Factor: 2.5 inch Nominal Media Rotation Rate: Solid State Device ..... ..... # run cached and buffered reads test [root@dlp ~]# hdparm -Tt /dev/sda /dev/sda: Timing cached reads: 22442 MB in 1.99 seconds = 11279.84 MB/sec Timing buffered disk reads: 1488 MB in 3.00 seconds = 495.75 MB/sec |
[3] | This is the basic usage for [nvme-cli]. |
# display NVMe devices [root@dlp ~]# nvme list Node Generic SN Model Namespace Usage Format FW Rev --------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- -------- /dev/nvme0n1 /dev/ng0n1 P02724117355 PLEXTOR PX-1TM8SeY 0x1 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 : 0x14a4 ssvid : 0x1b4b sn : P02724117355 mn : PLEXTOR PX-1TM8SeY fr : 1.00 rab : 0 ieee : 002303 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 : 0x10200 rtd3r : 0xf4240 rtd3e : 0x1e8480 oaes : 0 ..... ..... # display SMART log [root@dlp ~]# nvme smart-log /dev/nvme0n1 Smart Log for NVME device:nvme0n1 namespace-id:ffffffff critical_warning : 0 temperature : 82 F (301 K) available_spare : 100% available_spare_threshold : 0% percentage_used : 2% endurance group critical warning summary: 0 Data Units Read : 18373364 (9.41 TB) Data Units Written : 112192560 (57.44 TB) host_read_commands : 135783890 host_write_commands : 635831261 controller_busy_time : 72014 power_cycles : 48 power_on_hours : 40556 unsafe_shutdowns : 8 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 82 F (301 K) Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 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 (Successful Completion: The command completed without error) phase_tag : 0 parm_err_loc : 0 lba : 0 nsid : 0 vs : 0 trtype : 0 (The transport type is not indicated or the error is not transport related) csi : 0 opcode : 0 cs : 0 trtype_spec_info: 0 log_page_version: 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.36 Starting 64 processes testjob4K1G: Laying out IO file (1 file / 1024MiB) Jobs: 64 (f=64): [R(64)][100.0%][r=1158MiB/s][r=296k IOPS][eta 00m:00s] testjob4K1G: (groupid=0, jobs=64): err= 0: pid=2895: Tue Feb 25 09:35:27 2025 read: IOPS=299k, BW=1169MiB/s (1225MB/s)(11.4GiB/10002msec) clat (usec): min=31, max=5959, avg=212.94, stdev=32.44 lat (usec): min=31, max=5959, avg=213.04, stdev=32.44 clat percentiles (usec): | 1.00th=[ 178], 5.00th=[ 192], 10.00th=[ 198], 20.00th=[ 204], | 30.00th=[ 206], 40.00th=[ 208], 50.00th=[ 210], 60.00th=[ 215], | 70.00th=[ 217], 80.00th=[ 223], 90.00th=[ 231], 95.00th=[ 239], | 99.00th=[ 260], 99.50th=[ 273], 99.90th=[ 457], 99.95th=[ 529], | 99.99th=[ 1090] bw ( MiB/s): min= 1123, max= 1196, per=100.00%, avg=1169.80, stdev= 0.25, samples=1216 iops : min=287519, max=306204, avg=299468.00, stdev=64.72, samples=1216 lat (usec) : 50=0.01%, 100=0.03%, 250=97.90%, 500=1.98%, 750=0.06% lat (usec) : 1000=0.01% lat (msec) : 2=0.01%, 4=0.01%, 10=0.01% cpu : usr=1.13%, sys=2.86%, ctx=2992198, majf=0, minf=940 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=2992012,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=1169MiB/s (1225MB/s), 1169MiB/s-1169MiB/s (1225MB/s-1225MB/s), io=11.4GiB (12.3GB), run=10002-10002msec Disk stats (read/write): nvme0n1: ios=2977200/0, sectors=23817600/0, merge=0/0, ticks=607690/0, in_queue=607689, util=94.56% # 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.36 Starting 64 processes testjob512K1G: Laying out IO file (1 file / 1024MiB) Jobs: 64 (f=64): [R(64)][100.0%][r=2189MiB/s][r=4377 IOPS][eta 00m:00s] testjob512K1G: (groupid=0, jobs=64): err= 0: pid=3010: Tue Feb 25 09:36:27 2025 read: IOPS=4308, BW=2154MiB/s (2259MB/s)(21.1GiB/10013msec) clat (usec): min=5840, max=36397, avg=14840.60, stdev=5892.49 lat (usec): min=5841, max=36397, avg=14840.82, stdev=5892.50 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=[13042], 90.00th=[16581], 95.00th=[35390], | 99.00th=[35914], 99.50th=[35914], 99.90th=[35914], 99.95th=[36439], | 99.99th=[36439] bw ( MiB/s): min= 1855, max= 2496, per=100.00%, avg=2161.14, stdev= 3.93, samples=1250 iops : min= 3710, max= 4992, avg=4322.28, stdev= 7.85, samples=1250 lat (msec) : 10=0.04%, 20=90.82%, 50=9.14% cpu : usr=0.03%, sys=0.28%, ctx=43267, majf=0, minf=8974 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=43140,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=2154MiB/s (2259MB/s), 2154MiB/s-2154MiB/s (2259MB/s-2259MB/s), io=21.1GiB (22.6GB), run=10013-10013msec Disk stats (read/write): nvme0n1: ios=168827/0, sectors=43219968/0, merge=0/0, ticks=2490512/0, in_queue=2490512, util=84.60% |
|