Trim inside VM caused IO delay on host

F_M

Active Member
Nov 2, 2014
5
0
41
Hello,
I recently facing an issue when VMs (Windows or Debian) is running TRIM, this cause very IO delay on the host with some freeze.
Trim running on the host on root filesystem is working well, and if I disasble "discard" option on VM disk everything return to normal.

I didn't find any topic about that and I'm not sure if it's a proxmox issue or maybe hardware issue. I suppose it's a software issue because Trim is working fine on host itself.

Do you have an idea on how to fix this issue ?
It's OK to disable "discard" option but is there a way to trim a VM disk from host on LVM-thin? This option would be better because I prefer to run trim weekly than automatically.

My setup :
- Proxmox 6.2
- LVM-THIN
- Physical disk : Seagate Firecuda 520 NVMe

Kind Regads,
Fabrice.
 
Hi,

if you disable "discard" the discard commands from the trim application will not reach the disk.
I guess the problem is that the disk is to slow for the workload.
It is not possible to trim an lv from the host without mounting it.
Trim or discarding blocks is a high workload for disks so a high io delay is expected.
Also, the firecuda 520 is a consumer NVMe and consumer SSD/NVMe is not good in sync workloads.
 
Hi,
Thank you for your answer.
Trim on proxmox host is near to 10% iodelay. I expected more or less the same value when trim occur inside VM but it's worse, 20-30% with windows VM and 10-20% with linux VM.
I supposed I have no choice to keep discard enable and play with VM config to schedule trim at low workload hours ? Because if I disable it this will kill SSD performance on long term.

Another question, I did not found the answer, if I delete a disk on lvm-thin do proxmox will be able trim the space of this deleted disk ? If not, how can I trim it because disk is delete and so VM OS.
 
If you have a default Proxmox created LVThin the zero flag is enabled.
Code:
lvs -o+zero <Pool>
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!