low perforace of the disk on VM

Feb 16, 2022
5
0
1
30
Hello, I noticed that in Virtual Machines, the performance of reading and writing the disc is much lower than a container or in the node itself. Does anyone know why this occurs, and if there's a way to get better?

VM:
1645037481134.png

CT:
1645037517106.png
 
Hello Rogerio,

This happen because of virtualization.
While in Virtual Machines you are emulating the PCI bridge, driver controller and disk drive in containers this is not happening. A virtual machine runs his own kernel while in containers the hernel is shared with the host system.

There are different types of hardware emulation, there are some emulations which presents "real hardware" to the guest operative system and others presents hardware which is clearly emulated as virtio drivers.

Take a look to the documentation in order understand which VM setup is better for your system.
About disk and VMs
pve admin guide
pve wiki
About containers
pve admin guide
 
Try to use virtio SCSI if you are now using something else and see if the performance will be better. Caching options might also effect the performance.
 
Hello Rogerio,

This happen because of virtualization.
While in Virtual Machines you are emulating the PCI bridge, driver controller and disk drive in containers this is not happening. A virtual machine runs his own kernel while in containers the hernel is shared with the host system.

There are different types of hardware emulation, there are some emulations which presents "real hardware" to the guest operative system and others presents hardware which is clearly emulated as virtio drivers.

Take a look to the documentation in order understand which VM setup is better for your system.
About disk and VMs
pve admin guide
pve wiki
About containers
pve admin guide
thank you, I'll analyze