Mailing List Archive

[PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1323448636 0
# Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
# Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
Linux/xencommons: Use oxenstored by default when available

oxenstored is an ocaml implementation of the xenstore daemon. It is faster,
more scalable and more reliable than the C xenstored.

In particular the transaction model in oxenstored does not involve taking a
complete copy of the database and aborting on any (even non-conflicting) other
change.

There is a paper on the design and implementation of oxenstored at
http://gazagnaire.org/pub/GH09.pdf which includes a performance evaluation and
comparison with the C daemon etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 74f94e15bfe1 -r 3b7ac401f144 tools/hotplug/Linux/init.d/sysconfig.xencommons
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons Fri Dec 09 16:35:56 2011 +0000
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons Fri Dec 09 16:37:16 2011 +0000
@@ -1,6 +1,9 @@
# Log xenconsoled messages (cf xl dmesg)
XENCONSOLED_TRACE=guest

+# Select xenstored implementation
+#XENSTORED=[oxenstored|xenstored]
+
# Log xenstored messages
#XENSTORED_TRACE=[yes|on|1]

diff -r 74f94e15bfe1 -r 3b7ac401f144 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons Fri Dec 09 16:35:56 2011 +0000
+++ b/tools/hotplug/Linux/init.d/xencommons Fri Dec 09 16:37:16 2011 +0000
@@ -70,8 +70,19 @@ do_start () {
rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"

- echo -n Starting xenstored...
- xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
+ if [ -n "$XENSTORED" ] ; then
+ echo -n Starting $XENSTORED...
+ $XENSTORED --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
+ elif [ -x /usr/sbin/oxenstored ] ; then
+ echo -n Starting oxenstored...
+ /usr/sbin/oxenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
+ elif [ -x /usr/sbin/xenstored ] ; then
+ echo -n Starting C xenstored...
+ /usr/sbin/xenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
+ else
+ echo "No xenstored found"
+ exit 1
+ fi

# Wait for xenstored to actually come up, timing out after 30 seconds
while [ $time -lt $timeout ] && ! `xenstore-read -s / >/dev/null 2>&1` ; do

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
On Fri, Dec 09, Ian Campbell wrote:

> # HG changeset patch
> # User Ian Campbell <ian.campbell@citrix.com>
> # Date 1323448636 0
> # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> # Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
> Linux/xencommons: Use oxenstored by default when available

Assuming this has been tested:

Acked-by: Olaf Hering <olaf@aepfle.de>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
On Fri, 2011-12-09 at 16:51 +0000, Olaf Hering wrote:
> On Fri, Dec 09, Ian Campbell wrote:
>
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell@citrix.com>
> > # Date 1323448636 0
> > # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> > # Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
> > Linux/xencommons: Use oxenstored by default when available
>
> Assuming this has been tested:

I've been running with it for quite a while. Perhaps more importantly
XenServer has been using it since, well, since I can't remember when but
it was several years ago when they switched and they pound it pretty
hard in their testing. Harder than C xenstored could cope with which is
why this one got written...

Another thing I forgot to mention is that by default the database is
non-persistent and held in RAM, so no need for hacks like putting the db
file on a tmpfs.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
On Fri, 9 Dec 2011, Ian Campbell wrote:
> On Fri, 2011-12-09 at 16:51 +0000, Olaf Hering wrote:
> > On Fri, Dec 09, Ian Campbell wrote:
> >
> > > # HG changeset patch
> > > # User Ian Campbell <ian.campbell@citrix.com>
> > > # Date 1323448636 0
> > > # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> > > # Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
> > > Linux/xencommons: Use oxenstored by default when available
> >
> > Assuming this has been tested:
>
> I've been running with it for quite a while. Perhaps more importantly
> XenServer has been using it since, well, since I can't remember when but
> it was several years ago when they switched and they pound it pretty
> hard in their testing. Harder than C xenstored could cope with which is
> why this one got written...

However is our version up in sync with theirs I wonder... Are we missing
any important bug fix?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
2011/12/9 Ian Campbell <ian.campbell@citrix.com>:
> # HG changeset patch
> # User Ian Campbell <ian.campbell@citrix.com>
> # Date 1323448636 0
> # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> # Parent  74f94e15bfe1dad412d0342aeabdbd895657f54f
> Linux/xencommons: Use oxenstored by default when available
>
> oxenstored is an ocaml implementation of the xenstore daemon. It is faster,
> more scalable and more reliable than the C xenstored.

This means that C xenstore is going the way of the Dodo? Or are we
going to maintain both implementations (ocalm and C)?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
On Fri, 2011-12-09 at 17:32 +0000, Stefano Stabellini wrote:
> On Fri, 9 Dec 2011, Ian Campbell wrote:
> > On Fri, 2011-12-09 at 16:51 +0000, Olaf Hering wrote:
> > > On Fri, Dec 09, Ian Campbell wrote:
> > >
> > > > # HG changeset patch
> > > > # User Ian Campbell <ian.campbell@citrix.com>
> > > > # Date 1323448636 0
> > > > # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> > > > # Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
> > > > Linux/xencommons: Use oxenstored by default when available
> > >
> > > Assuming this has been tested:
> >
> > I've been running with it for quite a while. Perhaps more importantly
> > XenServer has been using it since, well, since I can't remember when but
> > it was several years ago when they switched and they pound it pretty
> > hard in their testing. Harder than C xenstored could cope with which is
> > why this one got written...
>
> However is our version up in sync with theirs I wonder... Are we missing
> any important bug fix?

XenServer switched to the one in the xen tree in March by the looks of
things, at least that's when the copy in xen-api.git was removed.

There is nothing of interest in xen-api.git's copy from the point it was
imported into xen-unstable until now, if anything xen-unstable has been
the one getting fixes.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 4 of 4] Linux/xencommons: Use oxenstored by default when available [ In reply to ]
On Sun, 2011-12-11 at 18:10 +0000, Roger Pau Monné wrote:
> 2011/12/9 Ian Campbell <ian.campbell@citrix.com>:
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell@citrix.com>
> > # Date 1323448636 0
> > # Node ID 3b7ac401f144206c30440fbb41c74b13fa20b8cb
> > # Parent 74f94e15bfe1dad412d0342aeabdbd895657f54f
> > Linux/xencommons: Use oxenstored by default when available
> >
> > oxenstored is an ocaml implementation of the xenstore daemon. It is faster,
> > more scalable and more reliable than the C xenstored.
>
> This means that C xenstore is going the way of the Dodo? Or are we
> going to maintain both implementations (ocalm and C)?

I honestly don't know.

They are both reasonably low maintenance and rarely change or have bugs
reported. We don't actually see many bug reports about C xenstored
although it's short comings only tend to become apparent at scale and I
suspect lots of people use workarounds like nuking the tdb on boot
and/or putting it on a tmpfs.

On the other hand having two code bases providing the same service has
its own downsides.

I expect our (or at least my) first response to a non-obvious bug report
in C xenstored would be "have you tried oxenstored?".

FWIW my intention (when I eventually get to it and resurrect those
patches) is for stub-xenstored to be an oxenstored only thing.

Ian.


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