[SCM] CTDB repository - branch master updated - ctdb-2.1-24-ge204fac

Amitay Isaacs amitay at samba.org
Wed Feb 13 15:36:29 MST 2013


The branch, master has been updated
       via  e204fac03412520e877ab04363b3ece02667c55b (commit)
       via  053b89c6dbce47001505524606889334559d2ec4 (commit)
      from  00db5fa00474f8a83f1aa3b603fd756cc9b49ff4 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e204fac03412520e877ab04363b3ece02667c55b
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Feb 11 13:23:47 2013 +1100

    ctdbd: Fix the PullDBPreallocation size to 10MB as intended
    
    In 1f262deaad0818f159f9c68330f7fec121679023, Ronnie changed recovery code
    to allocate chunks of 10MB in traverse_pulldb() and traverse_recdb().  The
    tunable PullDBPreallocation size was set to 100MB.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>

commit 053b89c6dbce47001505524606889334559d2ec4
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Feb 11 11:25:49 2013 +1100

    eventscripts: Remove calls to "smbstatus -np" for samba cleanup
    
    This is an artifact from older versions of Samba. In the newer versions of
    Samba, "smbstatus -np" command does not do anything useful, but causes a
    traverse in CTDB which is expensive and causes CPU utilization to shoot up.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/50.samba |   32 +++-----------------------------
 server/ctdb_tunables.c   |    2 +-
 2 files changed, 4 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index ecbe05e..ccc6864 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -68,11 +68,6 @@ service_stop ()
     fi
 }
 
-# set default samba cleanup period - in minutes
-[ -z "$SAMBA_CLEANUP_PERIOD" ] && {
-    SAMBA_CLEANUP_PERIOD=10
-}
-
 # we keep a cached copy of smb.conf here
 smbconf_cache="$service_state_dir/smb.conf.cache"
 
@@ -152,15 +147,6 @@ list_samba_shares ()
 
 
 ###########################
-# periodic cleanup function
-periodic_cleanup() {
-    # running smbstatus scrubs any dead entries from the connections
-    # and sessionid database
-    # echo "Running periodic cleanup of samba databases"
-    smbstatus -np > /dev/null 2>&1 &
-}
-
-###########################
 
 ctdb_start_stop_service
 
@@ -170,28 +156,16 @@ ctdb_service_check_reconfigure
 
 ###########################
 
-case "$1" in 
+case "$1" in
      startup)
 	ctdb_service_start
 	;;
-	
+
      shutdown)
 	ctdb_service_stop
 	;;
 
      monitor)
-	# Create a dummy file to track when we need to do periodic cleanup
-	# of samba databases
-	periodic_cleanup_file="$service_state_dir/periodic_cleanup"
-	[ -f "$periodic_cleanup_file" ] || {
-		touch "$periodic_cleanup_file"
-	}
-	[ `find "$periodic_cleanup_file" -mmin +$SAMBA_CLEANUP_PERIOD | wc -l` -eq 1 ] && {
-		# Cleanup the databases
-	    	periodic_cleanup
-		touch "$periodic_cleanup_file"
-	}
-
 	if [ "$CTDB_SAMBA_SKIP_SHARE_CHECK" != "yes" ] ; then
 	    testparm_background_update
 
@@ -200,7 +174,7 @@ case "$1" in
 		testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && \
 		    die "ERROR: testparm shows smb.conf is not clean"
 	    }
-			
+
 	    list_samba_shares | ctdb_check_directories_probe || {
 		testparm_foreground_update
 		list_samba_shares |
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index b86d6d2..aa3115d 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -83,7 +83,7 @@ static const struct {
 	{ "DBRecordCountWarn",    100000,  offsetof(struct ctdb_tunable, db_record_count_warn), false },
 	{ "DBRecordSizeWarn",   10000000,  offsetof(struct ctdb_tunable, db_record_size_warn), false },
 	{ "DBSizeWarn",        100000000,  offsetof(struct ctdb_tunable, db_size_warn), false },
-	{ "PullDBPreallocation", 10*1024*10240,  offsetof(struct ctdb_tunable, pulldb_preallocation_size), false },
+	{ "PullDBPreallocation", 10*1024*1024,  offsetof(struct ctdb_tunable, pulldb_preallocation_size), false },
 	{ "NoIPTakeoverOnDisabled",    0,  offsetof(struct ctdb_tunable, no_ip_takeover_on_disabled), false },
 	{ "DeadlockTimeout",	300, offsetof(struct ctdb_tunable, deadlock_timeout), false },
 	{ "Samba3AvoidDeadlocks", 0, offsetof(struct ctdb_tunable, samba3_hack), false },


-- 
CTDB repository


More information about the samba-cvs mailing list