Date: Thu, 5 Jul 2007 17:08:17 +0200 From: Max Laier <max@love2party.net> To: freebsd-pf@freebsd.org Subject: Re: Losing connections/performance with PF turned on Message-ID: <200707051708.24137.max@love2party.net> In-Reply-To: <810a540e0707050222s55a62641je0138e931832e86@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Thursday 05 July 2007, Pat Maddox wrote:
> We're doing some stress testing on our server, and noticed that when
> we turn PF on, we lose connections and have a drastic reduction in
> performance.
My guess would be that you are exhausting the ephemeral port range of the
querying box. pf has quite strict (maybe too strict) enforcement of the
TIME_WAIT silence periode. There are several ways to work around this
(which only is a problem while benchmarking):
- use shorter state timeouts. "tcp.closed" in particular
- increase the ephemeral port range on the query node
net.inet.ip.portrange.[hi]{last,first}
see ip(4) for details.
- Use a more realistic benchmark (i.e. coming from more than one IP)
In order to verify that this is indeed the problem look for state-mismatch
counter increases in the "pfctl -si" output or debug messages on the
console while running with "pfctl -xm".
> We used SIEGE for 120 seconds, 50 connections, on req/conn
>
> Firewall On:
>
> Num Users: 50
> Availability: 97.23 %
> Transaction rate: 58.02 trans/sec
> Concurrency: 3.80
> Successful: 6994
> Failed: 198
> Longest Req: 9.06s
>
> Firewall Off:
>
> Num Users: 50
> Availability: 100 %
> Transaction rate: 94.62 trans/sec
> Concurrency: 1.76
> Successful: 11342
> Failed: 0
> Longest Req: 0.51s
...
--
FreeBSD Status reports due: 07/07/07 :-)
/"\ Best regards, | mlaier@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
iD8DBQBGjQloXyyEoT62BG0RAt0qAJ460qwrJPvDODa2/HoWV0GndI7aXQCbB6j+
B7m0YVs2mHORAvZbGwEgNFM=
=G096
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707051708.24137.max>
