hdparm Command Tutorial with Examples For Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/hdparm-command-tutorial-with-examples-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

Linux have different tools to manage disk devices and hard disks. hdparm is one of the popular tools. Hdparm can get information about hard disk, change writing intervals, acoustic management, DMA settings etc.But be cautious while changing settings about the hard disk drive.

Syntax

Help

Help
Help

Show Information About Disk

One of the most wanted feature is getting information about the hard disk drive. We will use -I option and the hard disk drive to get detailed information.

Show Information About Disk
Show Information About Disk

We will get a lot of detailed information about the hard disk. Here are some of them

  • Model Number
  • Serial Number
  • Firmware Revision
  • Cylinders, Heads, Sectors
  • DMA
  • Features supported and enabled

Measure Hard Disk Device Read Speed

Hard disk drive speed can be tested with hdparm . We will use -t option for speed test. This test will only look read speed of the hard disk drive.

Measure Hard Disk Device Read Speed
Measure Hard Disk Device Read Speed

We will get the benchmarks result after 5-10 seconds. We will get information like how much disk read is done and how much time required for this and average read performance in MB/sec

Measure Hard Disk Cache Read Speed

Another read hard disk device speed test is reading cache. Reading cache will give more higher performance than reading from disk because only the cached data will be used and tested. We will use -T option for this benchmark test.

Measure Hard Disk Cache Read Speed
Measure Hard Disk Cache Read Speed

As we can see from screenshot that reading performance is at 5GB/sec

LEARN MORE  RabbitMQ Tutorial

Enable Read Ahead

To enable read ahead we will use -A1 .

Silence Please

Mechanic disk or classical hard disks have some moving parts. There are disks in the hard disk which turns 5400 or 7200 RPM. There are some heads those will write some data by using magnetic areas techniques which will create some noise. Especially in busy systems this noise can be problem for us. We can lower the noise by lowering disk performance.

Change Disk Write Periods

Another popular issue is hard disk drives writing periods. We can change write intervals with -B option with the level. Levels can be between  and 255 .

Change DMA Settings

DMA gives performance to the hard disk operations. Which will write data into disk drive without need of CPU or other mechanisms. New disk drives all ready this featured enabled but for some older disk drives may not have this feature enabled. We can enable DMA with-d1

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/hdparm-command-tutorial-with-examples-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

Leave a Reply

Your email address will not be published.