We often use USB flash drives, SD cards, and hard disks to store data. But we usually use hard disks to copy data from the computer, but sometimes it is very slow. Most of the time, we want to know how fast the hard disk reads and writes. in Linux, we can use hdparm to test the hard disk or view information about the hard disk. In this way, you know the hard disk read/write speed.
Hdparm
Parameters:
-A indicates whether the disk pre-read function is disabled. For reading large files, this obviously improves the performance.
-A: Set the hard drive cache read feature. It may be hard disk cache Switch
-G: displays the disk's magnetic track, Head, magnetic area, and other parameters.
-I displays the hardware specification information of the hard disk, which is provided by the hard disk itself at startup.
-I directly reads the hardware specification information provided by the hard disk.
-P: Set the PIO mode of the hard disk.
-Tt evaluates the Read efficiency of the hard disk and the Read efficiency of the hard disk cache.
-U <0 or 1>. Other interruption requirements can be executed simultaneously during hard disk access.
-V displays the hard disk settings.
Example:
1) Direct hard disk read Test
- hdparm -tT –direct /dev/hugwww/data1
- /dev/hugwww/data1:
- Timing O_DIRECT cached reads:422MB in 2.00 seconds =210.62 MB/sec
- Timing O_DIRECT disk reads:632MB in 3.00 seconds =210.56 MB/sec
The above is my lvm partition test, the gb ssd, completed the hard disk read and write speed in Linux, you can better copy data.
- Operation notes: Linux hard disk partition
- Install db2 in Linux
- Install PPStream network TV in Linux
- Protect your Linux operating system
- Checks whether Linux servers are attacked by hackers.