Example Analysis of elasticsearch Writing Optimization
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!