Ricerca

Questo contenuto non è disponibile nella lingua selezionata.

7.4. Block I/O Tuning Techniques

download PDF
This section describes more techniques for tuning block I/O performance in virtualized environments.

7.4.1. Disk I/O Throttling

When several virtual machines are running simultaneously, they can interfere with system performance by using excessive disk I/O. Disk I/O throttling in KVM provides the ability to set a limit on disk I/O requests sent from virtual machines to the host machine. This can prevent a virtual machine from over-utilizing shared resources and impacting the performance of other virtual machines.
Disk I/O throttling can be useful in various situations, for example when guest virtual machines belonging to different customers are running on the same host, or when quality of service guarantees are given for different guests. Disk I/O throttling can also be used to simulate slower disks.
I/O throttling can be applied independently to each block device attached to a guest and supports limits on throughput and I/O operations. Use the virsh blkdeviotune command to set I/O limits for a virtual machine:
# virsh blkdeviotune virtual_machine device --parameter limit
Device specifies a unique target name (<target dev='name'/>) or source file (<source file='name'/>) for one of the disk devices attached to the virtual machine. Use the virsh domblklist command for a list of disk device names.
Optional parameters include:
total-bytes-sec
The total throughput limit in bytes per second.
read-bytes-sec
The read throughput limit in bytes per second.
write-bytes-sec
The write throughput limit in bytes per second.
total-iops-sec
The total I/O operations limit per second.
read-iops-sec
The read I/O operations limit per second.
write-iops-sec
The write I/O operations limit per second.
For example, to throttle vda on virtual_machine to 1000 I/O operations per second and 50 MB per second throughput, run this command:
# virsh blkdeviotune virtual_machine vda --total-iops-sec 1000 --total-bytes-sec 52428800

7.4.2. Multi-Queue virtio-scsi

Multi-queue virtio-scsi provides improved storage performance and scalability in the virtio-scsi driver. It enables each virtual CPU to have a separate queue and interrupt to use without affecting other vCPUs.

7.4.2.1. Configuring Multi-Queue virtio-scsi

Multi-queue virtio-scsi is disabled by default on Red Hat Enterprise Linux 7.
To enable multi-queue virtio-scsi support in the guest, add the following to the guest XML configuration, where N is the total number of vCPU queues:
   <controller type='scsi' index='0' model='virtio-scsi'>
   <driver queues='N' />
    </controller>
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.