From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] cman init: allow dlm hash table sizes to be tunable at startup
Date: Wed, 25 Jul 2012 07:32:28 +0200 [thread overview]
Message-ID: <1343194348-3723-1-git-send-email-fdinitto@redhat.com> (raw)
From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
Resolves: rhbz#842370
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 28 ++++++++++++++++++++++++++++
cman/init.d/cman.init.defaults.in | 7 +++++++
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 9a0d726..9de349d 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -110,6 +110,13 @@ fi
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
[ -z "$DLM_CONTROLD_OPTS" ] && DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+[ -z "$DLM_LKBTBL_SIZE" ] && DLM_LKBTBL_SIZE=""
+[ -z "$DLM_RSBTBL_SIZE" ] && DLM_RSBTBL_SIZE=""
+[ -z "$DLM_DIRTBL_SIZE" ] && DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
@@ -706,6 +713,23 @@ leave_fence_domain()
fi
}
+tune_dlm_hash_sizes()
+{
+ dlmdir="/sys/kernel/config/dlm/cluster"
+
+ [ -n "$DLM_LKBTBL_SIZE" ] && [ -f $dlmdir/lkbtbl_size ] && \
+ echo $DLM_LKBTBL_SIZE > $dlmdir/lkbtbl_size
+
+ [ -n "$DLM_RSBTBL_SIZE" ] && [ -f $dlmdir/rsbtbl_size ] && \
+ echo $DLM_RSBTBL_SIZE > $dlmdir/rsbtbl_size
+
+ [ -n "$DLM_DIRTBL_SIZE" ] && [ -f $dlmdir/dirtbl_size ] && \
+ echo $DLM_DIRTBL_SIZE > $dlmdir/dirtbl_size
+
+ return 0
+}
+
+
start()
{
currentaction="start"
@@ -773,6 +797,10 @@ start()
none \
"Starting dlm_controld"
+ runwrap tune_dlm_hash_sizes \
+ none \
+ "Tuning DLM kernel hash tables"
+
runwrap start_gfs_controld \
none \
"Starting gfs_controld"
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index 1b7913e..bbaa049 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -34,6 +34,13 @@
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
#DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+#DLM_LKBTBL_SIZE=""
+#DLM_RSBTBL_SIZE=""
+#DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
--
1.7.7.6
next reply other threads:[~2012-07-25 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 5:32 Fabio M. Di Nitto [this message]
2012-07-25 15:11 ` [Cluster-devel] [PATCH] cman init: allow dlm hash table sizes to be tunable at startup David Teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343194348-3723-1-git-send-email-fdinitto@redhat.com \
--to=fdinitto@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).