kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 199727] CPU freezes in KVM guests during high IO load on host
Date: Sat, 12 Feb 2022 10:26:39 +0000	[thread overview]
Message-ID: <bug-199727-28872-5PPusjrYyW@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-199727-28872@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=199727

--- Comment #9 from Roland Kletzing (devzero@web.de) ---
https://qemu-devel.nongnu.narkive.com/I59Sm5TH/lock-contention-in-qemu
<snip>
I find the timeslice of vCPU thread in QEMU/KVM is unstable when there
are lots of read requests (for example, read 4KB each time (8GB in
total) from one file) from Guest OS. I also find that this phenomenon
may be caused by lock contention in QEMU layer. I find this problem
under following workload.
<snip>
Yes, there is a way to reduce jitter caused by the QEMU global mutex:

qemu -object iothread,id=iothread0 \
-drive if=none,id=drive0,file=test.img,format=raw,cache=none \
-device virtio-blk-pci,iothread=iothread0,drive=drive0

Now the ioeventfd and thread pool completions will be processed in
iothread0 instead of the QEMU main loop thread. This thread does not
take the QEMU global mutex so vcpu execution is not hindered.

This feature is called virtio-blk dataplane.
<snip>


i tried "virtio scsi single" with "aio=threads" and "iothread=1" in proxmox,
and after that, even with totally heavy read/write io inside 2 VMs (located on
the same spinning hdd on top of zfs lz4 + zstd dataset and qcow) and severe
write starvation (some ioping  >>30s), even while live migrating both vm disks
in parallel to another zfs dataset on the same hdd, i get absolutely NO jitter
in ping anymore. ping to both VMs is constantly at <0.2ms 

from the kvm pid:
-object iothread,id=iothread-virtioscsi0  
-device
virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0 
-drive
file=/hddpool/vms-files-lz4/images/116/vm-116-disk-3.qcow2,if=none,id=drive-scsi0,cache=writeback,aio=threads,format=qcow2,detect-zeroes=on 
-device
scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2022-02-12 10:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-199727-28872@https.bugzilla.kernel.org/>
2021-08-20 17:25 ` [Bug 199727] CPU freezes in KVM guests during high IO load on host bugzilla-daemon
2021-08-21  8:53 ` bugzilla-daemon
2021-08-22 12:11 ` bugzilla-daemon
2021-08-29 14:58 ` bugzilla-daemon
2022-01-13 12:09 ` bugzilla-daemon
2022-02-10 13:22 ` bugzilla-daemon
2022-02-12  0:13 ` bugzilla-daemon
2022-02-12 10:26 ` bugzilla-daemon [this message]
2022-02-24 18:58 ` bugzilla-daemon
2022-02-25  9:49 ` bugzilla-daemon
2022-03-02 13:33 ` bugzilla-daemon
2022-03-07 19:01 ` bugzilla-daemon
2022-03-08  6:20 ` bugzilla-daemon
2022-03-08  8:01 ` bugzilla-daemon
2022-03-08  8:26 ` bugzilla-daemon
2022-03-26 15:17 ` bugzilla-daemon
2022-04-06 23:25 ` bugzilla-daemon
2022-04-06 23:52 ` bugzilla-daemon
2022-11-29 10:03 ` bugzilla-daemon
2024-02-01 13:15 ` bugzilla-daemon
2024-02-01 13:25 ` bugzilla-daemon
2024-02-01 13:46 ` bugzilla-daemon
2024-02-01 13:51 ` bugzilla-daemon
2024-02-01 19:56 ` bugzilla-daemon
2024-08-25  7:29 ` bugzilla-daemon
2024-08-25  7:29 ` bugzilla-daemon
2024-08-25  7:29 ` bugzilla-daemon
2025-05-09  7:10 ` bugzilla-daemon
2025-05-09  8:48 ` bugzilla-daemon
2025-05-09  9:23 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-199727-28872-5PPusjrYyW@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).