B
B
brar2021-06-22 15:08:23
Virtualization
brar, 2021-06-22 15:08:23

Disk performance degradation of older VMs in KVM. TRIM or what?

Host:
OS Archlinux. KVM, qemu.
NVMe M2 Samsung 970 PRO.
Virtualka on it Win10. Disk qcow2. VM disk prodsystem caching is disabled in VM settings (virt-manager).
After six months of use, I decided to drive the crystal drive with Mark. And I noticed that the indicators are much worse than they were immediately after the installation of the VM.
Installed a new clean VM (WIN-10-2) nearby, on the same physical disk. And crystaldismark showed much better results.
Trim in the Windows VM, as I understand it, is enabled:
fsutil behavior query DisableDeleteNotify

NTFS DisableDeleteNotify = 0  (Отключено)
ReFS DisableDeleteNotify = 0  (Отключено)

60d1d1f8ca3cc561566804.png
60d1d20f232b2280123333.png

What could be the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2021-06-22
@brar

Your dd on the host will only check for linear reads, especially for hdd drives, and you seem to be fine with that.
A possible reason for the drop in speed is qcow2 fragmentation, recreate (if there are snapshots, then you need to think if it’s possible) the container like this

qemu-img convert -p -O qcow2 source.img destination.img

There is also disk fragmentation inside the virtual machine itself, plus ntfs mfat is fragmented (if files are created in large volumes, edited and deleted), plus it grows without reduction, spread over the entire disk, this can generally be solved only by file-by-file copying to a new disk.

A
Artem @Jump, 2021-06-22
Tag curated by

Trim in the Windows VM, as I understand it, is enabled:
You understand correctly.
Here I have an iron turned on in my country house. But it doesn't heat up. Do you know why? There is no electricity at the cottage. There are wiring, sockets, switches, but no electricity.
Therefore, it is enabled, it does not mean that it works .
fsutil behavior query DisableDeleteNotify shows if TRIM is enabled.
If enabled, the file system will properly send TRIM commands.
But who said that this command will reach the drive?
If the drive is connected through the correct interface that supports TRIM - for example AHCI or NVMe, then there are usually no problems.
But if it is connected via an old IDE-type interface, or via a RAID controller, or if it is a virtual disk in general, then, of course, the TRIM command will not reach the disk.
Therefore, if you use virtualization - forget about TRIM and solve the problem in other ways!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question