不为失败找理由,要为成功找方法。

查询几次后,es占用的内存大于heapsize

Elasticsearch | 作者 Hsin | 发布于2018年11月19日 | 阅读数:3645

虚拟机时16G内存,heapsize设置如下:
-Xms2G
-Xmx2G

-XX:MaxMetaspaceSize=512M
es起来后用top命令查看mem占13%左右,查询几次后达到26.4%,请问这是什么原因,有办法限制吗?
 
查阅相关资料,说是内存增多都是与以下有关:
1.  segment memory
2.  filter cache
3.  field data cache
4.  bulk queue
5.  indexing buffer
6.  state buffer
7.  超大搜索聚合结果集的fetch
8. 对高cardinality字段做terms aggregation
但,这些不是都在heapsize里吗,heapsize已经限制为2G,而且MaxMetaspaceSize=512M,额外的内存是系统内存,用了之后不会消失的吗,求大神指教,多谢!
已邀请:

Hsin

赞同来自:

This is Lucene caching things,and that's not really something we can help with
but Don't be worried though, if other processes need memory then they can get it, it's not going to starve them just to keep things cached.
参考:https://discuss.elastic.co/t/h ... 825/4
 

zqc0512 - andy zhou

赞同来自:

Lucene  一般是你配置的JVM倍 一共两倍JVM

要回复问题请先登录注册