In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use the dd command to test the linux disk read and write speed", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use the dd command to test the linux disk read and write speed" bar!
1. Familiarize yourself with two special devices:
(1) / dev/null: recycle bin, bottomless pit.
(2) / dev/zero: generates characters.
2. Test disk writing ability
The code is as follows:
Time dd if=/dev/zero of=/testw.dbf bs=4k count=100000
Because / dev//zero is a pseudo device, it only generates an empty character stream and does not generate IO for it, so IO is concentrated in of files and of files are only used for writing, so this command is equivalent to testing disk write ability. Adding oflag=direct at the end of the command skips the memory cache, and adding oflag=sync skips the hdd cache.
3. Test disk read ability
The code is as follows:
Time dd if=/dev/sdb of=/dev/null bs=4k
Because / dev/sdb is a physical partition, reading it will result that IO,/dev/null is a pseudo device, which is equivalent to a black hole, and of to this device will not generate IO, so the IO of this command only occurs on / dev/sdb, which is also equivalent to testing the read ability of the disk. (Ctrl+c terminates the test)
4. Test the ability to read and write at the same time
The code is as follows:
Time dd if=/dev/sdb of=/testrw.dbf bs=4k
Under this command, one is the physical partition and the other is the actual file, and IO is generated for both reading and writing to them (read to / dev/sdb and write to / testrw.dbf). Assuming they are all on the same disk, this command is equivalent to testing the disk's read and write ability at the same time.
Thank you for your reading, the above is the content of "how to use dd command to test linux disk read and write speed". After the study of this article, I believe you have a deeper understanding of how to use dd command to test linux disk read and write speed, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.