fix(stream): limit the available threads for stream processing.
This commit is contained in:
parent
556baed25d
commit
83950025e5
|
@ -58,7 +58,7 @@ int32_t tsNumOfMnodeQueryThreads = 4;
|
||||||
int32_t tsNumOfMnodeFetchThreads = 1;
|
int32_t tsNumOfMnodeFetchThreads = 1;
|
||||||
int32_t tsNumOfMnodeReadThreads = 1;
|
int32_t tsNumOfMnodeReadThreads = 1;
|
||||||
int32_t tsNumOfVnodeQueryThreads = 4;
|
int32_t tsNumOfVnodeQueryThreads = 4;
|
||||||
float tsRatioOfVnodeStreamThreads = 1.0;
|
float tsRatioOfVnodeStreamThreads = 0.5;
|
||||||
int32_t tsNumOfVnodeFetchThreads = 4;
|
int32_t tsNumOfVnodeFetchThreads = 4;
|
||||||
int32_t tsNumOfVnodeRsmaThreads = 2;
|
int32_t tsNumOfVnodeRsmaThreads = 2;
|
||||||
int32_t tsNumOfQnodeQueryThreads = 4;
|
int32_t tsNumOfQnodeQueryThreads = 4;
|
||||||
|
|
|
@ -221,7 +221,7 @@ STaosQueue *tAutoQWorkerAllocQueue(SAutoQWorkerPool *pool, void *ahandle, FItem
|
||||||
int32_t queueNum = taosGetQueueNumber(pool->qset);
|
int32_t queueNum = taosGetQueueNumber(pool->qset);
|
||||||
int32_t curWorkerNum = taosArrayGetSize(pool->workers);
|
int32_t curWorkerNum = taosArrayGetSize(pool->workers);
|
||||||
int32_t dstWorkerNum = ceilf(queueNum * pool->ratio);
|
int32_t dstWorkerNum = ceilf(queueNum * pool->ratio);
|
||||||
if (dstWorkerNum < 1) dstWorkerNum = 1;
|
if (dstWorkerNum < 2) dstWorkerNum = 2;
|
||||||
|
|
||||||
// spawn a thread to process queue
|
// spawn a thread to process queue
|
||||||
while (curWorkerNum < dstWorkerNum) {
|
while (curWorkerNum < dstWorkerNum) {
|
||||||
|
|
Loading…
Reference in New Issue