LVM disk latency issue

PatrickD25

New Member
May 13, 2024
1
0
1
Context : We want to run MySQL databases on Proxmox (kvm).
Problem : MySQL is quite slow on kvm. Compared to native speeds or Xen speeds, it is up to 5x the latency.
Setup : 3-node Proxmox cluster. On 1 node, we add a dedicated SSD disk for Mysql, and use LVM to mount it in the VM.

VM disk info :
scsi3: vm-data-lvm:vm-104-disk-2,iothread=1,size=150G
scsihw: virtio-scsi-single
cache: no-cache
Thick provisioning.

Tool used to test :
ioping -S64M -L -s4k -W -c 10 .
Latency Results in VM on XFS : (ext4 is about 200us higher average)
min/avg/max/mdev = 562.4 us / 663.2 us / 742.1 us / 51.1 us

Same LV, mounted on the host :
min/avg/max/mdev = 120.5 us / 149.5 us / 183.3 us / 20.9 us

Tests in a Xen VM is about as fast as native speeds.

I was expecting something like 5% to 10% slower/higher latency, but this is a bit extreme

For info : We tested a LOT of settings. XFS/EXT4, cache settings, but could not get close to native speeds.
We also tested with sysbench using oltp_write_only and the results were similar.

Is this something we should expect from kvm ?
Anyone seeing better results ?

I guess not knowing if this is normal or not is a big issue here. Any help would be greatly appreciated !
 

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!