ElasticSearch性能优化
2016-12-28 11:45
281 查看
1. 亿级规模的ES查询优化实战
能用filter就不用queryfilter拿到相应的doc后不计算score不用排序
query会对符合条件的doc计算score并进行排序
filter的查询速度比query快很多
2. 增加相关cache的配置
indices.cache.filter.size: 30%indices.fielddata.cache.size: 60%
index.cache.field.type: soft
indices.breaker.fielddata.limit: 70%
3. 优化方案——总结
能用filter就不用query增加冗余字段将部分range aggregation查询变成terms aggregation
为常用字段增加配置,将fielddata的loading设成eager,尽量多加载到内存
增加集群的缓存资源,把内存尽量多的用起来
Global ordinals
Index warmer
调整aggregation的collect_mode
上SSD
elasticsearch一些使用经验以及优化方法
Elasticsearch索引速度优化
index.refresh_interval :-1
index.number_of_shards : X
index.number_of_replicas : 0
index.translog.sync_interval : 30s
index.translog.durability : “async”
index.translog.flush_threshold_size: 4g
index.translog.flush_threshold_ops: 50000
其它
去掉_all字段可节省一半空间
开启索引压缩可
4000
节省空间,但会有10%-20%的性能损耗
不需分词的字符串字段设成not_analyzed
相关文章推荐
- elasticsearch核心知识--22.mget批量查询api以及性能优化
- elasticsearch-索引性能优化技巧
- Elasticsearch写入性能优化
- elasticsearch 性能优化
- ElasticSearch性能优化方案
- eBay Elasticsearch 性能优化实战-中文篇
- elasticsearch的3个基本问题之性能优化
- 浅谈Solr和ElasticSearch建索引性能优化策略
- ElasticSearch21:bulk api的奇特json格式与底层性能优化大揭秘
- Elasticsearch写入性能优化
- Elasticsearch node节点特点和架构性能优化方法
- elasticsearch索引性能优化
- 在elasticsearch里如何高效的使用filter [性能优化必看]
- Elasticsearch写入性能优化
- Elasticsearch性能优化官方建议
- ElasticSearch性能优化方案
- elasticsearch 索引搜索和索引性能优化配置——思路:去掉不必要的数据,减小数据的磁盘空间占用,同时提升性能
- elasticsearch性能优化
- ElasticSearch性能优化官方建议
- elasticsearch-搜索引擎-性能优化(5)