summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-05 18:23:02 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-05 18:23:02 +0100
commit86589acdf9cab8f6b068eccc1d17b2e8412eec88 (patch)
tree674f5541fbb48979a4a6fc89724a413301beb817 /runtime/queue.c
parent962656afab5954259199e278aba0518fbedef89b (diff)
parent80a4feb542e15b2fe100f88690000789eab562bb (diff)
downloadrsyslog-86589acdf9cab8f6b068eccc1d17b2e8412eec88.tar.gz
rsyslog-86589acdf9cab8f6b068eccc1d17b2e8412eec88.tar.bz2
rsyslog-86589acdf9cab8f6b068eccc1d17b2e8412eec88.zip
Merge branch 'master-ruleeng' into master-ruleeng-simd
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index db205fed..989b29ca 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2095,16 +2095,24 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
break;
}
- if(pThis->iFullDlyMrk == -1)
+ if(pThis->iMaxQueueSize < 100) {
+ errmsg.LogError(0, RS_RET_OK_WARN, "Note: queue.size=\"%d\" is very "
+ "low and can lead to unpredictable results. See also "
+ "http://www.rsyslog.com/lower-bound-for-queue-sizes/",
+ pThis->iMaxQueueSize);
+ }
+
+ /* we need to do a quick check if our water marks are set plausible. If not,
+ * we correct the most important shortcomings.
+ */
+ if(pThis->iFullDlyMrk == -1 || pThis->iFullDlyMrk > pThis->iMaxQueueSize)
pThis->iFullDlyMrk = pThis->iMaxQueueSize
- (pThis->iMaxQueueSize / 100) * 3; /* default 97% */
- if(pThis->iLightDlyMrk == -1)
+ if(pThis->iLightDlyMrk == -1 || pThis->iLightDlyMrk > pThis->iMaxQueueSize)
pThis->iLightDlyMrk = pThis->iMaxQueueSize
- (pThis->iMaxQueueSize / 100) * 30; /* default 70% */
-
- /* we need to do a quick check if our water marks are set plausible. If not,
- * we correct the most important shortcomings. TODO: do that!!!! -- rgerhards, 2008-03-14
- */
+ if(pThis->iDeqBatchSize > pThis->iMaxQueueSize)
+ pThis->iDeqBatchSize = pThis->iMaxQueueSize;
/* finalize some initializations that could not yet be done because it is
* influenced by properties which might have been set after queueConstruct ()