Hdparm is a command line utility installed on most modern releases for ease of use. It can be used not only to test the performance of the drive, but also to change the settings for each drive (such as enabling or disabling DMA ). But be careful: Hdparm will cause drive crash or damage if used improperly!
First, use the df command to list all the drives on the system. Find the drive you want to test-If you are not sure, you can use the context, such as the total disk space or mount location, and then use it with the following command. Taking this article as an example, my drive is/dev/sda2.
To test the buffer read performance:
No matter which one you use, you need to run the command multiple times to get multiple readings, and then calculate the average value to better understand the performance. Make sure you have not performed any other operations that may affect reading, such as transferring files.
2. Bonnie ++Bonnie ++ is a free utility designed to benchmark file system and hard drive performance. It is not directly installed on most releases, but should appear in the core code library. Run the following commands to install the tool on Debian and Ubuntu:
sudo apt-get install bonnie++
Or use this command to install it on Fedora, Red Hat, or CentOS:
sudo yum install bonnie++
Once the installation is complete, the simplest way to run Bonnie ++ is to use the following command:
bonnie++ -d /tmp -r 2048 -u [username]
This will run the test in the/tmp directory (thus testing the performance of the drive where/tmp is located). The parameters used indicate that the system has 2048 MB of memory, the test will run with the [user name] user permission. In this article, the user is jleeso.
Are you sure you have enough memory on your system? Use the free-m command to search for Mem in the total column.
Finally, you will see a comma-separated line with different numbers. These are your results. Proportion:
1.96,1.96,ubuntu,1,1378913658,4G,,786,99,17094,3,15431,3,4662,91,37881,4,548.4,17,16,,,,,142,0,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,16569us,15704ms,2485ms,51815us,491ms,261ms,291us,400us,710us,382us,42us,787us
Copy it and enter the following command:
Echo "[paste your results]" | bon_csv2html>/tmp/test.html
Now, open/tmp/test.html in your Web browser and you will see a formatted table showing the results at a glance.
What is the performance of your PC?If your hardware benchmark looks good, but you still feel that the system is running slowly, pay attention to the following factors. Yes, slow hardware is often a bottleneck, but you need to pay attention to other aspects before the upgrade.
For example, there are some tips and methods on Ubuntu to speed up daily operations (non-Ubuntu releases have their own tips and methods ). You should also consider updating the underlying Linux kernel.
Original from: http:// OS .51cto.com/art/201609/517889.htm? Pc
Address: http://www.linuxprobe.com/test-linux-performing.html