Async io use io_submit calls. aio=native is used for async io. To get number of io requests for each io_submit from KVM VM,
here you go. My seq write 4k run on SSD. While capturing IOPS, make sure to trace io_submit perf events using below.
sys_enter_io_submit, sys_exit_io_submit are mandatory. Essentially each io_submit call followed by *_io_getevents
which are irrelevant to present topic.-e syscalls:sys_enter_io_submit -e syscalls:sys_exit_io_submit -e syscalls:sys_enter_io_getevents -e syscalls:sys_exit_io_getevents
Get Iops for this run.
Get Number of io_submits from captured perf.data. Number of enter_io_submits are fine. Ofcourse same number of exits will be there[root@perf io-submit-write-4k]# perf script | grep io_submit | grep enter | wc -l 493370 [root@perf io-submit-write-4k]#Get timestamp of io_submit events. (first and last)First: qemu-kvm 3693  1914.589390: syscalls:sys_enter_io_submit: ctx_id: 0x7f3f18a61000, nr: 0x000000d1, iocbpp: 697 io_submit (/usr/lib64/libaio.so.1.0.1) 8 [unknown] ([unknown]) 0 [unknown] ([unknown]) Last: qemu-kvm 3693  1949.737723: syscalls:sys_enter_io_submit: ctx_id: 0x7f3f18a61000, nr: 0x000000d1, iocbpp: 0x7ffd4e50b7b0 697 io_submit (/usr/lib64/libaio.so.1.0.1) 7f3f1c6c9250 [unknown] ([unknown]) 0 [unknown] ([unknown]) Number of submits per sec.Time stamp diff: 1949.737723- 1914.589390 = 35.15 Number of submits: 493370 Submits/sec = 493370/35.15 = 14036.13086771IOPS metric is requests/second. We got submits per second. Number of requests per submitrequets/submission = (requests/sec) / (submits/sec) = 76971.9 / 14036.130= 5.483840631
So for my 4k write run number of requests per each submit are 5.48