mirror of https://gitee.com/bigwinds/arangodb
use some parallelism
This commit is contained in:
parent
7aac7de2e4
commit
b64645e83b
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
#include <rocksdb/options.h>
|
#include <rocksdb/options.h>
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
using namespace arangodb;
|
using namespace arangodb;
|
||||||
using namespace arangodb::application_features;
|
using namespace arangodb::application_features;
|
||||||
using namespace arangodb::options;
|
using namespace arangodb::options;
|
||||||
|
@ -71,9 +73,15 @@ RocksDBOptionFeature::RocksDBOptionFeature(
|
||||||
_useDirectWrites(rocksDBDefaults.use_direct_writes),
|
_useDirectWrites(rocksDBDefaults.use_direct_writes),
|
||||||
_useFSync(rocksDBDefaults.use_fsync),
|
_useFSync(rocksDBDefaults.use_fsync),
|
||||||
_skipCorrupted(false) {
|
_skipCorrupted(false) {
|
||||||
|
|
||||||
setOptional(true);
|
setOptional(true);
|
||||||
requiresElevatedPrivileges(false);
|
requiresElevatedPrivileges(false);
|
||||||
startsAfter("DatabasePath");
|
startsAfter("DatabasePath");
|
||||||
|
|
||||||
|
// increase parallelism and re-fetch the number of threads
|
||||||
|
rocksDBDefaults.IncreaseParallelism(std::thread::hardware_concurrency());
|
||||||
|
_numThreadsHigh = rocksDBDefaults.max_background_flushes;
|
||||||
|
_numThreadsLow = rocksDBDefaults.max_background_compactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RocksDBOptionFeature::collectOptions(
|
void RocksDBOptionFeature::collectOptions(
|
||||||
|
|
Loading…
Reference in New Issue