Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=c65a13a82189f3... Commit: c65a13a82189f38bd80d5c52924d09a7d98daa37 Parent: 224a841585ea300718f9e82d9fadd0f163233e8f Author: Fabio M. Di Nitto fdinitto@redhat.com AuthorDate: Wed Jul 25 07:21:19 2012 +0200 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Wed Jul 25 07:21:19 2012 +0200
cman init: allow dlm hash table sizes to be tunable at startup
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 c6e038e..64d12de 100644 --- a/cman/init.d/cman.in +++ b/cman/init.d/cman.in @@ -119,6 +119,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 @@ -755,6 +762,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" @@ -822,6 +846,10 @@ start() dlm_controld_enabled \ "Starting dlm_controld"
+ runwrap tune_dlm_hash_sizes \ + none \ + "Tuning DLM kernel hash tables" + gfs_controld_enabled && cd @INITDDIR@ && ./gfs2-cluster start
runwrap start_ocfs2_controld \ diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in index 5be97ff..03b2474 100644 --- a/cman/init.d/cman.init.defaults.in +++ b/cman/init.d/cman.init.defaults.in @@ -42,6 +42,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
cluster-commits@lists.stg.fedorahosted.org