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