FlightAware Open Source Software
FlightAware operates many FreeBSD severs and includes some useful tuning tips for other FreeBSD operators that need a high capacity configuration. Most operating
system and server settings are extremely low and will cause failures if they're not raised substantially. Unfortunately, it is often difficult to find these configuration
limitations until you experience a failure.
FlightAware runs the following configurations on machines ranging from 2x2GHz/64GB to 32x3GHz/384GB, so they can be dropped in to most configurations without a problem.
This page was last updated October 2013 and reflects our usage of FreeBSD 8.2.
Don't remove your ZFS settings that might be at the top of this file.
The kern.ipc.maxsockets and kern.ipc.maxsockbuf settings are for any large network server.
accf_http is a socket filter that buffers incoming connctions until a complete HTTP request arrives. The accf_http_load setting loads
the module and prevents an Apache warning on start. FlightAware does not expose Apache to the Internet; it's proxied by Varnish. Accordingly,
this setting is unnecessary for us but useful for others.
The rest of the semaphore/shared memory/swap settings are to allow PostgreSQL to have large (we use 16-72GB) shared memory segments. The
postgres web site has documentation on kernel resource settings..
The shm settings are for PostgreSQL (see above).
vm.pmap.shpgperproc settings are only required for FreeBSD 8 and below.
# set max shared memory segment size to 512 megs, 512 * 1024 * 1024, we need a
# lot for PostgreSQL
# set the maximum number of pages of shared memory,
# this should be at least
# (max mem you could possible allocate / page size in bytes), i.e.
# at least shmmax / pagesize
# lock shared memory from being swapped out