Creating a mixed read/write workload with fio can be a bit confusing. Assume we want to create a fixed rate workload of 100 IOPS split 70:30 between reads and writes.
![](https://i0.wp.com/www.n0derunner.com/wp-content/uploads/2021/07/rwmixread-70-30-wrong.png?resize=178%2C171&ssl=1)
TL;DR
Specify the rate directly with rate_iops=<read-rate>,<write-rate> do not try to use rwmixread with rate_iops. For the example above use.
rate_iops=70,30
Additionally older versions of fio exhibit problems when using rate_poisson with rate_iops . fio version 3.7 that I was using did not exhibit the problem.
Longer Answer
We might try the following and use rwmixread together with rate_iops. This is appealing because we would like to specify a single toatal IOP rate with rate_iops, then manipulate the skew with a single value rwmixread. Unfortunately that’s not how it works.
Incorrect
[global] rw=randrw bs=8k ioengine=libaio direct=1 iodepth=32 [sdb] rwmixread=70 rate_iops=100 filename=/dev/sdb size=20G
Doing the above will actually generate 200 iops with 100 read, and 100 write IOPS. This is because rate_iops=100 is really just shorthand for rate_iops=100,100. Unfortunately rwmixread has no effect at all
![](https://i0.wp.com/www.n0derunner.com/wp-content/uploads/2021/07/test2-rate-iops-100-rwmixread-50-iostat.png?resize=991%2C105&ssl=1)
Correct
To create a specific fixed r/w rate we have to specify the read and write rates explicitly using rate_iops=<read-rate>,<write-rate>.
[global] rw=randrw bs=8k ioengine=libaio direct=1 iodepth=32 [sdb] rate_iops=70,30 filename=/dev/sdb
![](https://i0.wp.com/www.n0derunner.com/wp-content/uploads/2021/07/fio-fixed-70-30-iostat.png?resize=985%2C153&ssl=1)