elasticsearch understanding threadpool

Viewed 2095

Thread pool reference(official)

with respect to the above reference, I have a few questions

  1. For search request: If my index has 2 shards, how many threads will it need
  2. For bulk/write request: If my index has 2 shards, how many threads will it need
  3. Does write & search request have dedicated threads? i.e no.of search request does not effect write threads/thread queue
  4. If a thread is writing to "Index_1" does it create a lock on the index? If I have a parallel search request on the same index, will it have to wait until the write operation is completed?
1 Answers

Inline answers

1. For search request: If my index has 2 shards, how many threads will it need?

for each Primary shard, ES creates an individual thread.

2. bulk/write request: If my index has 2 shards, how many threads will it need

Same as first answer

3.Does write & search request have dedicated threads? i.e no.of search request does not affect write threads/thread queue

Yes, they have their own thread pools. search pool is for For count/search/suggest operations. write thread pool for For single-document index/delete/update and bulk requests. More info on the same official link in the question.

Related