0

I run a docker container in my server, and then I run qemu in this container. Firstly, I don't open the option enable-kvm in qemu, and the fio runtime option works. I set runtime=30 and the fio test last at most 30s. But when I open the option enable-kvm, the fio option runtime=30 doesn't work. The fio process runs just a few seconds and then finished.

note that I don't use fio option size, so I think it should run 30s to finished.

How to fix this problem? Or if there other methods to make fio running 30s before it finish?

I just change the runtime option to runtime=30s and it doesn't work either. the full command I use is

fio --filename=/dev/nullb0 --iodepth=64 --ioengine=psync --direct=1 --rw=randread --bs=$1k --numjobs=$2 --runtime=30s --group_reporting --name=test-rand-read --output=test_c_randwrite.log

My docker image is ubuntu22, and the qemu's kernel is Rust for Linux My qemu command is

qemu-system-x86_64 \
    -nographic --enable-kvm\
    -smp 4 -m 4096 \
    -kernel arch/x86_64/boot/bzImage \
    -append "console=ttyS0 root=/dev/sda rootfstype=ext4 rw" \
    -hda /data/bupt-rtos/x86_ramdisk/ubuntu-rootfs.img \
    -nic tap,id=net0,ifname=tap0,script=no,downscript=no\
    -object "filter-dump,id=net0,netdev=net0,file=dump.dat" 

If you need more information, please tell me.

杨叶轩
  • 1
  • 1

1 Answers1

0

It seems that use the option --time_based=1 can figure this problem. This works for me.

杨叶轩
  • 1
  • 1