小编Pei*_*ong的帖子

Elasticsearch的索引速度慢

我们在3个EC2 c4.4xlarge(16个内核,32GB内存)节点上部署了ES 2.0,为ES分配了16G,在每个上分配了500GB和io1/4000 IOPS.

问题:我们期望从这个硬件配置中获得很好的性能,但是观察到非常慢的索引速度.

我们的文档大小约为10-50k,我们使用Java传输客户端进行插入.前50000的速度大约为1000 /秒,并且速度急剧下降到100-200 /秒.

与此同时,我们正在考虑资源消耗低:

  1. CPU仅约1-20%(16核CPU)
  2. IO写入仅约4-10Mb /秒
  3. 内存消耗仅约20-30%

要求:所以我无法理解为什么它如此缓慢而所有资源都是如此自由,我能做些什么来提高效率?谢谢.

这是我们使用的配置文件:

cluster.name: {{ env }}-{{ app }}
path.data: /data/es
path.logs: /data/es-logs
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["xxxx"]
bootstrap.mlockall: true
threadpool.search.queue_size: 300
threadpool.index.type: fixed
threadpool.index.size: 16
threadpool.index.queue_size: 250000
index.refresh_interval: 1s
index.translog.flush_threshold_ops: 50000
indices.memory.index_buffer_size: 30%
indices.memory.min_shard_index_buffer_size: 12mb
indices.memory.min_index_buffer_size: 96mb
script.inline: on
script.indexed: on
http.cors.enabled: true
http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
Run Code Online (Sandbox Code Playgroud)

运行这个工作时,这是htop和iostat: HTOP

iostat的

lucene indexing performance elasticsearch

15
推荐指数
1
解决办法
1万
查看次数

标签 统计

elasticsearch ×1

indexing ×1

lucene ×1

performance ×1