Adding and utilizing IO Threads

Can speed up virtual disk performance.

You’ll need to have the hwloc package installed.

To start, you can run lstopo in your terminal to view your CPU configuration. You’ll want to note your first core (Core L#0), which will then have two threads inside (PU L##, and PU L##). What we need, are the numbers in P##. In my system, the top value is 0, and the bottom value is 8. That means my iothread will target (0,8).

On a different system, such as a 6 core systems youll find that the top value is 0, and the bottom value is 6.

In this case, the io thread would be to (0,6).

To add this to the XML, you’ll need to add the following line above the <cputune></cputune> codeblock.

<iothreads>1</iothreads>

Then, within the CPU Tune codeblock, add the following

<cputune>
  ...
  <emulatorpin cpuset="#,#"/>
  <iothreadpin iothread="1" cpuset="#,#"/>
</cputune>

Of course, replace the values of (#,#) to what you derived from the earlier information.

Thanks for reading!


DarwinKVM Docs Version 2.0.0~prerelease
Copyright © 2024 RoyalGraphX. Distributed by a BSD 3-Clause License.
Last Modified: Sat, 7 Sep 2024 18:00:00 CDT