aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-12-16 18:46:27 +0000
committerIan Campbell <ian.campbell@citrix.com>2011-12-16 18:46:27 +0000
commitf7506e96aa7d3f7d0a2af57f2cd9a35ebd2e8c31 (patch)
tree359ebb3776fa9f9a91519e7ee4b2fede3d2e4003 /tools/hotplug
parenta1b22e625dee30b9ca572e5b7fe66f1aebd44d7d (diff)
downloadxen-f7506e96aa7d3f7d0a2af57f2cd9a35ebd2e8c31.tar.gz
xen-f7506e96aa7d3f7d0a2af57f2cd9a35ebd2e8c31.tar.bz2
xen-f7506e96aa7d3f7d0a2af57f2cd9a35ebd2e8c31.zip
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> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/hotplug')
-rw-r--r--tools/hotplug/Linux/init.d/sysconfig.xencommons3
-rw-r--r--tools/hotplug/Linux/init.d/xencommons15
2 files changed, 16 insertions, 2 deletions
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons b/tools/hotplug/Linux/init.d/sysconfig.xencommons
index d20c85d5cc..6543204597 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons
@@ -1,6 +1,9 @@
# Log xenconsoled messages (cf xl dmesg)
#XENCONSOLED_TRACE=[none|guest|hv|all]
+# Select xenstored implementation
+#XENSTORED=[oxenstored|xenstored]
+
# Log xenstored messages
#XENSTORED_TRACE=[yes|on|1]
diff --git a/tools/hotplug/Linux/init.d/xencommons b/tools/hotplug/Linux/init.d/xencommons
index f02b25dabb..862dd9c2db 100644
--- a/tools/hotplug/Linux/init.d/xencommons
+++ b/tools/hotplug/Linux/init.d/xencommons
@@ -65,8 +65,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