Blame SOURCES/autofs-5.1.1-update-map_hash_table_size-description.patch

516ab0
autofs-5.1.1 - update map_hash_table_size description
516ab0
516ab0
From: Ian Kent <raven@themaw.net>
516ab0
516ab0
The configuration parameter map_hash_table_size has been ommitted
516ab0
from the autofs.conf(5) man page and it's description in the
516ab0
configuration file comments is poor.
516ab0
516ab0
Add a description of the parameter to autofs.conf(5) and update
516ab0
the configuration file comments to direct people to the map page
516ab0
for more information.
516ab0
516ab0
Signed-off-by: Ian Kent <raven@themaw.net>
516ab0
---
516ab0
 CHANGELOG                      |    1 +
516ab0
 man/autofs.conf.5.in           |   31 +++++++++++++++++++++++++++++++
516ab0
 redhat/autofs.conf.default.in  |    6 ++++--
516ab0
 samples/autofs.conf.default.in |    6 ++++--
516ab0
 4 files changed, 40 insertions(+), 4 deletions(-)
516ab0
516ab0
--- autofs-5.0.7.orig/CHANGELOG
516ab0
+++ autofs-5.0.7/CHANGELOG
516ab0
@@ -180,6 +180,7 @@
516ab0
 - fix return handling of do_reconnect() in ldap module.
516ab0
 - fix direct mount stale instance flag reset.
516ab0
 - fix direct map expire not set for initail empty map.
516ab0
+- update map_hash_table_size description.
516ab0
 
516ab0
 25/07/2012 autofs-5.0.7
516ab0
 =======================
516ab0
--- autofs-5.0.7.orig/man/autofs.conf.5.in
516ab0
+++ autofs-5.0.7/man/autofs.conf.5.in
516ab0
@@ -80,6 +80,37 @@ user setting these standard environment
516ab0
 potential user privilege escalation when the program map is written in a
516ab0
 language that can load components from, for example, a user home directory
516ab0
 (program default "no").
516ab0
+.TP
516ab0
+.B map_hash_table_size
516ab0
+.br
516ab0
+This configuration option may be used to change the number of hash
516ab0
+table slots (default 1024).
516ab0
+
516ab0
+This configuration option affects the overhead of searching the map
516ab0
+entry cache for map entries when there are a large number of entries.
516ab0
+It affects the number of entries that must be looked at to locate a
516ab0
+map entry in the map entry cache. For example, the default of 1024
516ab0
+and a direct map with 8000 entries would result in each slot
516ab0
+containing an average of 8 entries, which should be acceptable.
516ab0
+
516ab0
+However, if excessive CPU usage is observed during automount lookups
516ab0
+increasing this option can reduce the CPU overhead considerably becuase
516ab0
+it reduces the length of the search chains.
516ab0
+
516ab0
+Note that the number of entries in a map doesn't necessarily relate
516ab0
+to the number of entries used in the map entry cache.
516ab0
+
516ab0
+There are three distinct cases, direct maps and indirect maps that
516ab0
+use the "browse" option must be read in their entirity at program
516ab0
+start so, in these two cases the map size does retate directly to
516ab0
+the map entry cache size.
516ab0
+
516ab0
+For indirect maps that do not use the "browse" option entries are
516ab0
+added to the map entry cache at lookup so the number of active cache
516ab0
+entries, in this case, is usually much less than the number of entries
516ab0
+in the map. In this last case it would be unusual for the map entry
516ab0
+cache to grow large enough to warrant increasing the default before
516ab0
+an event that cleans stale entries, a map re-read for example.
516ab0
 .SS LDAP Configuration
516ab0
 .P
516ab0
 Configuration settings available are:
516ab0
--- autofs-5.0.7.orig/redhat/autofs.conf.default.in
516ab0
+++ autofs-5.0.7/redhat/autofs.conf.default.in
516ab0
@@ -135,8 +135,10 @@ mount_nfs_default_protocol = 4
516ab0
 #auth_conf_file = @@autofsmapdir@@/autofs_ldap_auth.conf
516ab0
 #
516ab0
 # map_hash_table_size - set the map cache hash table size.
516ab0
-# 			Should be a power of 2 with a ratio roughly
516ab0
-# 			between 1:10 and 1:20 for each map.
516ab0
+# 			Should be a power of 2 with a ratio of
516ab0
+# 			close to 1:8 for acceptable performance
516ab0
+# 			with maps up to around 8000 entries.
516ab0
+# 			See autofs.conf(5) for more details.
516ab0
 #
516ab0
 #map_hash_table_size = 1024
516ab0
 #
516ab0
--- autofs-5.0.7.orig/samples/autofs.conf.default.in
516ab0
+++ autofs-5.0.7/samples/autofs.conf.default.in
516ab0
@@ -134,8 +134,10 @@ browse_mode = no
516ab0
 #auth_conf_file = @@autofsmapdir@@/autofs_ldap_auth.conf
516ab0
 #
516ab0
 # map_hash_table_size - set the map cache hash table size.
516ab0
-# 			Should be a power of 2 with a ratio roughly
516ab0
-# 			between 1:10 and 1:20 for each map.
516ab0
+# 			Should be a power of 2 with a ratio of
516ab0
+# 			close to 1:8 for acceptable performance
516ab0
+# 			with maps up to around 8000 entries.
516ab0
+# 			See autofs.conf(5) for more details.
516ab0
 #
516ab0
 #map_hash_table_size = 1024
516ab0
 #