summaryrefslogtreecommitdiffstats
path: root/ulogd.conf.in
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2013-04-20 12:44:17 +0200
committerEric Leblond <eric@regit.org>2013-05-21 19:57:02 +0200
commitbc817c2077ddfb37041a20cf7c71bc71b4d56003 (patch)
treed840879a6649955ab00ec76bd880c7920f69c651 /ulogd.conf.in
parent1d84cdeaa56fe003c4beb0452c8bc476ecfd75a8 (diff)
db: add ring buffer for DB query
This patch adds an optional ring buffer option which modify the way database queries are made. The main thread is only handling kernel message reading and query formatting. The SQL request is made in a separate dedicated thread. The idea is to try to avoid buffer overrun by minimizing the time requested to treat kernel message. Doing synchronous SQL request, as it was made before was causing a delay which could cause some messages to be lost in case of burst from kernel side.
Diffstat (limited to 'ulogd.conf.in')
-rw-r--r--ulogd.conf.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/ulogd.conf.in b/ulogd.conf.in
index 3e5e648..11a56d6 100644
--- a/ulogd.conf.in
+++ b/ulogd.conf.in
@@ -233,6 +233,10 @@ pass="changeme"
procedure="INSERT_PACKET_FULL"
#backlog_memcap=1000000
#backlog_oneshot_requests=10
+# If superior to 1 a thread dedicated to SQL request execution
+# is created. The value stores the number of SQL request to keep
+# in the ring buffer
+#ring_buffer_size=1000
[pgsql2]
db="nulog"