WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pthread_mutex_lock() and Xenstored

To: "Bastian Blank" <bastian@xxxxxxxxxxxx>, "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] pthread_mutex_lock() and Xenstored
From: "Peter Teoh" <htmldeveloper@xxxxxxxxx>
Date: Sun, 16 Sep 2007 00:51:54 +0800
Cc: Vincent Hanquez <vincent@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 15 Sep 2007 09:52:35 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=1d6Ui7si5y6KQ8LD2wvyTmVzNnd5XUL9rxUFjvntsVk=; b=j1Fo4/I0dWPxE20O3agifXl5Zrqc1Nvpx4yVsP3koR4Scs3Fv7SPt70Qt3HLGuEkaodlIpvpntW955On02G2dlZN05iwC18xs6WafaRrR0VETUT+ynfk/l96m3Nqu/kRBAndg9mI8wvMjB5APkqkNmuUop0RvIttbenJBWkkUs8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=thYPQ86ItyWCwk0qfPSDWP3FkMoyMBJuXU4hWyhTRafOaxERAx8CJmNDl0m8jmGavSwIlbE+/eLT+I6im+/Dgy0CjwFK/Z+BaSr2EeaY0hOSpN3c84evIHa4iMmbCDE3BFSitGKJ4RmBOX+V4NwxuHe8GvtLcSdGFSFhLLo9eCc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070915094824.GA21451@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <05c801c7eb94$850ae780$9a010a0a@eeyore> <20070913152140.GF23525@xxxxxxxxxx> <804dabb00709142301o6687699fr4b57e8f3fc1a2ab6@xxxxxxxxxxxxxx> <20070915094824.GA21451@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 9/15/07, Bastian Blank <bastian@xxxxxxxxxxxx> wrote:
> On Sat, Sep 15, 2007 at 02:01:12PM +0800, Peter Teoh wrote:
> >     * does databases need to be shareable across heterogeneous systems
> > by a simple file copy across the network like SAMBA?
>
> Most db files are not interchangable. And the xenstore db is usually
> useless on another system. You want to define your own transfer format
> if you want to do this and not rely on the db to support that.
>
> >     * Can't use thread libraries as they conflict with LWP.
>
> "Library for WWW in Perl"? Even wikipedia does not list a better match.
> pthread is LSB and SUSv3. And with a proper db you can use fork if
> necessary.
>
> >     * identifying the minimal amount of mapping operation needed, and
> > possibly its corresponding hashing structures.
> >     * and finally, to come up with the simplest design that meet all
> > the requirements.
> >
> > Can Dan's CDB be a possible alternative candidate for our database
> > design?   Please enlighten me :-).
>
> Isn't CDB also read-only, aka needs to be rewritten on each write?
> xenstored with tdb does this.
>

Have not the time to look into CDB yet.   More important is to
understand in depth what actually is the requirements of Xenstored -
its basic need for a transaction concept?   ACID properties?   FIFO
queue properties?   Can we consider other alternatives like lock-free
database?   For example:

http://en.wikipedia.org/wiki/Lock-free_and_wait-free_algorithms
http://www.grame.fr/pub/LockFree.pdf

And then there is a concurrency vs performance tradeoffs issue as well
(eg, row-level locking in database usually implies higher overheads in
processing).   So it will be good if lock-free algo are favored.

Another possibility is also batching of transactions, just like
batching of hypercall in Xen, so as to cut down the overheads of
starting and closing the transaction.

> Usually I would say, bdb is a good choice for this usage. Supports
> transactions, multiple reader. It is used by many things with large
> writing frequency.
>

Yes, I agree, bDB is used in MySQL etc.

On 9/15/07, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:

> I repeated those tests against Xen 3.1 a few months back and the 
> characteristics
> haven't changed all that much. Running further OProfile tests on a debug build
> would confirm this.
>

Any possibility of accessing these data?

> Since it is not possible to ever actually restart xenstored, the easy answer
> is to not use any database on disk at all. Simply keep the entire information
> set in RAM. None of the data is keeps per VM needs to persist once the VM
> shuts down - all the important state is maintained by XenD which does persist.
>

Persistency is traded off here.   I thought if traditional filesystem
can do without the database concept (eg, rollback concept when
non-integrity of data is detected), why not here?

Any comments?   Apologized if I am wrong in any area.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel