[Libguestfs] a question about multithreading with libguestfs

Richard W.M. Jones rjones at redhat.com
Wed Oct 18 09:02:38 UTC 2017


On Wed, Oct 18, 2017 at 09:16:38AM +0300, Maxim Kozover wrote:
> Hi Richard,
> Can you tell, please, if the daemon at the appliance side is multithreaded
> as well and is able to execute several simultaneous reads, for example? If
> yes, how many threads it uses? Or every request starts its own thread?

It's single threaded.  That's why we have a lock on the library side.

We did have a look at making the daemon multithreaded, but it requires
us to stop using virtio-serial and use something else instead (there's
some alternate thing which I've forgotten the name of, but it doesn't
quite work for our use case because it uses global addresses for
ports).  IOW, it's complicated.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list