From 2b1c117572cc7246057e55263d05499c9291573f Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Tue, 5 Nov 2013 17:57:00 +0100
Subject: doc: clarify lower limit of queue.size parameter
---
doc/queue_parameters.html | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/queue_parameters.html b/doc/queue_parameters.html
index f2af7598..49efb5d7 100644
--- a/doc/queue_parameters.html
+++ b/doc/queue_parameters.html
@@ -16,7 +16,11 @@ default values will be used. Thus, the default ruleset has only the default main
queues are not set up by default.
- queue.filename name
- - queue.size number
+ - queue.size number
+ This is the maximum size of the queue in number of messages.
+ Note that setting the queue size to very small values (roughly
+ below 100 messages) is not supported and can lead to
+ unpredictable results.
- queue.dequeuebatchsize number
default 16
- queue.maxdiskspace number
--
cgit v1.2.3
From ed9eb1c813b58e785f576ed858347e4493aa18dd Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Tue, 5 Nov 2013 18:04:24 +0100
Subject: doc: amend queue parameter doc with live web link
---
doc/queue_parameters.html | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/queue_parameters.html b/doc/queue_parameters.html
index 49efb5d7..0237a475 100644
--- a/doc/queue_parameters.html
+++ b/doc/queue_parameters.html
@@ -20,7 +20,10 @@ queues are not set up by default.
This is the maximum size of the queue in number of messages.
Note that setting the queue size to very small values (roughly
below 100 messages) is not supported and can lead to
- unpredictable results.
+ unpredictable results.
+ For more information on the current status of this restriction
+ see the rsyslog
+ FAQ: "lower bound for queue sizes".
- queue.dequeuebatchsize number
default 16
- queue.maxdiskspace number
--
cgit v1.2.3
From a056dad8b359ebab1c34c94b763b5519b066cb76 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Tue, 5 Nov 2013 18:13:02 +0100
Subject: emit warning message if queue.size is set dangerously low
---
runtime/queue.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/runtime/queue.c b/runtime/queue.c
index 935a8106..3834343c 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2084,6 +2084,13 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
break;
}
+ 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);
+ }
+
if(pThis->iFullDlyMrk == -1)
pThis->iFullDlyMrk = pThis->iMaxQueueSize
- (pThis->iMaxQueueSize / 100) * 3; /* default 97% */
--
cgit v1.2.3
From 7906ee389c270bc96cfdf261c348c57b6dd33cb3 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Tue, 5 Nov 2013 18:22:21 +0100
Subject: improved checking of queue config parameters on startup
---
ChangeLog | 1 +
runtime/queue.c | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 97ea6f5a..41128c12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
Version 7.4.7 [v7.4-stable] 2013-11-??
+- improved checking of queue config parameters on startup
- bugfix: call to ruleset with async queue did not use the queue
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=443
---------------------------------------------------------------------------
diff --git a/runtime/queue.c b/runtime/queue.c
index 3834343c..409424e7 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -2091,16 +2091,17 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */
pThis->iMaxQueueSize);
}
- if(pThis->iFullDlyMrk == -1)
+ /* 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 ()
--
cgit v1.2.3