简体   繁体   English

如何限制elasticsearch中的线程数

[英]How limit number of threads in elasticsearch

I am newbie in Elastic Search. 我是Elastic Search的新手。 When I create the instance Client for the Elastic Search using java, it creates no of threads(around 16 threads). 当我使用java为Elastic Search创建实例客户端时,它不会创建任何线程(大约16个线程)。 How I can put limit on number of threads created by Client? 如何限制客户端创建的线程数? What will be the pros and cons of changing default settings? 更改默认设置的优缺点是什么?
I got some information from this link . 我从这个链接获得了一些信息。

As you can see in the sources, the TransportClient you create to connect to a cluster uses a ThreadPool . 正如您在源中看到的,您创建的用于连接到集群的TransportClient使用ThreadPool

So it seems this settings also affect the client side. 所以看起来这个设置也会影响客户端。

This post may give you some insight of how the thread pool can affect your application performances: http://jontai.me/blog/2013/06/esrejectedexecutionexception-rejected-execution-of-messagechannelhandler-requesthandler/ 这篇文章可能会让您深入了解线程池如何影响您的应用程序性能: http//jontai.me/blog/2013/06/esrejectedexecutionexception-rejected-execution-of-messagechannelhandler-requesthandler/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM