[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH]put xenstored tdb to tmpfs



Hi,

This patch put the xenstored tdb into tmpfs. It will improve the performance
when there are intensive xenstore read/writes.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>

thanks,

zhigang




--- xen-unstable/tools/hotplug/Linux/init.d/xend        2009-09-18 
00:04:17.000000000 +0800
+++ xen-unstable/tools/hotplug/Linux/init.d/xend.new    2010-01-21 
11:12:48.000000000 +0800
@@ -57,6 +57,13 @@
        test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
        [[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
        [[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export XENBACKENDD_DEBUG
+       pid=`cat /var/run/xenstore.pid 2>/dev/null`
+       if [ -z "$pid" -o ! -d "/proc/$pid" ]; then
+               dir=${XENSTORED_ROOTDIR:-/var/lib/xenstored}
+               if ! grep -q "$dir" /proc/mounts 2>/dev/null; then
+                       mount -t tmpfs none "$dir"
+               fi
+       fi
        xend start
        await_daemons_up
        ;;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.