Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch uses just half of cpu cores even under full load

I have installed Elasticsearch on my server (Windows Server 2012). When I run several query request as an stress test, just half of CPU cores are utilized. Why?

CPU cores utilization - Elasticsearch under stress test

like image 629
Un4g1v3n Avatar asked Jan 21 '15 10:01

Un4g1v3n


1 Answers

Are you using the default elasticsearch configuration?

Make sure you don't limit the number of threads used for search/bulk/index. The defaults are well optimised, no need to change them. The default number of threads (except for search) is set to the number of cores on your machine. For search it's (number of cores * 3).

An example for this configuration (that you should avoid) for search in elasticsearch.yml file:

threadpool.search.type: fixed
threadpool.search.size: <num-of-threads>

Also, make sure to follow the deployment guidelines to optimise performance.

like image 188
Rafi Aroch Avatar answered Oct 08 '22 18:10

Rafi Aroch