Remove suggest threadpool

In #17198, we removed suggest transport action, which
used the `suggest` threadpool to execute requests. Now
`suggest` threadpool is unused and suggest requests are
executed on the `search` threadpool.
This commit is contained in:
Areek Zillur 2016-03-23 17:53:49 -04:00
parent 04e6e6c3e0
commit e16e113691
6 changed files with 5 additions and 23 deletions

View File

@ -66,7 +66,6 @@ public class RestThreadPoolAction extends AbstractCatAction {
ThreadPool.Names.REFRESH, ThreadPool.Names.REFRESH,
ThreadPool.Names.SEARCH, ThreadPool.Names.SEARCH,
ThreadPool.Names.SNAPSHOT, ThreadPool.Names.SNAPSHOT,
ThreadPool.Names.SUGGEST,
ThreadPool.Names.WARMER ThreadPool.Names.WARMER
}; };
@ -81,7 +80,6 @@ public class RestThreadPoolAction extends AbstractCatAction {
"r", "r",
"s", "s",
"sn", "sn",
"su",
"w" "w"
}; };

View File

@ -82,7 +82,6 @@ public class ThreadPool extends AbstractComponent implements Closeable {
public static final String INDEX = "index"; public static final String INDEX = "index";
public static final String BULK = "bulk"; public static final String BULK = "bulk";
public static final String SEARCH = "search"; public static final String SEARCH = "search";
public static final String SUGGEST = "suggest";
public static final String MANAGEMENT = "management"; public static final String MANAGEMENT = "management";
public static final String FLUSH = "flush"; public static final String FLUSH = "flush";
public static final String REFRESH = "refresh"; public static final String REFRESH = "refresh";
@ -139,7 +138,6 @@ public class ThreadPool extends AbstractComponent implements Closeable {
map.put(Names.INDEX, ThreadPoolType.FIXED); map.put(Names.INDEX, ThreadPoolType.FIXED);
map.put(Names.BULK, ThreadPoolType.FIXED); map.put(Names.BULK, ThreadPoolType.FIXED);
map.put(Names.SEARCH, ThreadPoolType.FIXED); map.put(Names.SEARCH, ThreadPoolType.FIXED);
map.put(Names.SUGGEST, ThreadPoolType.FIXED);
map.put(Names.MANAGEMENT, ThreadPoolType.SCALING); map.put(Names.MANAGEMENT, ThreadPoolType.SCALING);
map.put(Names.FLUSH, ThreadPoolType.SCALING); map.put(Names.FLUSH, ThreadPoolType.SCALING);
map.put(Names.REFRESH, ThreadPoolType.SCALING); map.put(Names.REFRESH, ThreadPoolType.SCALING);
@ -227,7 +225,6 @@ public class ThreadPool extends AbstractComponent implements Closeable {
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.BULK).size(availableProcessors).queueSize(50)); add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.BULK).size(availableProcessors).queueSize(50));
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.GET).size(availableProcessors).queueSize(1000)); add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.GET).size(availableProcessors).queueSize(1000));
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.SEARCH).size(((availableProcessors * 3) / 2) + 1).queueSize(1000)); add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.SEARCH).size(((availableProcessors * 3) / 2) + 1).queueSize(1000));
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.SUGGEST).size(availableProcessors).queueSize(1000));
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.MANAGEMENT).size(5).keepAlive("5m")); add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.MANAGEMENT).size(5).keepAlive("5m"));
// no queue as this means clients will need to handle rejections on listener queue even if the operation succeeded // no queue as this means clients will need to handle rejections on listener queue even if the operation succeeded
// the assumption here is that the listeners should be very lightweight on the listeners side // the assumption here is that the listeners should be very lightweight on the listeners side

View File

@ -65,7 +65,6 @@ public class ThreadPoolStatsTests extends ESTestCase {
try (BytesStreamOutput os = new BytesStreamOutput()) { try (BytesStreamOutput os = new BytesStreamOutput()) {
List<ThreadPoolStats.Stats> stats = new ArrayList<>(); List<ThreadPoolStats.Stats> stats = new ArrayList<>();
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.SUGGEST, -1, 0, 0, 0, 0, 0L));
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.SEARCH, -1, 0, 0, 0, 0, 0L)); stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.SEARCH, -1, 0, 0, 0, 0, 0L));
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.WARMER, -1, 0, 0, 0, 0, 0L)); stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.WARMER, -1, 0, 0, 0, 0, 0L));
stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.GENERIC, -1, 0, 0, 0, 0, 0L)); stats.add(new ThreadPoolStats.Stats(ThreadPool.Names.GENERIC, -1, 0, 0, 0, 0, 0L));
@ -104,7 +103,6 @@ public class ThreadPoolStatsTests extends ESTestCase {
ThreadPool.Names.GENERIC, ThreadPool.Names.GENERIC,
ThreadPool.Names.SAME, ThreadPool.Names.SAME,
ThreadPool.Names.SEARCH, ThreadPool.Names.SEARCH,
ThreadPool.Names.SUGGEST,
ThreadPool.Names.WARMER)); ThreadPool.Names.WARMER));
} }
} }

View File

@ -71,6 +71,10 @@ type for any thread pool has been removed. It is still possible to adjust
relevant thread pool parameters for each of the thread pools (e.g., depending relevant thread pool parameters for each of the thread pools (e.g., depending
on the thread pool type, `keep_alive`, `queue_size`, etc.). on the thread pool type, `keep_alive`, `queue_size`, etc.).
==== Threadpool settings
The `suggest` threadpool has been removed, now suggest requests use the
`search` threadpool.
==== Analysis settings ==== Analysis settings

View File

@ -19,15 +19,10 @@ There are several thread pools, but the important ones include:
queue_size of `200`. queue_size of `200`.
`search`:: `search`::
For count/search operations. Thread pool type is `fixed` For count/search/suggest operations. Thread pool type is `fixed`
with a size of `int((# of available_processors * 3) / 2) + 1`, with a size of `int((# of available_processors * 3) / 2) + 1`,
queue_size of `1000`. queue_size of `1000`.
`suggest`::
For suggest operations. Thread pool type is `fixed`
with a size of `# of available processors`,
queue_size of `1000`.
`get`:: `get`::
For get operations. Thread pool type is `fixed` For get operations. Thread pool type is `fixed`
with a size of `# of available processors`, with a size of `# of available processors`,

View File

@ -138,16 +138,6 @@
/^ id \s+ snapshot.type \s+ snapshot.active \s+ snapshot.size \s+ snapshot.queue \s+ snapshot.queueSize \s+ snapshot.rejected \s+ snapshot.largest \s+ snapshot.completed \s+ snapshot.min \s+ snapshot.max \s+ snapshot.keepAlive \n /^ id \s+ snapshot.type \s+ snapshot.active \s+ snapshot.size \s+ snapshot.queue \s+ snapshot.queueSize \s+ snapshot.rejected \s+ snapshot.largest \s+ snapshot.completed \s+ snapshot.min \s+ snapshot.max \s+ snapshot.keepAlive \n
(\S+ \s+ (cached|fixed|scaling)? \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d* \s+ \S* \n)+ $/ (\S+ \s+ (cached|fixed|scaling)? \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d* \s+ \S* \n)+ $/
- do:
cat.thread_pool:
h: id,suggest.type,suggest.active,suggest.size,suggest.queue,suggest.queueSize,suggest.rejected,suggest.largest,suggest.completed,suggest.min,suggest.max,suggest.keepAlive
v: true
- match:
$body: |
/^ id \s+ suggest.type \s+ suggest.active \s+ suggest.size \s+ suggest.queue \s+ suggest.queueSize \s+ suggest.rejected \s+ suggest.largest \s+ suggest.completed \s+ suggest.min \s+ suggest.max \s+ suggest.keepAlive \n
(\S+ \s+ (cached|fixed|scaling)? \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d+ \s+ \d+ \s+ \d+ \s+ \d* \s+ \d* \s+ \S* \n)+ $/
- do: - do:
cat.thread_pool: cat.thread_pool:
h: id,warmer.type,warmer.active,warmer.size,warmer.queue,warmer.queueSize,warmer.rejected,warmer.largest,warmer.completed,warmer.min,warmer.max,warmer.keepAlive h: id,warmer.type,warmer.active,warmer.size,warmer.queue,warmer.queueSize,warmer.rejected,warmer.largest,warmer.completed,warmer.min,warmer.max,warmer.keepAlive