Last active
February 6, 2024 15:04
-
-
Save xingjinglu/e0cd712c7fba8635d02001b211b5659a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IOPS (Input/Output Per Second) | |
- hdparm | |
``` bash | |
[@nmyjs_186_118 luxingjing]$ sudo hdparm -Tt /dev/sda | |
[sudo] password for luxingjing: | |
/dev/sda: | |
Timing cached reads: 17440 MB in 2.00 seconds = 8730.78 MB/sec | |
Timing buffered disk reads: 602 MB in 3.00 seconds = 200.61 MB/sec | |
``` | |
- dd | |
非专业测试工具,测试可能不准。 | |
``` bash | |
``` | |
- fio | |
顺序读写看BW,随机读写看IOPS参数。 | |
```bash | |
# 随机读 | |
fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=60G -numjobs=64 -runtime=10 -group_reporting -name=file | |
# 顺序读 | |
fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=4k -size=60G -numjobs=64 -runtime=10 -group_reporting -name=file | |
# 随机写 | |
fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=60G -numjobs=64 -runtime=10 -group_reporting -name=file | |
# 顺序写 | |
$ fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=60G -numjobs=64 -runtime=10 -group_reporting -name=file | |
# 混合随机读写 | |
fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=30 -ioengine=psync -bs=4k -size=60G -numjobs=64 -runtime=10 -group_reporting -name=file -ioscheduler=noop | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment