Warmers: Have an explicit warmer thread pool

add 1 in case there is 1 core...
closes #2815
This commit is contained in:
Shay Banon 2013-03-25 23:34:44 +01:00
parent aa97c031f2
commit d35a3b03c8
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public class ThreadPool extends AbstractComponent {
.put(Names.FLUSH, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 10).build())
.put(Names.MERGE, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 20).build())
.put(Names.REFRESH, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 10).build())
.put(Names.WARMER, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", Math.min(Runtime.getRuntime().availableProcessors() / 2, 5)).build())
.put(Names.WARMER, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", Math.min(((Runtime.getRuntime().availableProcessors() + 1) / 2), 5)).build())
.put(Names.CACHE, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 4).build())
.put(Names.SNAPSHOT, settingsBuilder().put("type", "scaling").put("keep_alive", "5m").put("size", 5).build())
.build();