adjust some parameter for efficiency
This commit is contained in:
parent
449d667647
commit
02f97ece32
|
@ -293,7 +293,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
|
||||||
|
|
||||||
#define TSDB_MIN_TOTAL_BLOCKS 2
|
#define TSDB_MIN_TOTAL_BLOCKS 2
|
||||||
#define TSDB_MAX_TOTAL_BLOCKS 10000
|
#define TSDB_MAX_TOTAL_BLOCKS 10000
|
||||||
#define TSDB_DEFAULT_TOTAL_BLOCKS 4
|
#define TSDB_DEFAULT_TOTAL_BLOCKS 6
|
||||||
|
|
||||||
#define TSDB_MIN_TABLES 4
|
#define TSDB_MIN_TABLES 4
|
||||||
#define TSDB_MAX_TABLES 10000000
|
#define TSDB_MAX_TABLES 10000000
|
||||||
|
|
|
@ -172,7 +172,7 @@ void *tsdbAllocBytes(STsdbRepo *pRepo, int bytes) {
|
||||||
STsdbBufBlock *pBufBlock = tsdbGetCurrBufBlock(pRepo);
|
STsdbBufBlock *pBufBlock = tsdbGetCurrBufBlock(pRepo);
|
||||||
|
|
||||||
if (pBufBlock != NULL && pBufBlock->remain < bytes) {
|
if (pBufBlock != NULL && pBufBlock->remain < bytes) {
|
||||||
if (listNEles(pRepo->mem->bufBlockList) >= pCfg->totalBlocks / 2) { // need to commit mem
|
if (listNEles(pRepo->mem->bufBlockList) >= pCfg->totalBlocks / 3) { // need to commit mem
|
||||||
if (tsdbAsyncCommit(pRepo) < 0) return NULL;
|
if (tsdbAsyncCommit(pRepo) < 0) return NULL;
|
||||||
} else {
|
} else {
|
||||||
if (tsdbLockRepo(pRepo) < 0) return NULL;
|
if (tsdbLockRepo(pRepo) < 0) return NULL;
|
||||||
|
|
Loading…
Reference in New Issue