]> git.proxmox.com Git - pve-docs.git/blobdiff - qm.adoc
remove storage view
[pve-docs.git] / qm.adoc
diff --git a/qm.adoc b/qm.adoc
index 644ece5775444c2b668c8aa53109b24f5a3218e2..15ac2fc31dd438a7acf1eee93b01d7e775a4175d 100644 (file)
--- a/qm.adoc
+++ b/qm.adoc
@@ -79,13 +79,13 @@ paravirtualized virtio devices, which includes a paravirtualized generic disk
 controller, a paravirtualized network card, a paravirtualized serial port,
 a paravirtualized SCSI controller, etc ...
 
-It is highly recommended to use the virtio devices whenever you can, as they
-provide a big performance improvement. Using  the virtio generic disk controller
-versus an emulated IDE controller will double the sequential write throughput,
-as measured with `bonnie++(8)`. Using the virtio network interface can deliver
-up to three times the throughput of an emulated Intel E1000 network card, as
-measured with `iperf(1)`. footnote:[See this benchmark on the KVM wiki
-https://www.linux-kvm.org/page/Using_VirtIO_NIC]
+TIP: It is *highly recommended* to use the virtio devices whenever you can, as
+they provide a big performance improvement and are generally better maintained.
+Using the virtio generic disk controller versus an emulated IDE controller will
+double the sequential write throughput, as measured with `bonnie++(8)`. Using
+the virtio network interface can deliver up to three times the throughput of an
+emulated Intel E1000 network card, as measured with `iperf(1)`. footnote:[See
+this benchmark on the KVM wiki https://www.linux-kvm.org/page/Using_VirtIO_NIC]
 
 
 [[qm_virtual_machines_settings]]
@@ -155,6 +155,9 @@ Bus/Controller
 ^^^^^^^^^^^^^^
 QEMU can emulate a number of storage controllers:
 
+TIP: It is highly recommended to use the *VirtIO SCSI* or *VirtIO Block*
+controller for performance reasons and because they are better maintained.
+
 * the *IDE* controller, has a design which goes back to the 1984 PC/AT disk
 controller. Even if this controller has been superseded by recent designs,
 each and every OS you can think of has support for it, making it a great choice
@@ -169,16 +172,15 @@ connected. You can connect up to 6 devices on this controller.
 hardware, and can connect up to 14 storage devices. {pve} emulates by default a
 LSI 53C895A controller.
 +
-A SCSI controller of type _VirtIO SCSI_ is the recommended setting if you aim for
-performance and is automatically selected for newly created Linux VMs since
-{pve} 4.3. Linux distributions have support for this controller since 2012, and
-FreeBSD since 2014. For Windows OSes, you need to provide an extra iso
-containing the drivers during the installation.
+A SCSI controller of type _VirtIO SCSI single_ and enabling the
+xref:qm_hard_disk_iothread[IO Thread] setting for the attached disks is
+recommended if you aim for performance. This is the default for newly created
+Linux VMs since {pve} 7.3. Each disk will have its own _VirtIO SCSI_ controller,
+and QEMU will handle the disks IO in a dedicated thread. Linux distributions
+have support for this controller since 2012, and FreeBSD since 2014. For Windows
+OSes, you need to provide an extra ISO containing the drivers during the
+installation.
 // https://pve.proxmox.com/wiki/Paravirtualized_Block_Drivers_for_Windows#During_windows_installation.
-If you aim at maximum performance, you can select a SCSI controller of type
-_VirtIO SCSI single_ which will allow you to select the *IO Thread* option.
-When selecting _VirtIO SCSI single_ QEMU will create a new controller for
-each disk, instead of adding all disks to the same controller.
 
 * The *VirtIO Block* controller, often just called VirtIO or virtio-blk,
 is an older type of paravirtualized controller. It has been superseded by the
@@ -249,13 +251,14 @@ Note that *SSD emulation* is not supported on *VirtIO Block* drives.
 [[qm_hard_disk_iothread]]
 IO Thread
 ^^^^^^^^^
-The option *IO Thread* can only be used when using a disk with the
-*VirtIO* controller, or with the *SCSI* controller, when the emulated controller
- type is  *VirtIO SCSI single*.
-With this enabled, QEMU creates one I/O thread per storage controller,
-rather than a single thread for all I/O. This can increase performance when
-multiple disks are used and each disk has its own storage controller.
-
+The option *IO Thread* can only be used when using a disk with the *VirtIO*
+controller, or with the *SCSI* controller, when the emulated controller type is
+*VirtIO SCSI single*. With *IO Thread* enabled, QEMU creates one I/O thread per
+storage controller rather than handling all I/O in the main event loop or vCPU
+threads. One benefit is better work distribution and utilization of the
+underlying storage. Another benefit is reduced latency (hangs) in the guest for
+very I/O-intensive host workloads, since neither the main thread nor a vCPU
+thread can be blocked by disk I/O.
 
 [[qm_cpu]]
 CPU
@@ -764,7 +767,7 @@ open-source, x86 BIOS implementation. SeaBIOS is a good choice for most
 standard setups.
 
 Some operating systems (such as Windows 11) may require use of an UEFI
-compatible implementation instead. In such cases, you must rather use *OVMF*,
+compatible implementation. In such cases, you must use *OVMF* instead,
 which is an open-source UEFI implementation. footnote:[See the OVMF Project https://github.com/tianocore/tianocore.github.io/wiki/OVMF]
 
 There are other scenarios in which the SeaBIOS may not be the ideal firmware to
@@ -1044,6 +1047,7 @@ For Windows, it can be installed from the
 https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso[Fedora
 VirtIO driver ISO].
 
+[[qm_qga_enable]]
 Enable Guest Agent Communication
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -1051,6 +1055,10 @@ Communication from {pve} with the guest agent can be enabled in the VM's
 *Options* panel. A fresh start of the VM is necessary for the changes to take
 effect.
 
+[[qm_qga_auto_trim]]
+Automatic TRIM Using QGA
+^^^^^^^^^^^^^^^^^^^^^^^^
+
 It is possible to enable the 'Run guest-trim' option. With this enabled,
 {pve} will issue a trim command to the guest after the following
 operations that have the potential to write out zeros to the storage:
@@ -1060,6 +1068,35 @@ operations that have the potential to write out zeros to the storage:
 
 On a thin provisioned storage, this can help to free up unused space.
 
+NOTE: There is a caveat with ext4 on Linux, because it uses an in-memory
+optimization to avoid issuing duplicate TRIM requests. Since the guest doesn't
+know about the change in the underlying storage, only the first guest-trim will
+run as expected. Subsequent ones, until the next reboot, will only consider
+parts of the filesystem that changed since then.
+
+[[qm_qga_fsfreeze]]
+Filesystem Freeze & Thaw on Backup
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+By default, guest filesystems are synced via the 'fs-freeze' QEMU Guest Agent
+Command when a backup is performed, to provide consistency.
+
+On Windows guests, some applications might handle consistent backups themselves
+by hooking into the Windows VSS (Volume Shadow Copy Service) layer, a
+'fs-freeze' then might interfere with that. For example, it has been observed
+that calling 'fs-freeze' with some SQL Servers triggers VSS to call the SQL
+Writer VSS module in a mode that breaks the SQL Server backup chain for
+differential backups.
+
+For such setups you can configure {pve} to not issue a freeze-and-thaw cycle on
+backup by setting the `freeze-fs-on-backup` QGA option to `0`. This can also be
+done via the GUI with the 'Freeze/thaw guest filesystems on backup for
+consistency' option.
+
+IMPORTANT: Disabling this option can potentially lead to backups with inconsistent
+filesystems and should therefore only be disabled if you know what you are
+doing.
+
 Troubleshooting
 ^^^^^^^^^^^^^^^