Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2003 19:19:05 +0200
From:      Clement Laforet <sheep.killer@cultdeadsheep.org>
To:        veedee@c7.campus.utcluj.ro
Cc:        anderson@centtech.com
Subject:   Re: NAT performance tweaks
Message-ID:  <20030507191905.35871f6a.sheep.killer@cultdeadsheep.org>
In-Reply-To: <20030507170155.GA13015@c7.campus.utcluj.ro>
References:  <3EB67822.3070802@centtech.com> <20030505182756.093fb1c3.sheep.killer@cultdeadsheep.org> <3EB6A0BF.1040803@centtech.com> <20030506042044.GA84589@c7.campus.utcluj.ro> <3EB922B7.2080002@centtech.com> <20030507170155.GA13015@c7.campus.utcluj.ro>

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> Would certainly be nice to make it as a sysctl. It's a pain in the ass to
> edit it manually everytime I cvsup. :/
> 

You can surely define NAT_SIZE and others in your make.conf.

#ifndef NAT_SIZE
# define        NAT_SIZE        127
#endif
#ifndef RDR_SIZE
# define        RDR_SIZE        127
#endif
#ifndef HOSTMAP_SIZE
# define        HOSTMAP_SIZE    127
#endif
#ifndef NAT_TABLE_SZ
# define        NAT_TABLE_SZ    127
#endif

but don't define LARGE_NAT 
ie : 

#ifdef  LARGE_NAT
#undef  NAT_SIZE
#undef  RDR_SIZE
#undef  NAT_TABLE_SZ
#undef  HOSTMAP_SIZE    127
#define NAT_SIZE        2047
#define RDR_SIZE        2047
#define NAT_TABLE_SZ    16383
#define HOSTMAP_SIZE    8191
#endif

You should use prime numbers to have a better hash :-)

clem



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030507191905.35871f6a.sheep.killer>