Re: taskqueue for pf periodic events
- From: Max Laier <max@xxxxxxxxxxxxxx>
- Date: Tue, 7 Mar 2006 22:13:21 +0100
Gleb,
On Tuesday 07 March 2006 11:59, Gleb Smirnoff wrote:
running a pf load balancer I have noticed that the "swi4: clock"
process consumes a noticable amount of CPU time, when a lot of
states are purged from pf cache. The load balancer is also running
CARP, and a hot spare is working here too. Reading daily run outputs
from the second router, I have noticed that a few times per day
the redundant router preempts the main one, since it doesn't
receive announcement in time from master. So, I had a theory that
a heavy pf purge is running so long, that a CARP announcement
is delayed. You know, all callout(9) events are serialized in one
thread - "swi4: clock".
So I made a patch that moves all periodic pf(4) job into separate
context. The patch uses new taskqueue API made by Scott. I have
ported the API to RELENG_6 and made my patch for RELENG_6. I've
been running the patch for 27 days and the spurious preemtions
of CARP backup had gone away. No problems were noticed. The box
is running SMP kernel on a single CPU box with HTT (2 logical
CPUs), HTT enabled.
The patch attached.
Makes sense to me. I recall that we talked about this problem before and I
think I even sent you a patch to expire only a fixed amount of states at
once. Can't find that patch now, do you remember? OpenBSD has by now done
something along those lines and I will import it as soon as 3.9 is ready and
I have some time. Could you change the purge part to a kernel thread like
done in OpenBSD:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/pf.c#rev1.498
I'm not sure which is better, but staying close to the OpenBSD sollution would
certainly make my life easier.
Thanks for coming up with this!
--
/"\ Best regards, | mlaier@xxxxxxxxxxx
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
Attachment:
pgpQhMJScQfZq.pgp
Description: PGP signature
- References:
- taskqueue for pf periodic events
- From: Gleb Smirnoff
- taskqueue for pf periodic events
- Prev by Date: Re: TCP_COMPAT_42 support
- Next by Date: Re: TCP_COMPAT_42 support
- Previous by thread: taskqueue for pf periodic events
- Next by thread: FAST_IPSEC and tunnelled packets processing
- Index(es):
Relevant Pages
|
|