This commit is contained in:
Andrea Cavalli 2021-06-27 16:33:23 +02:00
parent e3536cfd01
commit c9e9cb8a01

View File

@ -105,9 +105,10 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
int threadCap;
if (databaseOptions.lowMemory()) {
threadCap = Math.max(8, Runtime.getRuntime().availableProcessors());
} else {
threadCap = Runtime.getRuntime().availableProcessors();
} else {
// 8 or more
threadCap = Math.max(8, Runtime.getRuntime().availableProcessors());
}
this.dbScheduler = Schedulers.newBoundedElastic(threadCap,
Schedulers.DEFAULT_BOUNDED_ELASTIC_QUEUESIZE,