Browse Source

AMBARI-6383 Customize start options for rrdcached (dsen)

Dmytro Sen 11 years ago
parent
commit
35ae359717

+ 6 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/configuration/global.xml

@@ -51,6 +51,11 @@
     <value>3600</value>
     <description>(-w) Data is written to disk every timeout seconds. If this option is not specified the default interval of 300 seconds will be used.</description>
   </property>
+  <property>
+    <name>rrdcached_flush_timeout</name>
+    <value>7200</value>
+    <description>(-f) Every timeout seconds the entire cache is searched for old values which are written to disk. This only concerns files to which updates have stopped, so setting this to a high value, such as 3600 seconds, is acceptable in most cases. This timeout defaults to 3600 seconds.</description>
+  </property>
   <property>
     <name>rrdcached_delay</name>
     <value>1800</value>
@@ -58,7 +63,7 @@
   </property>
   <property>
     <name>rrdcached_write_threads</name>
-    <value>10</value>
+    <value>4</value>
     <description>(-t) Specifies the number of threads used for writing RRD files. The default is 4. Increasing this number will allow rrdcached to have more simultaneous I/O requests into the kernel. This may allow the kernel to re-order disk writes, resulting in better disk throughput.</description>
   </property>
 

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/files/startRrdcached.sh

@@ -35,7 +35,7 @@ then
              -m 664 -l unix:${RRDCACHED_ALL_ACCESS_UNIX_SOCKET} \
              -m 777 -P FLUSH,STATS,HELP -l unix:${RRDCACHED_LIMITED_ACCESS_UNIX_SOCKET} \
              -b ${RRDCACHED_BASE_DIR} -B -t ${RRDCACHED_WRITE_THREADS} \
-             -w ${RRDCACHED_TIMEOUT} -z ${RRDCACHED_DELAY} -F"
+             -w ${RRDCACHED_TIMEOUT} -f ${RRDCACHED_FLUSH_TIMEOUT} -z ${RRDCACHED_DELAY} -F"
 
     # Ideally, we'd use ${RRDCACHED_BIN}'s -s ${WEBSERVER_GROUP} option for 
     # this, but it doesn't take sometimes due to a lack of permissions,

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py

@@ -34,8 +34,9 @@ gmond_user = config['configurations']['global']["gmond_user"]
 webserver_group = "apache"
 rrdcached_base_dir = config['configurations']['global']["rrdcached_base_dir"]
 rrdcached_timeout = default("/configurations/global/rrdcached_timeout", 3600)
+rrdcached_flush_timeout = default("/configurations/global/rrdcached_flush_timeout", 7200)
 rrdcached_delay = default("/configurations/global/rrdcached_delay", 1800)
-rrdcached_write_threads = default("/configurations/global/rrdcached_write_threads", 10)
+rrdcached_write_threads = default("/configurations/global/rrdcached_write_threads", 4)
 
 ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0]
 

+ 1 - 0
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/templates/gangliaLib.sh.j2

@@ -43,6 +43,7 @@ GANGLIA_RUNTIME_DIR={{ganglia_runtime_dir}};
 RRDCACHED_BASE_DIR={{rrdcached_base_dir}};
 RRDCACHED_WRITE_THREADS={{rrdcached_write_threads}}
 RRDCACHED_TIMEOUT={{rrdcached_timeout}}
+RRDCACHED_FLUSH_TIMEOUT={{rrdcached_flush_timeout}}
 RRDCACHED_DELAY={{rrdcached_delay}}
 
 # This file contains all the info about each Ganglia Cluster in our Grid.

+ 6 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/global.xml

@@ -51,6 +51,11 @@
     <value>3600</value>
     <description>(-w) Data is written to disk every timeout seconds. If this option is not specified the default interval of 300 seconds will be used.</description>
   </property>
+  <property>
+    <name>rrdcached_flush_timeout</name>
+    <value>7200</value>
+      <description>(-f) Every timeout seconds the entire cache is searched for old values which are written to disk. This only concerns files to which updates have stopped, so setting this to a high value, such as 3600 seconds, is acceptable in most cases. This timeout defaults to 3600 seconds.</description>
+  </property>
   <property>
     <name>rrdcached_delay</name>
     <value>1800</value>
@@ -58,7 +63,7 @@
   </property>
   <property>
     <name>rrdcached_write_threads</name>
-    <value>10</value>
+    <value>4</value>
     <description>(-t) Specifies the number of threads used for writing RRD files. The default is 4. Increasing this number will allow rrdcached to have more simultaneous I/O requests into the kernel. This may allow the kernel to re-order disk writes, resulting in better disk throughput.</description>
   </property>
 

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/files/startRrdcached.sh

@@ -35,7 +35,7 @@ then
              -m 664 -l unix:${RRDCACHED_ALL_ACCESS_UNIX_SOCKET} \
              -m 777 -P FLUSH,STATS,HELP -l unix:${RRDCACHED_LIMITED_ACCESS_UNIX_SOCKET} \
              -b ${RRDCACHED_BASE_DIR} -B -t ${RRDCACHED_WRITE_THREADS} \
-             -w ${RRDCACHED_TIMEOUT} -z ${RRDCACHED_DELAY} -F"
+             -w ${RRDCACHED_TIMEOUT} -f ${RRDCACHED_FLUSH_TIMEOUT} -z ${RRDCACHED_DELAY} -F"
 
     # Ideally, we'd use ${RRDCACHED_BIN}'s -s ${WEBSERVER_GROUP} option for 
     # this, but it doesn't take sometimes due to a lack of permissions,

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py

@@ -47,8 +47,9 @@ else:
 webserver_group = "apache"
 rrdcached_base_dir = config['configurations']['global']["rrdcached_base_dir"]
 rrdcached_timeout = default("/configurations/global/rrdcached_timeout", 3600)
+rrdcached_flush_timeout = default("/configurations/global/rrdcached_flush_timeout", 7200)
 rrdcached_delay = default("/configurations/global/rrdcached_delay", 1800)
-rrdcached_write_threads = default("/configurations/global/rrdcached_write_threads", 10)
+rrdcached_write_threads = default("/configurations/global/rrdcached_write_threads", 4)
 
 ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0]
 

+ 1 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/templates/gangliaLib.sh.j2

@@ -44,6 +44,7 @@ GANGLIA_RUNTIME_DIR={{ganglia_runtime_dir}};
 RRDCACHED_BASE_DIR={{rrdcached_base_dir}};
 RRDCACHED_WRITE_THREADS={{rrdcached_write_threads}}
 RRDCACHED_TIMEOUT={{rrdcached_timeout}}
+RRDCACHED_FLUSH_TIMEOUT={{rrdcached_flush_timeout}}
 RRDCACHED_DELAY={{rrdcached_delay}}
 
 # This file contains all the info about each Ganglia Cluster in our Grid.