[PATCH RFC 0/11] ulogd2 db rework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux