Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7134

'hv_vapic' flag not improve the guest performance sometimes

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • Moderate
    • rhel-virt-hwe
    • ssg_virtualization
    • 8
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:
      recently I am focusing on hyper-v testing .For win10-32(q35) guest , It may fail in auto with two following scenarios:

      1. After add flag 'hv_vapic', improvement not above 5%. (from the log it is 1%--4% sometimes)
      2. No improvement at all and the performance seems worse after add flag 'hv_vapic' .

      Version-Release number of selected component (if applicable):
      qemu-kvm-6.0.0-27.module+el8.5.0+12121+c40c8708.x86_64
      kernel-4.18.0-330.el8.x86_64
      seabios-bin-1.14.0-1.module+el8.4.0+8855+a9e237a9.noarch

      How reproducible:
      not 100%

      Steps to Reproduce:
      1. Boot the windows guest with all the flags

      MALLOC_PERTURB_=1 /usr/libexec/qemu-kvm \
      -S \
      -name 'avocado-vt-vm1' \
      -sandbox on \
      -machine q35,memory-backend=mem-machine_mem \
      -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
      -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \
      -nodefaults \
      -device VGA,bus=pcie.0,addr=0x2 \
      -m 14336 \
      -object memory-backend-ram,size=14336M,id=mem-machine_mem \
      -smp 24,maxcpus=24,cores=12,threads=1,dies=1,sockets=2 \
      -cpu 'Skylake-Server',hv_crash,hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,+kvm_pv_unhalt \
      -chardev socket,id=qmp_id_qmpmonitor1,wait=off,path=/tmp/avocado_xqla13n_/monitor-qmpmonitor1-20210816-232807-w8StSmYx,server=on \
      -mon chardev=qmp_id_qmpmonitor1,mode=control \
      -chardev socket,id=qmp_id_catch_monitor,wait=off,path=/tmp/avocado_xqla13n_/monitor-catch_monitor-20210816-232807-w8StSmYx,server=on \
      -mon chardev=qmp_id_catch_monitor,mode=control \
      -device pvpanic,ioport=0x505,id=idzWI6Vu \
      -chardev socket,id=chardev_serial0,wait=off,path=/tmp/avocado_xqla13n_/serial-serial0-20210816-232807-w8StSmYx,server=on \
      -device isa-serial,id=serial0,chardev=chardev_serial0 \
      -chardev socket,id=seabioslog_id_20210816-232807-w8StSmYx,path=/tmp/avocado_xqla13n_/seabios-20210816-232807-w8StSmYx,server=on,wait=off \
      -device isa-debugcon,chardev=seabioslog_id_20210816-232807-w8StSmYx,iobase=0x402 \
      -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
      -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
      -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
      -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
      -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
      -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/win10-32-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
      -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
      -device scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on \
      -blockdev node-name=file_disk1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/tmp/avocado_xqla13n_/tmpfs/data.raw,cache.direct=off,cache.no-flush=off \
      -blockdev node-name=drive_disk1,driver=raw,read-only=off,cache.direct=off,cache.no-flush=off,file=file_disk1 \
      -device ide-hd,id=disk1,drive=drive_disk1,write-cache=off,bus=ide.0,unit=0 \
      -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
      -device virtio-net-pci,mac=9a:92:d6:53:b5:57,id=idV8FDSJ,netdev=idYxrySV,bus=pcie-root-port-3,addr=0x0 \
      -netdev tap,id=idYxrySV,vhost=on,vhostfd=20,fd=16 \
      -blockdev node-name=file_cd1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
      -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
      -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on \
      -vnc :0 \
      -rtc base=localtime,clock=host,driftfix=slew \
      -boot menu=off,order=cdn,once=c,strict=off \
      -enable-kvm \
      -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5

      2. Partition hard drive, create an NTFS partition

      3. disable write caching on the hard drive in Windows or reformat the disk at the second time
      (device manager -> Disk drives -> Pick the second QEMU HARDDISK -> Policies)

      4. Install FIO (https://bsdio.com/fio/)

      5. send command
      "C:\Program Files\fio\fio\fio.exe" --name=fio-rand-RW --filename=fio-rand-RW --directory=E\:\ --rw=randwrite --bs=512B --direct=1 --numjobs=1 --time_based=1 --runtime=300 --size=1G --iodepth=1

      7. check the r/w result
      8. Reboot the guest without 'hv_vapic', let it calm down and run the same job
      9. Check the improvement of hv_vapic

      Actual results:
      Improvement not above 5% with hv_vapic

      Expected results:
      Improvement should above 5% with hv_vapic

      Additional info:
      Also hit this issue with win2019 and win2016 recently

              vkuznets@redhat.com Vitaly Kuznetsov
              rhn-support-menli Menghuan Li
              Vitaly Kuznetsov Vitaly Kuznetsov
              Peixiu Hou Peixiu Hou
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: