Increasing the SWIOTLB Buffer Space
cVMs communicate with peripherals through the SWIOTLB buffer, which defaults to 64 MB. When the I/O communication load is heavy, the SWIOTLB buffer space may be insufficient. Run the following command in the guest OS and if the error log "swiotlb buffer is full" is displayed, the buffer space can be determined insufficient.
dmesg | grep "swiotlb buffer is full"
If this problem exists, you can modify the swiotlb parameter of the guest OS to increase the SWIOTLB buffer space.
- If cVMs are started using the QEMU CLI, set the swiotlb parameter as follows:
-append "swiotlb=x,force"
- If cVMs are started using the libvirt XML file, set the swiotlb parameter as follows:
<cmdline>swiotlb=x,force</cmdline>
- The x value indicates the number of fragments in the SWIOTLB buffer. Each fragment is 2 KB and the SWIOTLB buffer is equal to x multiplied by 2 KB. The SWIOTLB buffer is 64 MB by default and has 32,768 fragments. You can increase the x value to increase the SWIOTLB buffer size (ensure that the buffer size is a multiple of 64 MB). For example, if x is 262144, the SWIOTLB buffer is 512 MB.
- The SWIOTLB buffer occupies non-secure memory. If the host OS receives the error log of "Out of memory: Killed process xxx (qemu-kvm)", the non-secure memory space is insufficient. As a result, the cVM exits.
- The SWIOTLB buffer occupies the secure memory space of a cVM. The minimum secure memory space of a cVM is 1 GB.
Parent topic: References