qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1847861] [NEW] Guest stuttering under high disk IO (virtio)
@ 2019-10-12 14:25 Emanuele Faranda
  2019-10-12 14:35 ` [Bug 1847861] " Emanuele Faranda
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Emanuele Faranda @ 2019-10-12 14:25 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Performing io intensive tasks on virtualized Windows causes the system
to visually stutter. I can often reproduce the problem by running fio on
windows:

fio --randrepeat=1 --ioengine=windowsaio --direct=1 --gtod_reduce=1
--name=test --filename=\\.\PhysicalDrive0 --bs=4k --iodepth=128
--size=4G --readwrite=randread

While the fio command is running, moving the mouse pointer will be be
laggy. The stuttering does not appear with iodepth <= 32 . The
stuttering also manifests while playing games, the music and video
pauses for a fraction of second in a playable but disturbing way.

Here are my system specs:

Host OS: archlinux
Guest OS: Windows 10 Enterprise
qemu version: qemu-git 8:v4.1.0.r1378.g98b2e3c9ab-1 (from AUR, compiled with -march=native)
CPU: AMD Ryzen Threadripper 1900X 8-Core Processor
Huge Pages: vm.nr_hugepages=4128
Disk: nvme type=raw, io=threads bus=virtio
GPU (passthrough): Radeon RX 570

Here are some fio test results on my windows guest:

[size=512M,iodepth=1 -> min=30k,avg=31k,stddev=508]
[size=2G,iodepth=8 -> min=203k,avg=207k,stddev=2.3k]
[size=2G,iodepth=16 -> min=320k,avg=330k,stddev=4.3k]
[size=4G,iodepth=32 -> min=300k,avg=310k,stddev=4.8k]
[size=4G,iodepth=64 -> min=278k,avg=366k,stddev=68.6k] -> STUTTER
[size=4G,iodepth=64 -> min=358k,avg=428k,stddev=52.6k] -> STUTTER
[size=4G,iodepth=128 -> min=92k,avg=217k,stddev=185k] -> STUTTER
[size=4G,iodepth=128 -> min=241k,avg=257k,stddev=14k] -> same config as above, but no stuttering

The min and avg values are the bandwidth values reported in KB/s by fio.
You can see that, when the stuttering occurs, the stardard deviation is
high and the minimum bandwidth is way below the average.

Additional note: the bandwidth reported with `fio` on my linux host is
about 2x the one reported in the guest:

sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1
--name=test --filename=/dev/nvme0n1 --bs=4k --iodepth=64 --size=512M
--readwrite=randread

read: IOPS=279k, BW=1092MiB/s (1145MB/s)(512MiB/469msec)

** Affects: qemu
     Importance: Undecided
         Status: New

** Description changed:

  Performing io intensive tasks on virtualized Windows causes the system
  to visually stutter. I can often reproduce the problem by running fio on
  windows:
  
  fio --randrepeat=1 --ioengine=windowsaio --direct=1 --gtod_reduce=1
  --name=test --filename=\\.\PhysicalDrive0 --bs=4k --iodepth=128
  --size=4G --readwrite=randread
  
  While the fio command is running, moving the mouse pointer will be be
  laggy. The stuttering does not appear with iodepth <= 32 . The
  stuttering also manifests while playing games, the music and video
  pauses for a fraction of second in a playable but disturbing way.
  
  Here are my system specs:
  
  Host OS: archlinux
  Guest OS: Windows 10 Enterprise
  qemu version: qemu-git 8:v4.1.0.r1378.g98b2e3c9ab-1 (from AUR, compiled with -march=native)
  CPU: AMD Ryzen Threadripper 1900X 8-Core Processor
  Huge Pages: vm.nr_hugepages=4128
  Disk: nvme type=raw, io=threads bus=virtio
  GPU (passthrough): Radeon RX 570
  
  Here are some fio test results on my windows guest:
  
  [size=512M,iodepth=1 -> min=30k,avg=31k,stddev=508]
  [size=2G,iodepth=8 -> min=203k,avg=207k,stddev=2.3k]
  [size=2G,iodepth=16 -> min=320k,avg=330k,stddev=4.3k]
  [size=4G,iodepth=32 -> min=300k,avg=310k,stddev=4.8k]
  [size=4G,iodepth=64 -> min=278k,avg=366k,stddev=68.6k] -> STUTTER
  [size=4G,iodepth=64 -> min=358k,avg=428k,stddev=52.6k] -> STUTTER
  [size=4G,iodepth=128 -> min=92k,avg=217k,stddev=185k] -> STUTTER
  [size=4G,iodepth=128 -> min=241k,avg=257k,stddev=14k] -> same config as above, but no stuttering
  
  The min and avg values are the bandwidth values reported in KB/s by fio.
  You can see that, when the stuttering occurs, the stardard deviation is
  high and the minimum bandwidth is way below the average.
+ 
+ Additional note: the bandwidth reported with `fio` on my linux host is
+ about 2x the one reported in the guest:
+ 
+ sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1
+ --name=test --filename=/dev/nvme0n1 --bs=4k --iodepth=64 --size=512M
+ --readwrite=randread
+ 
+ read: IOPS=279k, BW=1092MiB/s (1145MB/s)(512MiB/469msec)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1847861

Title:
  Guest stuttering under high disk IO (virtio)

Status in QEMU:
  New

Bug description:
  Performing io intensive tasks on virtualized Windows causes the system
  to visually stutter. I can often reproduce the problem by running fio
  on windows:

  fio --randrepeat=1 --ioengine=windowsaio --direct=1 --gtod_reduce=1
  --name=test --filename=\\.\PhysicalDrive0 --bs=4k --iodepth=128
  --size=4G --readwrite=randread

  While the fio command is running, moving the mouse pointer will be be
  laggy. The stuttering does not appear with iodepth <= 32 . The
  stuttering also manifests while playing games, the music and video
  pauses for a fraction of second in a playable but disturbing way.

  Here are my system specs:

  Host OS: archlinux
  Guest OS: Windows 10 Enterprise
  qemu version: qemu-git 8:v4.1.0.r1378.g98b2e3c9ab-1 (from AUR, compiled with -march=native)
  CPU: AMD Ryzen Threadripper 1900X 8-Core Processor
  Huge Pages: vm.nr_hugepages=4128
  Disk: nvme type=raw, io=threads bus=virtio
  GPU (passthrough): Radeon RX 570

  Here are some fio test results on my windows guest:

  [size=512M,iodepth=1 -> min=30k,avg=31k,stddev=508]
  [size=2G,iodepth=8 -> min=203k,avg=207k,stddev=2.3k]
  [size=2G,iodepth=16 -> min=320k,avg=330k,stddev=4.3k]
  [size=4G,iodepth=32 -> min=300k,avg=310k,stddev=4.8k]
  [size=4G,iodepth=64 -> min=278k,avg=366k,stddev=68.6k] -> STUTTER
  [size=4G,iodepth=64 -> min=358k,avg=428k,stddev=52.6k] -> STUTTER
  [size=4G,iodepth=128 -> min=92k,avg=217k,stddev=185k] -> STUTTER
  [size=4G,iodepth=128 -> min=241k,avg=257k,stddev=14k] -> same config as above, but no stuttering

  The min and avg values are the bandwidth values reported in KB/s by
  fio. You can see that, when the stuttering occurs, the stardard
  deviation is high and the minimum bandwidth is way below the average.

  Additional note: the bandwidth reported with `fio` on my linux host is
  about 2x the one reported in the guest:

  sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1
  --name=test --filename=/dev/nvme0n1 --bs=4k --iodepth=64 --size=512M
  --readwrite=randread

  read: IOPS=279k, BW=1092MiB/s (1145MB/s)(512MiB/469msec)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1847861/+subscriptions


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-22  5:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-12 14:25 [Bug 1847861] [NEW] Guest stuttering under high disk IO (virtio) Emanuele Faranda
2019-10-12 14:35 ` [Bug 1847861] " Emanuele Faranda
2019-10-12 14:44 ` Emanuele Faranda
2021-04-22  7:42 ` Thomas Huth
2021-06-22  4:18 ` Launchpad Bug Tracker

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).