[tor-dev] Per-transport bridge bandwidth and bridge counts

David Fifield david at bamsoftware.com
Sat Jul 11 19:18:07 UTC 2015

I made some graphs that show the count and total bandwidth of all
bridges, broken down by transport.
The top part of the graph is non-default bridges, and the bottom is
default bridges (the ones that ship with Tor Browser). Note the varying
vertical scales. Source code and data are here:

I have a question about getting bandwidth numbers. What I want is
something like available bandwidth capacity; i.e., how much headroom
transports have given their level of use. I think that the bandwidth
numbers I'm using are partially conflated with usage. Notice how parts
of pt-count.png are flat while pt-bandwidth.png has a weekly pattern.

The bandwidth number I'm using is the "w Bandwidth=" line from a
bridge-network-status document. It looks like this:
	r starman qgM+62FgGytzEtibYqqiPcPtijQ mdOOBxVOTpw8loBezhSDZxLIcXs 2015-07-03 21:39:31 9002 0
	s Fast Guard Running Stable Valid
	w Bandwidth=2646
	p reject 1-65535
dir-spec.txt says:
	An estimate of the bandwidth of this relay, in an arbitrary unit
	(currently kilobytes per second).  Used to weight router
	selection. See section 3.4.2 for details on how the value of
	Bandwidth is determined in a consensus."
Section 3.4.2 says:
	When we speak of a router's bandwidth in this section, we mean
	either its measured bandwidth, or its advertised bandwidth....
	The bandwidth in a "w" line should be taken as the best estimate
	of the router's actual capacity that the authority has.  For
	now, this should be the lesser of the observed bandwidth and
	bandwidth rate limit from the server descriptor.  It is given in
	kilobytes per second, and capped at some arbitrary value
	(currently 10 MB/s).
I don't know where observed bandwidth comes from. Is there some kind of
external test that measures it, or does it come from measuring user

Another option for getting bandwidth is the "bandwidth" line in a
bridge-server-descriptor document. It looks like this:
	bandwidth 1073741824 1073741824 2646895
The three fields are bandwidth-avg bandwidth-burst bandwidth-observed.
dir-spec.txt says:
	Estimated bandwidth for this router, in bytes per second.  The
	"average" bandwidth is the volume per second that the OR is
	willing to sustain over long periods; the "burst" bandwidth is
	the volume that the OR is willing to sustain in very short
	intervals.  The "observed" value is an estimate of the capacity
	this relay can handle.  The relay remembers the max bandwidth
	sustained output over any ten second period in the past day, and
	another sustained input.  The "observed" value is the lesser of
	these two numbers.
So it seems that bandwidth-observed is not what we want, because it's
derived from current usage. bandwidth-avg and bandwidth-burst aren't
useful because they are operator-controlled and often left at the
default of 1 GB/s.

Yet another option is the speed of serving consensuses, the
"dirreq-v3-tunneled-dl" line in a bridge-extra-info document:
	dirreq-v3-tunneled-dl complete=13624,timeout=1456,running=4,min=1938,d1=21008,d2=43181,q1=53397,d3=63519,d4=88911,md=117048,d6=146982,d7=180109,q3=199979,d8=223313,d9=298860,max=1558627
You can take the "md=" field, for example, to get median B/s for serving

More information about the tor-dev mailing list