On Fri, Jan 28, 2022 at 11:11 AM Nick Neumann <nick@xxxxxxxxxxxxxxxx> wrote: > Oooh, that looks really nice, and so flexible too. I will definitely > give it a try. On linux I'm running ubuntu 20 so it's an older version > of fio by default, but I can definitely deal with that. I'm also > running fio on windows too though, so unfortunately it doesn't help > there yet. > > Thanks very much for pointing me to this. Your pointer to the exec engine got me to look more carefully at the other engines. While not nearly as extensible or pure, there is the "cpuio" ioengine. Setting its cpuload to 1 and making a time_based job with desired runtime seems to work pretty well. I was hopeful it would work on windows as well. While a cpuio task runs fine on windows, there is something wrong when you try to run a task after it. For example, running this: time sudo fio --ioengine=libaio --direct=1 --filename=/dev/nvme1n1 --rw=write --iodepth=16 --bs=128k --name=job1 --size=15GB --runtime=10s --time_based --name=job2 --ioengine=cpuio --cpuload=1 --runtime=5s --time_based --wait_for=job1 --name=job3 --size=15GB --runtime=10s --time_based --wait_for=job2 does exactly what I expect on linux. 10 seconds of write for job 1, then 5 seconds of idle for job 2, then 10 seconds of write for job 3. Total runtime 25 seconds. But the equivalent on windows (just changing the global ioengine and filename): .\fio.exe --thread --ioengine=windowsaio --filename='\\.\PhysicalDrive1' --rw=write --iodepth=16 --bs=128k --name=job1 --size=15GB --runtime=10s --time_based --name=job2 --ioengine=null --size=1GB --runtime=5s --time_based --wait_for=job1 --name=job3 --size=15GB --runtime=10s --time_based --wait_for=job2 finishes and never even starts job3. Total runtime 15 seconds. It seems to be something with the cpuio option, because changing it to the null engine with --size=1GB gives the expected idle delay (but pollutes logs/stats with job2 which doesn't really write). Also, just examining the code in backend.c, it indeed looks like startdelay is evaluated based on time since fio began, not since the job itself became eligible to run due to a wait_for finishing..