mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-29 04:57:48 +01:00
Server: tx thread count depends on cpu
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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(() -> {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user