If we have multiple cores, leave one free from crypto tasks.

parent d381e25e
......@@ -39,7 +39,7 @@ public class CryptoModule {
* The maximum number of executor threads.
*/
private static final int MAX_EXECUTOR_THREADS =
Runtime.getRuntime().availableProcessors();
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
private final ExecutorService cryptoExecutor;
......
......@@ -36,7 +36,7 @@ public class SyncModule {
* executor concurrently.
*/
private static final int MAX_CONCURRENT_VALIDATION_TASKS =
Runtime.getRuntime().availableProcessors();
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
@Provides
GroupFactory provideGroupFactory(CryptoComponent crypto) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment