Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of elasticsearch Writing Optimization

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

The editor today takes you to understand the example analysis of elasticsearch writing optimization, which is introduced in great detail in this article. Friends who feel helpful can browse the content of the article together with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Follow the editor to learn more about "elasticsearch writing optimization example analysis".

For full dump data, the following optimizations can be made to optimize performance.

Slicing setting, not slicing

Http://localhost:9200/test_index/_settings/{ "index": {"number_of_replicas": 0}}

Refresh settings, do not refresh

Http://localhost:9200/test_index/_settings/{ "index": {"refresh_interval": "- 1"}}

Translog size setting, which is 512m by default.

Http://localhost:9200/test_index/_settings/{ "index.translog.flush_threshold_size": "1024mb"}

If it is a SSD hard disk, modify the segment merging rate

Http://localhost:9200/_cluster/settings/{ "persistent": {"indices.store.throttle.max_bytes_per_sec": "200mb"}} http://localhost:9200/_cluster/settings/{ "transient": {"indices.store.throttle.type": "none"}}

After full dump, restore it again

Shard settin

Http://localhost:9200/test_index/_settings/{ "index": {"number_of_replicas": 2}}

Refresh settings, do not refresh

Http://localhost:9200/test_index/_settings/{ "index": {"refresh_interval": "1s"}}

Translog size settin

Http://localhost:9200/test_index/_settings/{ "index.translog.flush_threshold_size": "512mb"}

Of course, bulk mode should be used, and the data submitted by elasticsearch should be less than 15m at a time.

Thank you for your reading, the above is the whole content of "sample Analysis of elasticsearch Writing Optimization", friends who learn to learn to hurry up to do it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 243

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report