FreeIPA 的 NSCD(名称服务缓存守护进程)中的 "Positive entries" 和 "Negative entries" 是什么
What are "Positive entries" and "Negative entries" in NSCD (Named Service Cache Deamon) for FreeIPA
"Positive entries" 和 "Negative entries" 统计数据位于 "hosts cache" 部分下的 nscd -g 命令中。从 nscd.conf 手册中,我看到 "positive entries are successful queries in the specified cache" 和 "negative entries (unsuccessful queries) in the specified cache"。
但是,当查询本身意味着它无法在缓存中找到值时,缓存中不成功的查询(负条目)怎么会有命中(负条目的缓存命中)......无法理解这两者之间的区别。 .
能不能简单解释一下?
{代码}
"hosts cache:
yes cache is enabled
yes cache is persistent
yes cache is shared
211 suggested size
216064 total data pool size
12880 used data pool size
3600 seconds time to live for positive entries
20 seconds time to live for negative entries
102658 cache hits on positive entries
221 cache hits on negative entries
129187 cache misses on positive entries
10926 cache misses on negative entries
42% cache hit rate
74 current number of cached values
167 maximum number of cached values
8 maximum chain length searched
0 number of delays on rdlock
0 number of delays on wrlock
0 memory allocations failed
yes check /etc/hosts for changes"
{代码}
nscd 与 FreeIPA 无关。
积极的缓存条目是被发现存在并且可以缓存更长时间的条目,因为假设它们不会经常更改。
负缓存条目是由于某种原因被发现在源中不存在的条目,并且这一事实被缓存的时间较短。负缓存的原因是为了避免源上的负载过大,因为这可能比正缓存条目耗费更多的时间和精力。例如,由于操作超时,可能会得到一个负缓存条目。在短时间内重复相同的请求会导致这些操作中的每一个都超时。否定缓存允许通过缓存 TTL 从缓存中回答这些请求(结果将是 'entry does not exist'),但是一旦否定缓存条目的 TTL 过期,就会再次尝试从原始源检索数据。
"Positive entries" 和 "Negative entries" 统计数据位于 "hosts cache" 部分下的 nscd -g 命令中。从 nscd.conf 手册中,我看到 "positive entries are successful queries in the specified cache" 和 "negative entries (unsuccessful queries) in the specified cache"。 但是,当查询本身意味着它无法在缓存中找到值时,缓存中不成功的查询(负条目)怎么会有命中(负条目的缓存命中)......无法理解这两者之间的区别。 . 能不能简单解释一下?
{代码}
"hosts cache:
yes cache is enabled
yes cache is persistent
yes cache is shared
211 suggested size
216064 total data pool size
12880 used data pool size
3600 seconds time to live for positive entries
20 seconds time to live for negative entries
102658 cache hits on positive entries
221 cache hits on negative entries
129187 cache misses on positive entries
10926 cache misses on negative entries
42% cache hit rate
74 current number of cached values
167 maximum number of cached values
8 maximum chain length searched
0 number of delays on rdlock
0 number of delays on wrlock
0 memory allocations failed
yes check /etc/hosts for changes"
{代码}
nscd 与 FreeIPA 无关。
积极的缓存条目是被发现存在并且可以缓存更长时间的条目,因为假设它们不会经常更改。
负缓存条目是由于某种原因被发现在源中不存在的条目,并且这一事实被缓存的时间较短。负缓存的原因是为了避免源上的负载过大,因为这可能比正缓存条目耗费更多的时间和精力。例如,由于操作超时,可能会得到一个负缓存条目。在短时间内重复相同的请求会导致这些操作中的每一个都超时。否定缓存允许通过缓存 TTL 从缓存中回答这些请求(结果将是 'entry does not exist'),但是一旦否定缓存条目的 TTL 过期,就会再次尝试从原始源检索数据。