On Thu, Dec 22, 2016 at 4:30 AM, Daniel P. Berrange <berrange(a)redhat.com> wrote:
On Thu, Dec 22, 2016 at 01:34:47AM -0500, Weiwei Jia wrote:
> Hi,
>
> With QEMU x-data-plane, I find the performance has not been improved
> very much. Please see following two settings.
>
> Setting 1: I/O thread in host OS (VMM) reads 4KB each time from disk
> (8GB in total). Pin the I/O thread to pCPU 5 which will serve I/O
> thread dedicatedly. I find the performance is around 250 MB/s.
>
> Setting 2: I/O thread in guest OS (VMM) reads 4KB each time from
> virtual disk (8GB in total). Pin the I/O thread to vCPU 5 and pin vCPU
> 5 thread to pCPU5 so that vCPU 5 handles this I/O thread dedicatedly
> and pCPU5 serve vCPU5 dedicatedly. In order to keep vCPU5 not to be
> idle, I also pin one cpu intensive thread (while (1) {i++}) on vCPU 5
> so that the I/O thread on it can be served without delay. For this
> setting, I find the performance for this I/O thread is around 190
> MB/s.
>
> NOTE: For setting 2, I also pin the QEMU dedicated IOthread
> (x-data-plane) in host OS to pCPU to handle I/O requests from guest OS
> dedicatedly.
>
> I think for setting 2, the performance of I/O thread should be almost
> the same as setting 1. I cannot understand why it is 60 MB/s lower
> than setting 1. I am wondering whether there are something wrong with
> my x-data-plane setting or virtio setting for VM. Would you please
> give me some hints? Thank you.
The x-data-plane option is obsolete and should not be used. You should
use the modern iothread option instead, which is explicitly supported
by libvirt XML.
http://libvirt.org/formatdomain.html#elementsIOThreadsAllocation
Thanks for your reply. However, I think this is not the main points of
my question. Let me see whether Stefan has some comments. Thank you.
Best,
Weiwei Jia