你不会是程序猿吧?

elasticsearcg索引配置不变,doc数量不变却越写越慢

Elasticsearch | 作者 code4j | 发布于6 小时前 | 阅读数:77

JVM版本:JDK1.8
es版本:6.8
单实例机器配置:内存64G (30G给es),磁盘空间2T,CPU 36核
索引大小:3.4G
3个分片,每个分片1G多点。
索引配置mapping如下
"mappings": { "doc": { "dynamic": "strict", "_all": { "enabled": false }, "_source": { "enabled": false }, "properties": { "accountCity": { "type": "keyword" }, "accountId": { "type": "long" }, "accountName": { "type": "keyword" }, "createTime": { "type": "long" }, "customId": { "type": "keyword" }, "customName": { "type": "keyword" } } } }
压测期间单个实例cpu使用率15%,负载不到5,磁盘使用率12%
 
写了个压测脚本,用覆盖更新的方式刷数据,发现前面几次吞吐率平均在 12000个doc/s左右,第二次刷数波动不大,整体保持在11000以上。后来再刷了几次没关注吞吐率,最后发现同步越来越慢,看了下日志发现吞吐率明显跟不上了 只有4000多。尝试对索引forcemerge 以及提高refresh周期也于事无补。请问又遇到类似情况的么,可能是什么原因导致的
已邀请:

code4j - coder github: https://github.com/rpgmakervx

赞同来自:

补充一下,_bulk 写的,一批5000个doc

code4j - coder github: https://github.com/rpgmakervx

赞同来自:

再补充信息,尝试forcemerge 并将segment merge成1个仍然无法加快对这索引的写入

要回复问题请先登录注册