Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to improve the read and write performance of Elasticsearch

Shulou Source: shulou.com Published: 2022-06-01 12:41:51 11月15日 Update

Editor to share with you how to improve the reading and writing performance of Elasticsearch, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

Improve write performance

Client side:

(1) use multi-thread to write in batch.

(2) pass the test to determine how much to write in each batch.

(3) through monitoring, we can get the frequency and regularity of response 429, so as to determine the number of threads, which can be adjusted automatically by the program.

Server side:

(1) adjust parameters, such as the interval of refresh.

(2) the field order of the document should be the same, and increasing the compression ratio will also help to improve the performance.

(3) configure load balancing for reading and writing.

(4) Thread pool parameter adjustment of bulk.

The default values of each parameter of ES have been relatively good, and have been considered very comprehensively. We must be careful in making changes. It must be carefully estimated, then tested, and finally observed in a production environment, and the parameters are optimized in the process.

(5) turn off functions that are not needed. For example, if you don't need to score, turn it off.

Improve reading performance

The structure of the document is simple, with as little or no nesting as possible.

The above is all the content of the article "how Elasticsearch improves reading and writing performance". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Performance parameters articles threads tuning content documentation aspects testing same balanced not so much functionality can be passed most fields clients clients as much as possible Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MariaDB OPPO Reno Shulou Technology macOS