QoS for Tor Relays

I run Tor non-exit relays and bridges alongside other non-production services (e.g. self-hosted RSS readers). Although it’s frowned upon to run other services alongside Tor, I do this because I’d like to add diversity to the Tor network.

One of my servers is a backup server (part of a 3-2-1 strategy, not my only copy). It is limited to 100mbps on a Xen virtualization platform. The server receives backups during a period of the evening. It has unmetered bandwidth and sits idle most of the week. I don’t like the idea of limiting bandwidth arbitrarily to a lower limit like 20-30mbps, but I would prefer that my backups take priority over Tor traffic when it is running. Most of the time, the relay uses 90mbps out of 100mbps.

Tor documentation makes reference to an old (deprecated?) Quality of Service script for Linux distributions. It doesn’t seem to work (maybe an issue on my end?), so I am curious how other Tor relay operators may be enabling quality of service on their servers.

I am thinking of figuring out a way to potentially do QoS on just the ORPort, as I figure limiting the flow of download from time to time will limit the amount of outgoing bandwidth as well.

Would greatly appreciate any advice.

1 Like

one way is to prioritize your traffic with tc

It will probably clash with RelayBandwidthRate and maybe your relay might appear with flag overload:

1 Like