Add dedicated Suggest Thread Pool
Add a dedicated suggest thread pool for the suggest API. With the new completion suggest type, which is purely CPU bounded, it makes more sense to have a dedicated thread pool for suggest compared to having it share the search thread pool and "competing" against other search operations. closes #3698
This commit is contained in:
parent
4a97af3cd4
commit
20745adadd
|
@ -14,6 +14,10 @@ pools, but the important ones include:
|
|||
For count/search operations, defaults to `fixed`,
|
||||
size `3x # of available processors`.
|
||||
|
||||
`suggest`::
|
||||
For suggest operations, defaults to `fixed`,
|
||||
size `# of available processors`.
|
||||
|
||||
`get`::
|
||||
For get operations, defaults to `fixed`
|
||||
size `# of available processors`.
|
||||
|
|
|
@ -73,7 +73,7 @@ public class TransportSuggestAction extends TransportBroadcastOperationAction<Su
|
|||
|
||||
@Override
|
||||
protected String executor() {
|
||||
return ThreadPool.Names.SEARCH;
|
||||
return ThreadPool.Names.SUGGEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -67,6 +67,7 @@ public class ThreadPool extends AbstractComponent {
|
|||
public static final String INDEX = "index";
|
||||
public static final String BULK = "bulk";
|
||||
public static final String SEARCH = "search";
|
||||
public static final String SUGGEST = "suggest";
|
||||
public static final String PERCOLATE = "percolate";
|
||||
public static final String MANAGEMENT = "management";
|
||||
public static final String FLUSH = "flush";
|
||||
|
@ -108,6 +109,7 @@ public class ThreadPool extends AbstractComponent {
|
|||
.put(Names.BULK, settingsBuilder().put("type", "fixed").put("size", availableProcessors).build())
|
||||
.put(Names.GET, settingsBuilder().put("type", "fixed").put("size", availableProcessors).build())
|
||||
.put(Names.SEARCH, settingsBuilder().put("type", "fixed").put("size", availableProcessors * 3).put("queue_size", 1000).build())
|
||||
.put(Names.SUGGEST, settingsBuilder().put("type", "fixed").put("size", availableProcessors).put("queue_size", 1000).build())
|
||||
.put(Names.PERCOLATE, settingsBuilder().put("type", "fixed").put("size", availableProcessors).put("queue_size", 1000).build())
|
||||
.put(Names.MANAGEMENT, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 5).build())
|
||||
.put(Names.FLUSH, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", halfProcMaxAt5).build())
|
||||
|
|
Loading…
Reference in New Issue