[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] Longer time to detach device in q35
From: |
Han Han |
Subject: |
[Qemu-discuss] Longer time to detach device in q35 |
Date: |
Thu, 25 Apr 2019 12:27:38 +0800 |
Hello,
I find device detach in q35 is obviously slower than that in pc machine
type. I tried this experiment in libvirt-5.2.0 qemu-3.1.0:
1. Start a pc machine type machine named pc, and a q35 machine type machine
named q35(see the full libvirt xml in attachment). All the machines uses
the duplicated os images with kernel version 3.10.0-957.el7 and attaches a
second disk vdb
# ps aux|grep qemu
qemu 29574 4.2 3.7 2406084 302952 ? Sl Apr24 0:29
/usr/libexec/qemu-kvm -name guest=pc,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-14-pc/master-key.aes
-machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,dump-guest-core=off -m 1024
-realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
2c418d13-8489-4801-abff-1956614f585e -display none -no-user-config
-nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
-boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x8
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,addr=0x9 -device
pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,addr=0xa -device
pci-bridge,chassis_nr=4,id=pci.4,bus=pci.0,addr=0xb -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
file=/var/lib/libvirt/images/pc.qcow2,format=qcow2,if=none,id=drive-virtio-disk0
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive file=/tmp/pc,format=raw,if=none,id=drive-virtio-disk1 -device
virtio-blk-pci,scsi=off,bus=pci.4,addr=0x8,drive=drive-virtio-disk1,id=virtio-disk1
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 -sandbox
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
qemu 29652 4.6 3.7 2425124 298124 ? Sl Apr24 0:31
/usr/libexec/qemu-kvm -name guest=q35,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-15-q35/master-key.aes
-machine pc-q35-rhel8.0.0,accel=kvm,usb=off,dump-guest-core=off -m 1024
-realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid
f7ca7285-a53e-4104-8945-c42725010754 -display none -no-user-config
-nodefaults -chardev socket,id=charmonitor,fd=34,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
-boot strict=on -device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4
-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 -drive
file=/var/lib/libvirt/images/q35.qcow2,format=qcow2,if=none,id=drive-virtio-disk0
-device
virtio-blk-pci,scsi=off,bus=pci.2,addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive file=/tmp/q35,format=raw,if=none,id=drive-virtio-disk1 -device
virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk1,id=virtio-disk1
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -device
virtio-balloon-pci,id=balloon0,bus=pci.3,addr=0x0 -sandbox
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
2. After the two machine booted, detach the device. Get the time from
device_del command to the disk removed.
# ./detach.sh pc 'info block' virtio-disk1
Time from device_del to device removed: .064829105
# ./detach.sh q35 'info block' virtio-disk1
Time from device_del to device removed: 6.048993551
It takes obviously longer time to remove the disk in q35 machine.
I am curious about why there is this difference between pc and q35 machine.
And could we optimize it?
--
Best regards,
-----------------------------------
Han Han
Quality Engineer
Redhat.
Email: address@hidden
Phone: +861065339333
attach.tar.gz
Description: application/gzip
- [Qemu-discuss] Longer time to detach device in q35,
Han Han <=