[tor-relays] Relay Throttling

Hi

Is there a tutorial on how to limit a relay’s throughput?? There has to be!
I did a search and came up empty. I’m trying to avoid shutting down my
relay’s due to financial burden Any help would be appreciated.

Thank you!

···

Sent with ProtonMail secure email.

1 Like

There are settings you can add to your torrc to limit both the speed of your bandwidth and total amount of data sent per period, have a look at this two links:

http://rzuwtpc4wb3xdzrj3yeajsvm3fkq4vbeubm2tdxaqruzzzgs5dwemlad.onion/relay-operators/bandwidth-shaping/index.html

http://rzuwtpc4wb3xdzrj3yeajsvm3fkq4vbeubm2tdxaqruzzzgs5dwemlad.onion/relay-operators/limit-total-bandwidth/

For example if i want my relay to use 3MB/s average with a burst of 6, and no more than 1 TB in a month one could put this in their torrc,

RelayBandwidthRate 3 MB # Throttle traffic to 3MB/s (24Bbps)
RelayBandwidthBurst 6 MB # But allow bursts up to 6MB/s (48Mbps)

AccountingMax 1TB
AccountingStart month 1 12:00

Hopefully this helps

···

Sent with ProtonMail secure email.

------- Original Message -------
On Friday, May 6th, 2022 at 10:49, sysmanager7 via tor-relays tor-relays@lists.torproject.org wrote:

Hi

Is there a tutorial on how to limit a relay’s throughput?? There has to be!
I did a search and came up empty. I’m trying to avoid shutting down my
relay’s due to financial burden Any help would be appreciated.

Thank you!

Sent with ProtonMail secure email.

1 Like

Hey,

ofcourse u can limit it,
should be in the torrc file.

https://github.com/0xdea/configurations/blob/7307751f3d6c47214017f471d3ae311c695893cd/tor/torrc#L132

···

sysmanager7 via tor-relays <tor-relays@lists.torproject.org> schrieb am Fr., 6. Mai 2022, 14:16:

Hi

Is there a tutorial on how to limit a relay’s throughput?? There has to be!
I did a search and came up empty. I’m trying to avoid shutting down my
relay’s due to financial burden Any help would be appreciated.

Thank you!

Sent with ProtonMail secure email.


tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

1 Like

Hi,

There are two main mechanisms to limit relays bandwidth usage.
The first is by setting RelayBandwidthRate and RelayBandwidthBurst to limit the average and peak bandwidth usage of your bridge.
The second is by setting AccountingMax, AccountingStart and possibly accounting AccountingRule, to limit the total bandwidth usage over some periode (day, week or month)

If you want to limit your relay to, say 100mbit, with burst at 120, and set a hard limit on monthly traffic to 1TB you can set in your relay torrc.

RelayBandwidthRate 100MBits
RelayBandwidthBurst 120MBits
AccountingMax 1 TBytes
AccountingStart month 1 00:00 # this is actually the default value, so you can omit it

You can read more about these options in tor manpage.

You can use either or both kind of settings. As the goal is to limit cost, you should definitely use the Accounting part. You can set RelayBandwdith so your relay does not use its quota in just a few days, unless that would make it too slow.

···

Le ven. 6 mai 2022 à 14:16, sysmanager7 via tor-relays <tor-relays@lists.torproject.org> a écrit :

Hi

Is there a tutorial on how to limit a relay’s throughput?? There has to be!
I did a search and came up empty. I’m trying to avoid shutting down my
relay’s due to financial burden Any help would be appreciated.

Thank you!

Sent with ProtonMail secure email.


tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

1 Like

# How we determine when our AccountingMax has been reached. sum|max|in|out
# (Default: max)
AccountingRule sum

A hint, mostly you want 'sum'.
Tor is !Webserver, the incoming and outgoing traffic is the same. Almost all
providers calculate in + out traffic.

···

On Friday, May 6, 2022 2:39:09 PM CEST trinity pointard wrote:

Hi,

There are two main mechanisms to limit relays bandwidth usage.
The first is by setting RelayBandwidthRate and RelayBandwidthBurst to limit
the average and peak bandwidth usage of your bridge.
The second is by setting AccountingMax, AccountingStart and possibly
accounting AccountingRule, to limit the total bandwidth usage over some
periode (day, week or month)

If you want to limit your relay to, say 100mbit, with burst at 120, and set
a hard limit on monthly traffic to 1TB you can set in your relay torrc.

RelayBandwidthRate 100MBits
RelayBandwidthBurst 120MBits
AccountingMax 1 TBytes
AccountingStart month 1 00:00

--
╰_╯ Ciao Marco!

Debian GNU/Linux

It's free software and it gives you freedom!

1 Like