All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/11] ulogd2 db rework
@ 2013-05-10  6:48 Eric Leblond
  2013-05-10  6:48 ` [PATCH 01/11] ulogd: display stack during configuration Eric Leblond
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Eric Leblond @ 2013-05-10  6:48 UTC (permalink / raw)
  To: netfilter-devel


Hello,

Here's a patchset for ulogd which is aiming at improving the way
databases are handled. It features two different parts:
 - a backlog system (patch 06) which allow queries to be store in
 memory when the database is not available. Data loss is prevented
 in this case (in the limit of the defined memcap)
 - a multithreaded ulogd db output (patch 09) with one thread getting
 messages from kernel and an other one dedicated to the SQL queries
 execution.

The backlog system prevent data loss and only cost memory when the
database is down. The multithreaded db output uses a ring buffer
(which cost memory) for communication between the two threads.

The idea behind the multithreaded db output is to almost fix the time
needed to read a kernel message. Doing this, ulogd should be more
resistant to burst of kernel messages as kernel-user buffer will not
be filled due to the high treatment time needed to execute SQL query.

Both features are modifying the generic db system inside ulogd. So the
modification is available in pgsql, mysql and dbi output. It has for
now only been tested on pgsql.

Comments, feedbacks and test results are more than welcome on both
these features.

Patchset statistics:

 configure.ac                          |   32 ++-
 include/ulogd/db.h                    |   67 +++++-
 output/mysql/ulogd_output_MYSQL.c     |    4 +-
 output/pgsql/ulogd_output_PGSQL.c     |    4 +-
 output/sqlite3/ulogd_output_SQLITE3.c |    2 +
 src/Makefile.am                       |    2 +-
 src/ulogd.c                           |    2 +-
 ulogd.conf.in                         |   13 ++
 util/db.c                             |  371 +++++++++++++++++++++++++++------
 9 files changed, 417 insertions(+), 80 deletions(-)

BR,
--
Eric Leblond <eric@regit.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-05-21 13:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10  6:48 [PATCH RFC 0/11] ulogd2 db rework Eric Leblond
2013-05-10  6:48 ` [PATCH 01/11] ulogd: display stack during configuration Eric Leblond
2013-05-10  6:48 ` [PATCH 02/11] Fix automagic support of dbi, pcap and sqlite3 Eric Leblond
2013-05-10  6:48 ` [PATCH 03/11] postgresql: add sanity checking Eric Leblond
2013-05-10  6:48 ` [PATCH 04/11] mysql: " Eric Leblond
2013-05-10  6:48 ` [PATCH 05/11] sqlite3: " Eric Leblond
2013-05-10  6:48 ` [PATCH 06/11] db: store data in memory during database downtime Eric Leblond
2013-05-10  6:48 ` [PATCH 07/11] db: suppress field in db structure Eric Leblond
2013-05-10  6:48 ` [PATCH 08/11] db: use offset instead of direct pointer Eric Leblond
2013-05-10  6:48 ` [PATCH 09/11] db: add ring buffer for DB query Eric Leblond
2013-05-11 19:29   ` Pablo Neira Ayuso
2013-05-12 10:29     ` Eric Leblond
2013-05-21 13:38       ` Pablo Neira Ayuso
2013-05-10  6:48 ` [PATCH 10/11] db: disable SIGHUP if ring buffer is used Eric Leblond
2013-05-10  6:48 ` [PATCH 11/11] db: db ring has precedence over backlog Eric Leblond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.