How to compile and use 'nscd'
Carlos O'Donell
carlos@redhat.com
Fri Jul 29 16:41:48 GMT 2022
On 7/24/22 10:15, 이병욱 via Libc-help wrote:
> Thank you for your reply.
>
> If you know, would you tell me why `CACHE_PRUNE_INTERVAL` is defined
> as 15? It is hard to find the reason anywhere.
I don't think there is a strong justification for 15s.
It could be added as a tunable to nscd.conf.
> If it was intended for mitigating the load of the client server with
> nscd, I think it is a little large, considering the current server
> performance.
It limits the CPU usage on the client by pruning the cache at certain
intervals.
The cache entries themselves, depending on the cache, will have TTL
information that can time out on a shorter interval.
> I found at JVM environment (JVM has its own DNS caching), It seems
> that TTL value close to 0, doesn't have an impact to a client server
> performance, to an extent.
>
> I think if we choose a DNS round robin for distributing the traffic
> load, it is inevitable to assign a DNS ttl close to 0. Otherwise, it
> can make biased traffic to servers.
>
> Although I make a A record TTL value below 15, this small TTL value
> become meaningless because the client make a dns query at least every
> 15 seconds, which is `CACHE_PRUNE_INTERVAL`.
Why does it become meaningless?
The CACHE_PRUNE_INTERVAL is the interval in which the pruning thread looks
for entries with expired lifetime. It is not the interval at which entries
are expired, the actual expiry is determined by TTL values.
> Is there a design philosophy about `15`?
None that we have documented.
--
Cheers,
Carlos.
More information about the Libc-help
mailing list