Hello,

pretty much the $Subject.

We had reports of very bad performance with the default options when running:

$ time qemu-img convert -c -p -O qcow2 file.qcow2 file.disk
real    7m13.220s
user    6m56.682s
sys     0m13.038s

I studied this and noticed that for every coroutine a thread was created. But 
at no point ever were two coroutines making progress at the same time.
On the countrary, they constantly competed to run, leading to very slow task 
progress.

The workaround we found here was to just add "-m 1" to the command line, 
leading to a halving of the time taken for running the command:

$ time qemu-img convert -c --m 1 p -O qcow2 file.qcow2 file.disk
real    3m22.212s
user    3m13.744s
sys     0m7.881s

We repeated this test on a variety of hardware configurations, and the relative 
results are always the same.

Have you witnessed the same situation?

Should we change the default in qemu-img from 8 coroutines to 1, at least for 
the "-c" case?

In case I can submit a simple patch that does that, but looking forward for 
your thoughts.
It is possible that coroutines were added in an attempt to improve performance,
so maybe there is more here to fix, although in my view already fixing the 
existing bad default would already be a big improvement in the meantime.

Thoughts?

Thanks,

Claudio


Reply via email to