Re: high cpu usage when replaying iolog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/22/24 15:15, Matthew Eaton wrote:
Using fio 3.36 and the latest fio from git I noticed high cpu usage
when replaying iolog:

fio --name=replay --ioengine=io_uring --direct=1 --iodepth=1
--read_iolog=test.iolog --replay_redirect=/dev/nvme0n1

cpu          : usr=50.27%, sys=33.79%, ctx=45686, majf=0, minf=11

When I revert this commit the cpu usage goes back to normal:

https://git.kernel.dk/cgit/fio/commit/?id=b85c01f7e9dfc468eb78faf86692433e6105178d

cpu          : usr=0.23%, sys=0.56%, ctx=219444, majf=0, minf=11

Is this a bug or expected?


It looks like the original code had the thread sleep for the specified delay whereas the new code repeatedly polls for completions until the specified delay has elapsed.

I suppose that it makes more sense to poll every once in a while instead of continually. Also we should not poll if we are using a sync ioengine.

This does seem like a bug to me. I would be happy to review a patch fixing this.

Vincent




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux