elasticsearch 性能调优
增大 thread_pool.index.queue_size 1000
增大 indices.memory.index_buffer_size: 20%
index.translog.durability: async –这个可以异步写硬盘,增大写的速度
增大thread_pool.bulk.queue_size: 5000
设置index.number_of_replicas: 0
适当加大index.refresh_interval
修改jvm.options文件:增大内存
配置查看:
cluster and most of other config:
http://10.200.102.72:9200/_cluster/settings?include_defaults=true
index config:http://10.200.102.72:9200/_settings?include_defaults=true
配置设置:
curl -X PUT “localhost:9200/_cluster/settings”
curl -X PUT “localhost:9200/_settings” -H ‘Content-Type: application/json’ -d’{“index” : {“translog”:{“durability”: “async”,“sync_interval”:“10s”}}}’
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html
上生产环境需要的设置:
https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html