All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf v2] netfilter: conntrack: refine gc worker heuristics
Date: Thu, 3 Nov 2016 17:31:33 +0100	[thread overview]
Message-ID: <20161103163133.GA26355@breakpoint.cc> (raw)
In-Reply-To: <9b8a1258-1ecd-daf8-ffd2-1acc70e2ebbb@6wind.com>

Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> >  Change since v1: use system_long_wq instead of normal system wq (suggested by
> >  Eric Dumazet).
> > 
> >  Nicholas is currently away; I would like to get his feedback on this one
> >  before it gets applied.
> Thank you for the update.
> With that patch, some events still have a delay > 2 minutes, which I think is
> too much.

Too bad, in my tests it was < 1 minute.

> If I'm not wrong, the worst delay with this patch is:
> 10 (GC_INTERVAL_MAX) + 0,001 + 5,001 + 5,002 + 5,003 + ... +  6,024 (= 5 secs +
> 1024 mecs)

Worst case is over 3 hours (assuming no eviction happened at all and we
have one stale entry that needs the full scan).

> Previously (in private discussions), you propose a algorithm which guarantee a
> full table scan in a predefined delay. A "good" solution may have such guarantee.

Now that this uses system_long_wq prolonged a long scan time might not
be that bad anymore, so we might consider lowering the divisor and/or the
max interval.

However, I will not send a new iteration of this change since I don't
know how to test this.  Its easy to make the delay low, but it will come
at additonal cpu cost.  I have no idea where to make the tradeoff.

Do you have a better idea?

  reply	other threads:[~2016-11-03 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 23:04 [PATCH nf v2] netfilter: conntrack: refine gc worker heuristics Florian Westphal
2016-11-03 16:03 ` Nicolas Dichtel
2016-11-03 16:31   ` Florian Westphal [this message]
2016-11-03 16:57     ` Nicolas Dichtel
2016-11-04  9:07       ` Florian Westphal

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=20161103163133.GA26355@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    /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.