diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-07-19 15:28:34 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-07-19 15:28:34 +0200 |
commit | 651794575c844fe25a717d77bd088c51383067f0 (patch) | |
tree | d4dd79f189ebdb933266d354aa66f42b7571f4b4 /src/read_config_yy.y | |
parent | a1d03b775376aa8545ec9a0e89381b659e4d28ed (diff) | |
download | conntrack-tools-651794575c844fe25a717d77bd088c51383067f0.tar.gz conntrack-tools-651794575c844fe25a717d77bd088c51383067f0.zip |
conntrackd: rework commit not to fork a child process
This patch reworks the commit phase to avoid the forking. This is
particularly useful in active-active setups in which one node
has to commit the external cache while it is receiving new entries
to be added in the external cache. This results in really high
commit times due to the penalty of the copy-on-write that fork
performs.
The default number of steps in one run loop is limited to 64 by now.
No option to tune this parameter is still available via the
configuration file.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/read_config_yy.y')
-rw-r--r-- | src/read_config_yy.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/read_config_yy.y b/src/read_config_yy.y index cab7799..0e9b99b 100644 --- a/src/read_config_yy.y +++ b/src/read_config_yy.y @@ -1379,6 +1379,11 @@ init_config(char *filename) if (CONFIG(event_iterations_limit) == 0) CONFIG(event_iterations_limit) = 100; + /* default number of bucket of the hashtable that are committed in + one run loop. XXX: no option available to tune this value yet. */ + if (CONFIG(general).commit_steps == 0) + CONFIG(general).commit_steps = 64; + /* if overrun, automatically resync with kernel after 30 seconds */ if (CONFIG(nl_overrun_resync) == 0) CONFIG(nl_overrun_resync) = 30; |