mirror of https://github.com/apache/druid.git
more sensible defaults for single core machines
This commit is contained in:
parent
89dd0ee29c
commit
ee97fb98bc
|
@ -31,4 +31,12 @@ public abstract class DruidProcessingConfig extends ExecutorServiceConfig
|
||||||
{
|
{
|
||||||
return 1024 * 1024 * 1024;
|
return 1024 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override @Config(value = "${base_path}.numThreads")
|
||||||
|
public int getNumThreads()
|
||||||
|
{
|
||||||
|
// default to leaving one core for background tasks
|
||||||
|
final int processors = Runtime.getRuntime().availableProcessors();
|
||||||
|
return processors > 1 ? processors - 1 : processors;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue