Server: tx thread count depends on cpu

This commit is contained in:
2024-10-12 14:04:14 +02:00
parent d43a76da3e
commit 8dc16e672a
3 changed files with 3 additions and 4 deletions

View File

@@ -48,8 +48,7 @@ public class JObjectTxManager {
.namingPattern("tx-serializer-%d")
.build();
// FIXME:
_serializerThreads = Executors.newFixedThreadPool(16, factory);
_serializerThreads = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), factory);
}
public void begin() {

View File

@@ -58,7 +58,7 @@ public class TxWritebackImpl implements TxWriteback {
.namingPattern("writeback-commit-%d")
.build();
_commitExecutor = Executors.newFixedThreadPool(8, factory);
_commitExecutor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), factory);
}
_statusExecutor = Executors.newSingleThreadExecutor();
_statusExecutor.submit(() -> {

View File

@@ -80,7 +80,7 @@ public class FileObjectPersistentStore implements ObjectPersistentStore {
.namingPattern("persistent-commit-%d")
.build();
_flushExecutor = Executors.newFixedThreadPool(8, factory);
_flushExecutor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), factory);
}
tryReplay();