meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vm:proxmox:kvm:iothread [2021/12/30 07:39] – created niziakvm:proxmox:kvm:iothread [2021/12/30 07:51] (current) niziak
Line 1: Line 1:
 ====== IO thread ====== ====== IO thread ======
  
-Enabled ``IO thread`` option is ignored when controler is other than ''VirtIO SCSI Single''.+Enabled ''IO thread'' option is ignored when controler is other than ''VirtIO SCSI Single''.
  
 ===== KVM without iothread ===== ===== KVM without iothread =====
Line 21: Line 21:
 ===== KVM with iothread ===== ===== KVM with iothread =====
  
-  * ``virtio-scsi-single`` controller chosen which create separate SCSI controller for each drive +  * ''virtio-scsi-single'' controller chosen which create separate SCSI controller for each drive 
-  * I/O thread enabled on ``virtioscsi2`` +  * I/O thread enabled on ''virtioscsi2''
  
 <code bash> <code bash>
Line 40: Line 40:
  
 </code> </code>
 +
 +From KVM manual:
 +
 +''-object iothread,id=id,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink,aio-max-batch=aio-max-batch''
 +
 +  Creates  a dedicated event loop thread that devices can be assigned to. This is known as an IOThread. 
 +  
 +  By default device emulation happens in vCPU threads or the main event loop thread. This can become a scalability bottleneck. 
 +  IOThreads allow device emulation and I/O to run on other host CPUs.
 +
 +  The id parameter is a unique ID that will be used to reference this IOThread from -device ...,iothread=id.  
 +  Multiple devices can be assigned to an IOThread. Note that not    all  devices support an iothread parameter.
 +
 +  IOThreads use an adaptive polling algorithm to reduce event loop latency. 
 +  Instead of entering a blocking system call to monitor file descriptors and then pay the cost of
 +  being woken up when an event occurs, the polling algorithm spins waiting for events for a short time.
 +  The algorithm's default parameters are suitable for many cases  but  can  be  adjusted  
 +  based  on knowledge of the workload and/or host device latency.