From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Wang Subject: [PATCH]put xenstored tdb to tmpfs Date: Thu, 21 Jan 2010 11:19:14 +0800 Message-ID: <4B57C7B2.6060203@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020104090006020809000907" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------020104090006020809000907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 thanks, zhigang --------------020104090006020809000907 Content-Type: text/x-patch; name="put-xenstored-tdb-to-tmpfs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="put-xenstored-tdb-to-tmpfs.patch" --- 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 ;; --------------020104090006020809000907 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------020104090006020809000907--