[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API |
Date: |
Fri, 13 Jul 2012 10:47:23 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jul 13, 2012 at 10:16:40AM +0100, Daniel P. Berrange wrote:
> On Fri, Jul 13, 2012 at 10:12:47AM +0100, Stefan Hajnoczi wrote:
> > On Tue, Jul 10, 2012 at 09:18:01AM +0200, Paolo Bonzini wrote:
> > > Il 10/07/2012 07:37, Wenchao Xia ha scritto:
> > > >>
> > > >> For getting the other metadata about the disk image you mention,
> > > >> another
> > > >> possibility to is just make 'qemu-img info' return the data in a
> > > >> machine
> > > >> parseable format, ie JSON& make a client API for extracting data from
> > > >> this JSON document.
> > > >>
> > > > Thank u for the idea. The .so is introduced to let program access the
> > > > image more directly, parsing string is not so fast and it depends on
> > > > another program's stdout output, I hope to get a faster way.
> > >
> > > I doubt you actually have profiled it.
> >
> > I think speed is not the issue, instead it's just providing an API that
> > external programs can use. Management tools, backup software, custom
> > administration tools, etc. It's convenient to have an API.
>
> Actually I think speed could well be quite relevant. In large deployments
> it would not be surpising to see 1000's of images in a directory. If you
> want to be able to query metadata about all of them at once, then being
> able to open()+read(4k)+close() 1000 times is going to be dramatically
> faster than doing fork()+execve(qemu-img) 1000 times.
Yes, that's true. For situations like querying a whole repository of
image files speed matters.
I still think that we should focus on the API first. Whether the .so
forks qemu-nbd/qemu-img or includes the actual block layer code only
matters once we are satisfied that this library is useful and works.
And for applications that use qemu-img today there won't be a speed
decrease, at least.
Stefan
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, (continued)
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Michael Tokarev, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Blue Swirl, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Weil, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, LluĂs Vilanova, 2012/07/13
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/09
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Christoph Hellwig, 2012/07/09
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/10
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Christoph Hellwig, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Christoph Hellwig, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/13
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/16