[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-relays] Re: sysctl tweaks for tiny relays



On 03/11/2026 03:40, forest via tor-relays wrote:
net.ipv4.tcp_keepalive_time = 120
Why so aggressive? You could get away with 10x that interval.

net.ipv4.tcp_synack_retries = 2
Why give up so quickly? This might cause connections to congested relays
to fail. Is the goal just to reduce the number of open sockets?
Yes.

net.ipv6.ip_nonlocal_bind = 1
This seems like a mistake. Tor does not make use of arbitrary source
addresses. Unless you're running Unbound with a routed IPv6 netblock and
want it to randomize source addresses, there's no reason to enable this.

I had reboot (timing?) issues at one of my provider - gone away with that.

But by far, what helps the most is setting Tor to use a memory allocator
that is more resistant to memory fragmentation. 1AEO has found mimalloc2
is the best, but Debian only has mimalloc3 which is actually worse. I
use jemalloc2 on all of my relays which substantially reduces memory use
and eliminates thrashing.

Hhm, at my Debian I didn't saw improvements using another memory allocator, the number of socket is the biggest problem here.

--
Toralf
_______________________________________________
tor-relays mailing list -- tor-relays@xxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to tor-relays-leave@xxxxxxxxxxxxxxxxxxxx