如何为每个scroll Id监控scroll API使用的内存资源或搜索上下文?这些搜索上下文存储在哪里,有没有办法查看或监控它们?参数keepAlive对于java api公共滚动(TimeValue keepAlive) {...}意味着什么?
发布于 2019-02-26 21:25:12
您可以通过调用Node stats API来检查当前打开了多少搜索上下文,但(据我所知)无法查看它们使用了多少内存:
GET _nodes/stats/indices?filter_path=**.open_contexts=>
{
"nodes" : {
"QjjWj45NQkGC9qcaylDDVQ" : {
"indices" : {
"search" : {
"open_contexts" : 0
}
}
},
"eZbpkckXSxSxzD8c_QOkEA" : {
"indices" : {
"search" : {
"open_contexts" : 3
}
}
},
"0VFJaC2uTraudPCMqODhiw" : {
"indices" : {
"search" : {
"open_contexts" : 2
}
}
}
}
}搜索上下文存储在堆中。
此外,keepAlive参数告诉上下文在自动清除之前在内存中保持可用的时间。
https://stackoverflow.com/questions/54886296
复制相似问题