60.nfs
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 20 Jan 2011 23:56:56 +0000 (10:56 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 20 Jan 2011 23:56:56 +0000 (10:56 +1100)
Dont update the statd settings that often.
When we have very many nodes and very many ips, this would generate
a lot of unnessecary load on the system

config/events.d/60.nfs

index 79a071bab913f6ac71c74fdd42062b7c5c3bd0d2..0cea531fa1554a1b06fa1735427623726022029c 100755 (executable)
@@ -179,11 +179,11 @@ case "$1" in
                $cmd &
        }
 
-       # once every 60 seconds, update the statd state database for which
+       # once every 600 seconds, update the statd state database for which
        # clients need notifications
        LAST_UPDATE=`stat --printf="%Y" $CTDB_VARDIR/state/statd/update-trigger 2>/dev/null`
        CURRENT_TIME=`date +"%s"`
-       [ $CURRENT_TIME -ge $(($LAST_UPDATE + 60)) ] && {
+       [ $CURRENT_TIME -ge $(($LAST_UPDATE + 600)) ] && {
            mkdir -p $CTDB_VARDIR/state/statd
            touch $CTDB_VARDIR/state/statd/update-trigger
            $CTDB_BASE/statd-callout updatelocal &