All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo@debian.org>
Cc: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Subject: Re: [conntrack-tools PATCH 4/4] conntrackd: introduce RequestResync option
Date: Mon, 1 May 2017 11:13:19 +0200	[thread overview]
Message-ID: <20170501091319.GA2925@salvia> (raw)
In-Reply-To: <CAOkSjBj3wqnCVMAfMek3NKbgbo35EjMQ842gOzgOpmH=qBu=6g@mail.gmail.com>

On Wed, Apr 26, 2017 at 01:32:38PM +0200, Arturo Borrero Gonzalez wrote:
> On 25 April 2017 at 15:18, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> >>
> >> Yes. The timer based approach is... timer based (async).
> >>
> >> It doesn't fit in an environment where you need to sync events as soon
> >> as they happen.
> >
> > IIRC the timer based works like this:
> >
> > 1) If event occurs, sync message is send.
> > 2) After some time, we send a message to tell the other peer the entry
> >    is still there.
> > 3) If no message is received, then the entry expires.
> >
> 
> the ALARM mode requires to commit the external cache instead of the
> conns being directly injected into the kernel.

You may want to disable the external cache with the alarm mode. The
alarm mode only needs the internal cache though, but that shouldn't be
much of a problem.

With the alarm mode, you will skip spikes in CPU consumption since
resync is expensive.  With a very large table, this results in some
sort of lazy busy polling.

> I think the new RequestResync method (or whatever other alternative)
> provides a good tradeoff between methods and increases general
> usefulness of conntrackd.

I'm trying to help here if I can give something better ;-)

Look, you should at least combine this new RequestResync with
CommitTimeout. Even if you don't explicitly request a commit command,
this sets the timeout for the entries that are pushed into the kernel.

So, if you set:

        RequestResync 30
        CommitTimeout 180

connections we don't get any information from for 180 seconds will
expire.

BTW, how are you measuring this improvement? Is that you get less logs
error messages that you reported before or so?

Thanks!

  reply	other threads:[~2017-05-01  9:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 17:28 [conntrack-tools PATCH 1/4] conntrackd: factorice tx_queue functions Arturo Borrero Gonzalez
2017-04-20 17:28 ` [conntrack-tools PATCH 2/4] conntrackd: warn users about queue allocation errors Arturo Borrero Gonzalez
2017-04-25 11:34   ` Pablo Neira Ayuso
2017-04-25 12:40     ` Arturo Borrero Gonzalez
2017-04-25 13:16       ` Pablo Neira Ayuso
2017-05-02  8:34         ` Arturo Borrero Gonzalez
2017-05-02 10:03           ` Pablo Neira Ayuso
2017-05-02 10:09           ` Pablo Neira Ayuso
2017-04-20 17:28 ` [conntrack-tools PATCH 3/4] conntrackd: factorize resync operations Arturo Borrero Gonzalez
2017-05-08 17:52   ` Pablo Neira Ayuso
2017-04-20 17:28 ` [conntrack-tools PATCH 4/4] conntrackd: introduce RequestResync option Arturo Borrero Gonzalez
2017-04-25 11:37   ` Pablo Neira Ayuso
2017-04-25 12:46     ` Arturo Borrero Gonzalez
2017-04-25 13:18       ` Pablo Neira Ayuso
2017-04-26 11:32         ` Arturo Borrero Gonzalez
2017-05-01  9:13           ` Pablo Neira Ayuso [this message]
2017-05-02  8:18             ` Arturo Borrero Gonzalez
2017-05-08 17:47               ` Pablo Neira Ayuso
2017-05-08 17:52 ` [conntrack-tools PATCH 1/4] conntrackd: factorice tx_queue functions Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2017-04-20 16:40 Arturo Borrero Gonzalez
2017-04-20 16:40 ` [conntrack-tools PATCH 4/4] conntrackd: introduce RequestResync option Arturo Borrero Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170501091319.GA2925@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo@debian.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.