对不起,如果我的问题微不足道,因为我对ES不熟悉。
如果在clear cache调用之间使用stats,应该如何解释query_cache
值?
// GET _cluster/stats
{
...
"indices": {
...
"query_cache": {
"memory_size_in_bytes": 229449664,
"total_count": 19146885372L
"hit_count": 18430071,
"miss_count": 19128455301L,
"cache_size": 4101,
"cache_count": 126089,
"evictions": 121988
}
...
}
...
}
// POST _cache/clear
// GET _cluster/stats
{
...
"indices": {
...
"query_cache": {
"memory_size_in_bytes": 0,
"total_count": 19146885372L
"hit_count": 18430071,
"miss_count": 19128455301L,
"cache_size": 0,
"cache_count": 126089,
"evictions": 121988
}
...
}
...
}
如您所见,
memory_size_in_bytes
和cache_size
已清零。那是什么意思?为什么cache_count
没有被更改?
最佳答案
这是每个值的简短说明:
memory_size_in_bytes
是高速缓存中查询所占用的内存量total_count
是缓存中查找的总数(= hit_count
+ miss_count
)hit_count
是缓存HIT的总数miss_count
是高速缓存MISS cache_size
是当前缓存中的查询总数cache_count
是到目前为止的缓存查找总数(= cache_size
+ evictions
)evictions
是已从缓存因此,当您清除缓存时,唯一真正可以清除的是内存(即
memory_size_in_bytes
)和缓存的查询数(即cache_size
)。清除其他值只是计数器,实际上没有任何意义。
关于elasticsearch - POST _cache/clear真正发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42164573/