You may need to up the kern.ipc.nmbclusters sysctl. If you are getting "out of mbuf" errors, this will fix that.
From 'man tuning':
kern.ipc.nmbclusters may be adjusted to increase the number of network mbufs the system is willing to allocate. Each cluster represents approx- imately 2K of memory, so a value of 1024 represents 2M of kernel memory reserved for network buffers. You can do a simple calculation to figure out how many you need. If you have a web server which maxes out at 1000 simultaneous connections, and each connection eats a 16K receive and 16K send buffer, you need approximately 32MB worth of network buffers to deal with it. A good rule of thumb is to multiply by 2, so 32MBx2 = 64MB/2K = 32768. So for this case you would want to set kern.ipc.nmbclusters to 32768. We recommend values between 1024 and 4096 for machines with mod- erates amount of memory, and between 4096 and 32768 for machines with greater amounts of memory. Under no circumstances should you specify an arbitrarily high value for this parameter, it could lead to a boot-time crash. The -m option to netstat(1) may be used to observe network clus- ter use. Older versions of FreeBSD do not have this tunable and require that the kernel config(8) option NMBCLUSTERS be set instead.
Add a line like the following to the /boot/loader.rc on the image.
That would take 64 MB RAM. With 128+ MB RAM and SmallWall, you could set it to that or higher, but setting it arbitrarily high may cause problems as stated above.
The default on FreeBSD and SmallWall is 1024, which is fine unless you require a huge number of connections. It's set to 1024 by default to limit memory consumption, and 1024 is more than enough for the vast majority of SmallWall installations.