天天看點

提高elasticsearch索引速度

提高索引性能和速度從幾下方面着手:

 1. 增大索引實時時間設定:index.engine.robin.refresh_interval :10s (預設為1s) 

 2. 增大記憶體緩沖區: indices.memory.index_buffer_size:20% (預設為heap大小的10%)

 3. 增加translog方面的設定: index.translog.flush_threshold:10000 (預設為5000)

 4. 增加配置設定給ES的記憶體, 預設為1g.

 5. 減小replaca. 索引時可設定為0. 完成索引後再設定成想要的。 

 6. 增加機器數。

 7. index.merge.policy.use_compound_file 設定為false. 這樣的話, 可以減少Merge (保證open file size 夠 大)。

繼續閱讀