[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF909C1D50.039CA234-ONC1257583.004A94AC-C1257583.004B3666@transmode.se>
Date: Tue, 24 Mar 2009 14:41:32 +0100
From: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
To: Eric Dumazet <dada1@...mosbay.com>
Cc: avorontsov@...mvista.com, Patrick McHardy <kaber@...sh.net>,
netdev@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] conntrack: Reduce conntrack count in nf_conntrack_free()
Eric Dumazet <dada1@...mosbay.com> wrote on 24/03/2009 14:29:29:
[SNIP]
> >>>> You could change qhimark from 10000 to 1000 in kernel/rcuclassic.c
> > (line
> >>> 80)
> >>>> as a workaround. It should force a quiescent state after 1000 freed
> >>> conntracks.
> >>>
> >>> right, doing this almost killed all conntrack messages, had to
stress
> > it
> >>> pretty
> >>> hard before I saw handful "nf_conntrack: table full, dropping
packet"
> >>>
> >>> RCU is not my cup of tea, do you have any ideas were to look?
> >> In a stress situation, you feed more deleted conntracks to call_rcu()
> > than
> >> the blimit (10 real freeing per RCU softirq invocation).
> >>
> >> So with default qhimark being 10000, this means about 10000
conntracks
> >> can sit in RCU (per CPU) before being really freed.
> >>
> >> Only when hitting 10000, RCU enters a special mode to free all queued
> > items, instead
> >> of a small batch of 10
> >>
> >> To solve your problem we can :
> >>
> >> 1) reduce qhimark from 10000 to 1000 (for example)
> >> Probably should be done to reduce some spikes in RCU code when
> > freeing
> >> whole 10000 elements...
> >> OR
> >> 2) change conntrack tunable (max conntrack entries on your machine)
> >> OR
> >> 3) change net/netfilter/nf_conntrack_core.c to decrement
net->ct.count
> >> in nf_conntrack_free() instead of callback.
> >>
> >> [PATCH] conntrack: Reduce conntrack count in nf_conntrack_free()
> >
> > The patch fixes the problem and the system feels a bit more responsive
> > too, thanks.
> > I guess I should probably do both 1) and 3) as my board is pretty slow
> > too.
> >
> > Been trying to figure out a good value for NAPI weigth too. Currently
my
> > HW RX and TX queues are 16 pkgs deep and weigth is 16 too. If I move
TX
> > processing
> > to NAPI context AND increase weigth to 32, the system is a lot more
> > responsive during
> > ping flooding. Does weigth 32 make sense when the HW TX and RX queues
are
> > 16?
>
> If you only have one NIC, I dont understand why changing weight should
make
> a difference. Are you referring to dev_weight or netdev_budget ?
>
> # cat /proc/sys/net/core/dev_weight
> 64
> # cat /proc/sys/net/core/netdev_budget
> 300
I mean this call in ucc_geth:
netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
UCC_GETH_DEV_WEIGHT is 16
Noticed that rcuclassic.c has a
module_param(qhimark, int, 0);
But I can't figure out hot to set this qhimark from the cmdline.
rcuclassic.c is not a module(I don't use modules at all)
Jocke
Jocke
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists