Skip to main content
The 2024 Developer Survey results are live! See the results
Became Hot Network Question
added 143 characters in body
Source Link
Kusalananda
  • 339.3k
  • 37
  • 684
  • 992

I'm setting up a Linux system in KVM (QEMU) to test the effect of adding a writeback LVM cache on a fast disk in front of a logical volume that resides on a set of very slow disks (a RAID1 LV). This is modelled on an actual physical configuration that I don't want to touch until I know how it may possibly handle with the cache added.

The issue is that in KVM, all disks perform at the same speed, so the cache is rarely utilized, and I don't see any performance benefits. Ideally, I want the RAID1 mirror to struggle with I/O, allowing me to observe the cache volume filling up during writes and gradually writing back to the mirror set.

Is there a way to artificially throttle the speed of a disk in KVM/QEMU?

I'm currently using Debian 12 as the host for this experiment, with the KVM machine running Alpine Linux (and also testing with Debian 12). The KVM setup includes one main qcow2 image (the fast disk) and additional qcow2 images (the slow RAID mirror).

I'm setting up a Linux system in KVM (QEMU) to test the effect of adding a writeback LVM cache on a fast disk in front of a logical volume that resides on a set of very slow disks (a RAID1 LV).

The issue is that in KVM, all disks perform at the same speed, so the cache is rarely utilized, and I don't see any performance benefits. Ideally, I want the RAID1 mirror to struggle with I/O, allowing me to observe the cache volume filling up during writes and gradually writing back to the mirror set.

Is there a way to artificially throttle the speed of a disk in KVM/QEMU?

I'm currently using Debian 12 as the host for this experiment, with the KVM machine running Alpine Linux (and also testing with Debian 12). The KVM setup includes one main qcow2 image (the fast disk) and additional qcow2 images (the slow RAID mirror).

I'm setting up a Linux system in KVM (QEMU) to test the effect of adding a writeback LVM cache on a fast disk in front of a logical volume that resides on a set of very slow disks (a RAID1 LV). This is modelled on an actual physical configuration that I don't want to touch until I know how it may possibly handle with the cache added.

The issue is that in KVM, all disks perform at the same speed, so the cache is rarely utilized, and I don't see any performance benefits. Ideally, I want the RAID1 mirror to struggle with I/O, allowing me to observe the cache volume filling up during writes and gradually writing back to the mirror set.

Is there a way to artificially throttle the speed of a disk in KVM/QEMU?

I'm currently using Debian 12 as the host for this experiment, with the KVM machine running Alpine Linux (and also testing with Debian 12). The KVM setup includes one main qcow2 image (the fast disk) and additional qcow2 images (the slow RAID mirror).

Source Link
Kusalananda
  • 339.3k
  • 37
  • 684
  • 992

Simulate slow disks in KVM to see effect of LVM cache in test setup

I'm setting up a Linux system in KVM (QEMU) to test the effect of adding a writeback LVM cache on a fast disk in front of a logical volume that resides on a set of very slow disks (a RAID1 LV).

The issue is that in KVM, all disks perform at the same speed, so the cache is rarely utilized, and I don't see any performance benefits. Ideally, I want the RAID1 mirror to struggle with I/O, allowing me to observe the cache volume filling up during writes and gradually writing back to the mirror set.

Is there a way to artificially throttle the speed of a disk in KVM/QEMU?

I'm currently using Debian 12 as the host for this experiment, with the KVM machine running Alpine Linux (and also testing with Debian 12). The KVM setup includes one main qcow2 image (the fast disk) and additional qcow2 images (the slow RAID mirror).