[Tor-BSD] experiences with tuning BSD boxes for Tor?
r.c.ladan at gmail.com
Mon Nov 3 12:59:34 EST 2014
On 03-11-2014 14:56, George Rosamond wrote:
> René Ladan:
>> I was running a non-exit relay node on a Raspberry Pi B running FreeBSD
>> at home but last week it seems to have crashed under the load.
>> Short config:
>> - Raspberry Pi B, 496 MB RAM, 100 Mb/s ue0, 700 MHz
>> - FreeBSD 10.0-RELEASE-armv6
>> - 35 Mb/s down / 4 Mb/s up DSL line
>> - Tor bandwidths (normal/burst) set to 500 kB/s
>> Does anyone have some tips on what (if any) kernel parameters to set?
>> The default kern.ipc.somaxconn value of 128 seems to low for any real
>> traffic, but 32768 deprives the kernel of any mbufs in just 20 minutes.
>> It might be that a RPI is just too small to be a reliable relay...
>> See also
> Curious about other details in your build. Did you use Crochet?
No, I took one of the prebuilt images from db.net (offline now), similar
to the official images at  and updated that image using buildworld etc.
> I have been playing with BeagleBones (b & w) and RPis as Tor relays for
> a long while. I haven't put focus on sysctls because it's almost a
> secondary issue to me in terms of other questions.
So either your relays don't get a lot of traffic or you're lucky?
> ue (RPI) and cpsw (BB) seem to be slowly getting somewhere, but I get
> regular hiccups with cpsw.
I don't have a Beaglebone, so I can't comment on that. Note that ue is
indeed limited to 100 Mb/s.
> Are you using md(4) and/or tmpfs(5) for mounts like /tmp /var/tmp and
/dev/mmcsd0s2a on / (us, local, noatime, journaled soft-updates, nfsv4acls)
devfs on /dev (devfs, local)
lan-host:/media/var/tmp on /var/tmp (nfs) (final destination is a USB disk)
/tmp is a symlink to /var/tmp
> Any details on the load? Even heartbeat information would be nice to see.
Before the load rocketed up it used less than 10% of the CPU and some 20
MB of RAM (no worrisome numbers). Traffic was within bounds and mostly
symmetrical, just as one would expect from a relay.
Later on the number of incoming requests started to flood the socket
buffer, resulting in a constant traffic with some 1 Mb/s up ad 500 kb/s
down. The CPU was fully utilized at that point with some 70% user and
25% system (and 5% for other things).
> There's some decent stuff on tweaking sysctls on FreeBSD out there, but
> there isn't anything centralized. I know eadler@ and a few others had
> the discussion before. And the overhauls for the 10- branch are
> significant in terms of networking performance.
Yeah, I might try to run 10.1-RC4 on it, or wait a few days for 10.1 to
The RPI is still up but the network has become unusable (reboot needed).
More information about the Tor-BSD