Hi
I've a question regarding the rate setting in torrc and tor honoring it. I've set up a tor relay with following rate settings: RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value. The average rate control seems to be working fine though.
[image: image.png]
What am I missing?
I'm running 0.3.0.10 on Linux.
Thanks
Hi,
r1610091651:
Hi
I've a question regarding the rate setting in torrc and tor honoring it. I've set up a tor relay with following rate settings: RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value. The average rate control seems to be working fine though.
[image: image.png]
What am I missing?
I'm running 0.3.0.10 on Linux.
Thanks
You should firstly keep in mind that these settings apply to traffic both up and down - i.e. you'll get 2048 kilobytes/second up and 2048 kilobytes/second down.
It's worth noting that there may be some confusion between kilobits/second and kilobytes/second.
It is probably worth using external monitoring tools rather than relying on ARM's measurement, too.
Best, Duncan
On 8 Sep 2017, at 09:47, Duncan dguthrie@posteo.net wrote:
r1610091651:
Hi
I've a question regarding the rate setting in torrc and tor honoring it. I've set up a tor relay with following rate settings: RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value. The average rate control seems to be working fine though.
[image: image.png]
What am I missing?
I'm running 0.3.0.10 on Linux.
Thanks
You should firstly keep in mind that these settings apply to traffic both up and down - i.e. you'll get 2048 kilobytes/second up and 2048 kilobytes/second down.
Also, these settings apply to *Relayed* traffic only.
If your tor is acting as a client, it will happily exceed these limits. As well as SOCKSPort traffic, client traffic also includes directory document downloads, and any other traffic that originates at your relay.
If you want to limit all traffic, use: BandwidthBurst 2048 KBytes
T -- Tim Wilson-Brown (teor)
teor2345 at gmail dot com PGP C855 6CED 5D90 A0C5 29F6 4D43 450C BA7F 968F 094B ricochet:ekmygaiu4rzgsk6n ------------------------------------------------------------------------
teor teor2345@gmail.com wrote:
Also, these settings apply to *Relayed* traffic only.
If your tor is acting as a client, it will happily exceed these limits. As well as SOCKSPort traffic, client traffic also includes directory document downloads, and any other traffic that originates at your relay.
Directory fetches used to be counted as part of the relay operations traffic. When did that change, please?
Scott Bennett, Comm. ASMELG, CFIAG ********************************************************************** * Internet: bennett at sdf.org *xor* bennett at freeshell.org * *--------------------------------------------------------------------* * "A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army." * * -- Gov. John Hancock, New York Journal, 28 January 1790 * **********************************************************************
On Thu, 07 Sep 2017 22:56:17 +0000, r1610091651 wrote:
RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value.
That's the point of the Burst - there is a bucket that is filled up with unused bandwidth, up to the Burst value, and before the relay throttles down to RB-Rate it also lets as many byte pass as the bucket currently has.
Means that with your setting your relay can pass up to 4 MByte in any given second (but not in every second).
- Andreas
On Fri, Sep 08, 2017 at 07:14:58AM +0200, Andreas Krey wrote:
On Thu, 07 Sep 2017 22:56:17 +0000, r1610091651 wrote:
RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value.
That's the point of the Burst - there is a bucket that is filled up with unused bandwidth, up to the Burst value, and before the relay throttles down to RB-Rate it also lets as many byte pass as the bucket currently has.
Means that with your setting your relay can pass up to 4 MByte in any given second (but not in every second).
No, with these values the relay will push up to 2MBytes in each direction each second. When the Burst is the same as the Rate, it's essentially just like you're using the Rate. It doesn't add them.
My guess is that the original poster is confused because they wrote "KBytes" in their torrc, but arm defaults to bits.
--Roger
On Fri, 8 Sep 2017 at 07:19 Roger Dingledine arma@mit.edu wrote:
On Fri, Sep 08, 2017 at 07:14:58AM +0200, Andreas Krey wrote:
On Thu, 07 Sep 2017 22:56:17 +0000, r1610091651 wrote:
RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value.
That's the point of the Burst - there is a bucket that is filled up with unused bandwidth, up to the Burst value, and before the relay throttles down to RB-Rate it also lets as many byte pass as the bucket currently has.
Means that with your setting your relay can pass up to 4 MByte in any given second (but not in every second).
No, with these values the relay will push up to 2MBytes in each direction each second. When the Burst is the same as the Rate, it's essentially just like you're using the Rate. It doesn't add them.
My guess is that the original poster is confused because they wrote "KBytes" in their torrc, but arm defaults to bits.
--Roger
tor-relays mailing list tor-relays@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
Thanks all for the feedback.
To provide some more info and evidence.
I indeed intend to limit both up & down traffic, through the relay. There is no local / client traffic, only relayed. I'm aware that the rate is in kilobytes. Also note that latest arm also reports in kilobytes/s. I was also able to verify rates reported by arm, by other network monitoring means. Just grabbed arm view: [image: image.png] And associated network view: [image: image.png]
Basically what I'm seeing is that tor ignores relay burst rate setting for relayed traffic.
Based on your comments, what I'm doing is correct way of rate configuration. Right? So it's a bug then?
Thanks Seb
On 8 Sep 2017, at 17:15, r1610091651 r1610091651@telenet.be wrote:
On Fri, 8 Sep 2017 at 07:19 Roger Dingledine arma@mit.edu wrote:
On Fri, Sep 08, 2017 at 07:14:58AM +0200, Andreas Krey wrote:
On Thu, 07 Sep 2017 22:56:17 +0000, r1610091651 wrote:
RelayBandwidthRate 2048 KBytes RelayBandwidthBurst 2048 KBytes
But using arm, I'm seeing that tor is not honoring these settings, with bursts frequently exceeding the value.
That's the point of the Burst - there is a bucket that is filled up with unused bandwidth, up to the Burst value, and before the relay throttles down to RB-Rate it also lets as many byte pass as the bucket currently has.
Means that with your setting your relay can pass up to 4 MByte in any given second (but not in every second).
No, with these values the relay will push up to 2MBytes in each direction each second. When the Burst is the same as the Rate, it's essentially just like you're using the Rate. It doesn't add them.
My guess is that the original poster is confused because they wrote "KBytes" in their torrc, but arm defaults to bits.
...
...
I indeed intend to limit both up & down traffic, through the relay. There is no local / client traffic, only relayed.
There is always client traffic, because directory mirrors fetch two 1-2MB directory documents every hour or two. And relays fetch descriptors and microdescriptors when they first start, when they change, and when they expire.
On 8 Sep 2017, at 10:54, Scott Bennett bennett@sdf.org wrote:
client traffic also includes directory document downloads
Directory fetches used to be counted as part of the relay operations traffic. When did that change, please?
Since the relay bandwidth feature was introduced in tor-0.2.0.1-alpha, connection_counts_as_relayed_traffic() has always counted relay directory fetches and relay service to clients in BandwidthRate, and relay service to clients in RelayBandwidthRate.
What did change in 0.2.8 or 0.2.9 is that relays started fetching directory documents over OR connections. When a relay uses an OR connection for any client traffic, all the traffic on the connection is counted as "client" traffic for 30 seconds.
I'm aware that the rate is in kilobytes. Also note that latest arm also reports in kilobytes/s. I was also able to verify rates reported by arm, by other network monitoring means. Just grabbed arm view: <image.png> And associated network view: <image.png>
Basically what I'm seeing is that tor ignores relay burst rate setting for relayed traffic.
Based on your comments, what I'm doing is correct way of rate configuration. Right? So it's a bug then?
Apart from the client traffic I mentioned above, this could also be a measurement issue.
global_write_bucket_low() allows Tor to exhaust its bucket in the last part of one second, and then exhaust the refilled bucket in the first part of the next second.
So, if your measurement seconds are offset from tor's bucket refill seconds, you will sometimes see one second that exceeds the burst, and a lower second before or after it.
I wouldn't worry about it.
Or, if what you're trying to achieve is to never exceed a certain amount for any second measured at any offset, halve that amount, and set it as the BandwidthBurst.
T
-- Tim Wilson-Brown (teor)
teor2345 at gmail dot com PGP C855 6CED 5D90 A0C5 29F6 4D43 450C BA7F 968F 094B ricochet:ekmygaiu4rzgsk6n xmpp: teor at torproject dot org ------------------------------------------------------------------------
tor-relays@lists.torproject.org