mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 07:20:41 +01:00
queue.workerThreadMinimumMessage set to queue.size / num workers
This commit is contained in:
parent
020fe0dcc4
commit
98e5663055
@ -3,6 +3,7 @@ Version 7.5.7 [v7-devel] 2013-11-??
|
||||
- queue defaults have changed
|
||||
* high water mark is now dynamically 90% of queue size
|
||||
* low water makr is now dynamically 70% of queue size
|
||||
* queue.workerThreadMinimumMessage set to queue.size / num workers
|
||||
- bugfix: legacy directive $ActionQueueWorkerThreads was not honored
|
||||
- bugfix: segfault on startup when certain script constructs are used
|
||||
e.g. "if not $msg ..."
|
||||
|
||||
2
action.c
2
action.c
@ -266,7 +266,7 @@ actionResetQueueParams(void)
|
||||
cs.iActionQtoActShutdown = 1000; /* action shutdown (in phase 2) */
|
||||
cs.iActionQtoEnq = 50; /* timeout for queue enque */
|
||||
cs.iActionQtoWrkShutdown = 60000; /* timeout for worker thread shutdown */
|
||||
cs.iActionQWrkMinMsgs = 100; /* minimum messages per worker needed to start a new one */
|
||||
cs.iActionQWrkMinMsgs = -1; /* minimum messages per worker needed to start a new one */
|
||||
cs.bActionQSaveOnShutdown = 1; /* save queue on shutdown (when DA enabled)? */
|
||||
cs.iActionQueMaxDiskSpace = 0;
|
||||
cs.iActionQueueDeqSlowdown = 0;
|
||||
|
||||
@ -1385,7 +1385,7 @@ qqueueSetDefaultsActionQueue(qqueue_t *pThis)
|
||||
pThis->toActShutdown = 1000; /* action shutdown (in phase 2) */
|
||||
pThis->toEnq = 2000; /* timeout for queue enque */
|
||||
pThis->toWrkShutdown = 60000; /* timeout for worker thread shutdown */
|
||||
pThis->iMinMsgsPerWrkr = 100; /* minimum messages per worker needed to start a new one */
|
||||
pThis->iMinMsgsPerWrkr = -1; /* minimum messages per worker needed to start a new one */
|
||||
pThis->bSaveOnShutdown = 1; /* save queue on shutdown (when DA enabled)? */
|
||||
pThis->sizeOnDiskMax = 0; /* unlimited */
|
||||
pThis->iDeqSlowdown = 0;
|
||||
@ -1415,7 +1415,7 @@ qqueueSetDefaultsRulesetQueue(qqueue_t *pThis)
|
||||
pThis->toActShutdown = 1000; /* action shutdown (in phase 2) */
|
||||
pThis->toEnq = 2000; /* timeout for queue enque */
|
||||
pThis->toWrkShutdown = 60000; /* timeout for worker thread shutdown */
|
||||
pThis->iMinMsgsPerWrkr = 1000; /* minimum messages per worker needed to start a new one */
|
||||
pThis->iMinMsgsPerWrkr = -1; /* minimum messages per worker needed to start a new one */
|
||||
pThis->bSaveOnShutdown = 1; /* save queue on shutdown (when DA enabled)? */
|
||||
pThis->sizeOnDiskMax = 0; /* unlimited */
|
||||
pThis->iDeqSlowdown = 0;
|
||||
@ -2124,12 +2124,28 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
|
||||
obj.GetName((obj_t*) pThis), pThis->iHighWtrMrk, goodval);
|
||||
}
|
||||
|
||||
if(pThis->iNumWorkerThreads > 1) {
|
||||
goodval = (pThis->iMaxQueueSize / 100) * 10;
|
||||
if(pThis->iMinMsgsPerWrkr != -1 && pThis->iMinMsgsPerWrkr < goodval) {
|
||||
errmsg.LogError(0, RS_RET_CONF_PARSE_WARNING, "queue \"%s\": "
|
||||
"queue.workerThreadMinimumMessage "
|
||||
"is set quite low at %d. You should only set it below "
|
||||
"10%% (%d) if you have a good reason for this.",
|
||||
obj.GetName((obj_t*) pThis), pThis->iMinMsgsPerWrkr, goodval);
|
||||
}
|
||||
}
|
||||
|
||||
if(pThis->iHighWtrMrk < 2 || pThis->iHighWtrMrk > pThis->iMaxQueueSize)
|
||||
pThis->iHighWtrMrk = (pThis->iMaxQueueSize / 100) * 90;
|
||||
if( pThis->iLowWtrMrk < 2
|
||||
|| pThis->iLowWtrMrk > pThis->iMaxQueueSize
|
||||
|| pThis->iLowWtrMrk > pThis->iHighWtrMrk )
|
||||
pThis->iLowWtrMrk = (pThis->iMaxQueueSize / 100) * 70;
|
||||
if(pThis->iNumWorkerThreads > 1) {
|
||||
if( pThis->iMinMsgsPerWrkr < 1
|
||||
|| pThis->iMinMsgsPerWrkr > pThis->iMaxQueueSize )
|
||||
pThis->iMinMsgsPerWrkr = pThis->iMaxQueueSize / pThis->iNumWorkerThreads;
|
||||
}
|
||||
if(pThis->iFullDlyMrk == -1 || pThis->iFullDlyMrk > pThis->iMaxQueueSize)
|
||||
pThis->iFullDlyMrk = (pThis->iMaxQueueSize / 100) * 97;
|
||||
if(pThis->iLightDlyMrk == -1 || pThis->iLightDlyMrk > pThis->iMaxQueueSize)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user