This wiki page is Part Four of the ''So You Want to Fix the Tor Network'' series.
[[TOC]]
== Why Relay Load Varies ==
Tor manages bandwidth across the entire network. It does a reasonable job for most relays. But Tor's goals are different to protocols like Bittorrent. Tor wants low-latency web pages, which requires fast connections with headroom. Bittorrent wants bulk downloads, which requires using all the bandwidth.
We're working on a new bandwidth scanner, which is easier to understand and maintain. It will have diagnostics for relays that don't get measured, and relays that have low measurements.
=== Why does Tor need bandwidth scanners? ===
Most providers tell you the maximum speed of your local connection.
But tor has users all over the world, and our users connect to one or two Guard relays at random. So we need to know how well each relay can connect to the entire world.
So even if all relay operators set their advertised bandwidth to their local connection speed, we would still need bandwidth authorities to balance the load between different parts of the internet.
=== What is a normal relay load? ===
It's normal for most relays to be loaded at 30%-80% of their capacity.
This is good for clients: an overloaded relay has high latency.
(We want enough relays to so that each relay is loaded at 10%. Then Tor would be almost as fast as the wider Internet.)
Sometimes, a relay is slow because its processor is slow or its
connections are limited. Other times, it is the network that is slow:
the relay has bad peering to most other tor relays, or is a long
distance away.
== Finding Out what is Limiting a Relay ==
Lots of things can slow down a relay. Here's how to track them down.
=== System Limits ===
1. Check RAM, CPU, and socket/file descriptor usage on your relay
Tor logs some of these when it starts. Others can be viewed using top or similar tools.
=== Provider Limits ===
2. Check the internet peering (bandwidth, latency) from your relay's provider to
other relays. Relays transiting via Comcast have been slow at times.
Relays outside North America and Western Europe are usually slower.
=== Tor Network Limits ===
Relay bandwidth can be limited by a relay's own observed bandwidth, or by the directory authorities' measured bandwidth.
Here's how to find out which measurement is liming your relay:
3. Check each of the votes for your relay on consensus-health (large page),