There is no good reason to change this unless you run into performance
issues. Your issue is unrelated to array cache size.
On Tue, Jun 9, 2020 at 3:12 AM Frank Filz <ffilzlnx(a)mindspring.com> wrote:
You would indeed need to recompile. However, that is not the limit of
the
cache size, it’s just a direct lookup by id if the particular cache entry
has been used somewhat recently. The entries are all stored in avltrees (so
O(log(n)) lookup). The arrays sized by this constant just have the most
recent entry for a particular “hash” value (where the hash is just id mod
id_cache_size).
Enlarging the cache will not necessarily mean all the entries will be
cached, though if they are all assigned mostly sequentially, the trial mod
hash will result in a unique hash for each entry.
Given the use of the cache, I’m not even sure the value needs to be a
prime… Use of a prime number would really only help if the ids are randomly
spread over a much larger id space than the number of ids, otherwise any
cache size should work just fine.
Frank
*From:* David Hansen [mailto:davidh@weka.io]
*Sent:* Monday, June 8, 2020 1:15 PM
*To:* support(a)lists.nfs-ganesha.org
*Cc:* Michael Echavarría <mechavarria(a)penguincomputing.com>
*Subject:* [NFS-Ganesha-Support] Help with id_cache_size
Hello Ganesha support. I have a customer running into some nasty
intermittent connection issues an internal directory service (VAS) which
ganesha is using to query group ownership of directories thanks to
Manage_Gids = True;
As such, we've been asked to inspect the caching mechanism of ganesha
U/GID mapping and determined that the ID map cache size is 1009 entries, as
set here:
https://github.com/nfs-ganesha/nfs-ganesha/blob/d51394b49b644b69bec1c219c...
src/idmapper/idmapper_cache.c:76
#define id_cache_size 1009
Since the customer has 6000+ groups, they have expressed interest in
increasing this value to 20011 (must be prime) to account for nested groups
and such.
Can you please confirm whether we would have to define this value
ourselves and recompile ganesha, or whether it is configurable with a
config file somehow?
Thanks!
--
*David Hansen *
Support Engineer
WekaIO, Inc. | Radically Simple Storage™
Support Line: +1 (855) 969-4030
M: +1-408-332-4550
W:
www.weka.io
_______________________________________________
Support mailing list -- support(a)lists.nfs-ganesha.org
To unsubscribe send an email to support-leave(a)lists.nfs-ganesha.org