Skip to content

Commit f2b3882

Browse files
Base search queue length on pool size (#116578)
Base the queue length on the pool size. The number of tasks enqueued on search is proportional to its size in many cases so linearly increaasing the length of the queue makes it so a larger pool does not lead to an increasing chance of rejection under constant search load.
1 parent 2302cdb commit f2b3882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/threadpool/DefaultBuiltInExecutorBuilders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Map<String, ExecutorBuilder> getBuilders(Settings settings, int allocated
6868
settings,
6969
ThreadPool.Names.SEARCH,
7070
searchOrGetThreadPoolSize,
71-
1000,
71+
searchOrGetThreadPoolSize * 1000,
7272
new EsExecutors.TaskTrackingConfig(true, searchAutoscalingEWMA)
7373
)
7474
);

0 commit comments

Comments
 (0)