All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jean-Michel Hemstedt" <jean-michel.hemstedt@alcatel.be>
To: <netfilter-devel@lists.samba.org>
Cc: "Harald Welte" <laforge@gnumonks.org>
Subject: Re: performance issues (nat / conntrack)
Date: Tue, 25 Jun 2002 23:47:12 +0200	[thread overview]
Message-ID: <046a01c21c91$dd980b80$0489cb8a@etbx180> (raw)
In-Reply-To: 15640.41407.432907.402311@isis.cs3-inc.com

> But I believe that conntrack is exactly what's causing the load. If
> the machine is busy creating connections then it's clearly going to
> lose packets.  I imagine that the packets that are dropped are those
> arriving at full queues.  So fin's and rst's could very well be
> dropped if they arrive on interfaces that are receiving lots of other
> stuff while the cpu is busy building conntrack records.

agreed.

(strange thing is that ethernet irq's reported by procinfo are 
 decreasing when the machine is overloaded. It suppose that it 
 means either that irq's are not even caught by the kernel/driver, 
 which is quite worrying, or either that irq's counters refer to 
 'processessed' interrupts)

> Not true.  See my proposed bucket size limit.  I hope to find some
> formulae to post on this later.

longing to see that.

> I suspect the hash function is fine.  I propose to insert code that
> does printk whenever a bucket size exceeds some threshold and then
> invite all the readers of this list to try it and report their
> results.

I would rather go for global stats reported periodically, so that we 
have a constant measure (counters update) overhead.

> I think what happens is that it's not hash collisions but conntrack
> record creation that takes a long time, and that pretty much all
> packets are likely to be lost when the cpu is saturated with that
> activity.  In that case it's true that connections are not garbage
> collected as fast as they should be.

Since the difference between entry creation and entry lookup is only
a call to init_conntrack(), profiling will be welcome, because as far 
as the slab allocator is concerned, at constant speed, the system should
not do any costly alloc() anymore and instead dig into the slab' freelist.
A lock problem somewhere, or a lack of inlines?

same thing for nat I suppose

Harld: could you ask to your kernel specialist what is the weakpoint of
kmem_cache_alloc()? (locks, allocs, ...), and how we could possibly
improve it (batch alloc, but isn't it already the case?)

PS: Harald
> I've recently did some testing which try to avoid the null binding, but 
> as I'm not entirely sure they don't break something else I haven't been
> releasing them yet.

I would be glad to test it at the same time. I'll come back to you when 
ready for testings. But I've no SMP system.

> I've been talking about this with a couple of people here at the kernel
> summit, and it looks like the per-packet del_timer/add_timer in
> ip_ct_refresh should be a severe performance hit on SMP boxes.

Any indications that it would not be the same on non SMP boxes? 

> Changing this to 'do not update timer if update would be < HZ different
> than current timer' is a two-line patch.  

I've seen that discussion, but not the patch. (I'll come back to you)

--
-jmhe-

  reply	other threads:[~2002-06-25 21:47 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020625151007.980D14140@lists.samba.org>
2002-06-25 17:00 ` performance issues (nat / conntrack) Don Cohen
2002-06-25 21:47   ` Jean-Michel Hemstedt [this message]
2002-06-26 14:50     ` Harald Welte
2002-06-26 18:04       ` Jean-Michel Hemstedt
     [not found] <20020623132739.12D52455E@lists.samba.org>
2002-06-24  4:46 ` Don Cohen
2002-06-24  6:06   ` Patrick Schaaf
     [not found]     ` <15638.48245.84830.480715@isis.cs3-inc.com>
2002-06-24  6:48       ` Patrick Schaaf
2002-06-24  6:54         ` Don Cohen
2002-06-24  7:13           ` Patrick Schaaf
2002-06-24 15:18             ` Don Cohen
2002-06-25  2:44               ` Harald Welte
     [not found] <20020621132640.2C326472B@lists.samba.org>
2002-06-21 17:35 ` Don Cohen
2002-06-21 18:26   ` Jean-Michel Hemstedt
2002-06-23  9:14   ` Jean-Michel Hemstedt
2002-06-25 10:38     ` Jozsef Kadlecsik
2002-06-25 11:11       ` Jean-Michel Hemstedt
2002-06-25 11:48         ` Jozsef Kadlecsik
2002-06-20 19:48 Jean-Michel Hemstedt
2002-06-22 16:51 ` Harald Welte
2002-06-23  9:15   ` Jean-Michel Hemstedt
2002-06-25 11:33     ` Jozsef Kadlecsik
2002-06-25 12:47       ` Harald Welte
2002-06-25 14:23         ` Jozsef Kadlecsik
     [not found]         ` <025001c21c50$763fa880$0489cb8a@etbx180>
2002-06-25 16:07           ` Harald Welte
2002-06-25 21:08         ` Jozsef Kadlecsik
2002-06-25 13:21       ` Jean-Michel Hemstedt
2002-06-25 13:51         ` Harald Welte
2002-06-25 14:33           ` Jozsef Kadlecsik
2002-06-25 14:51           ` Jean-Michel Hemstedt
2002-06-25 16:11             ` Harald Welte
2002-06-25 13:52         ` Patrick Schaaf
2002-06-25 14:53         ` Jozsef Kadlecsik
2002-06-25 15:22           ` Balazs Scheidler
2002-06-25 10:35 ` Jozsef Kadlecsik
2002-06-25 12:42   ` Jean-Michel Hemstedt
2002-06-25 13:50     ` Patrick Schaaf
2002-06-25 19:03       ` Harald Welte
2002-06-25 13:56     ` Alex Bennee
2002-06-25 14:17     ` Jozsef Kadlecsik
2002-06-25 15:13       ` Balazs Scheidler
2002-06-25 19:06         ` Harald Welte
2002-06-26  8:18           ` Balazs Scheidler
2002-06-27  2:21       ` Andrew Smith
2002-06-27 11:24         ` Harald Welte
2002-06-29  5:25           ` Andrew Smith
2002-06-25 19:01     ` Harald Welte

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='046a01c21c91$dd980b80$0489cb8a@etbx180' \
    --to=jean-michel.hemstedt@alcatel.be \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.samba.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.