|
= My Relay is Slow, How Can I Fix It? =
|
|
# My Relay is Slow, How Can I Fix It?
|
|
|
|
|
|
This wiki page is Part Four of the ''So You Want to Fix the Tor Network'' series.
|
|
This wiki page is Part Four of the _So You Want to Fix the Tor Network_ series.
|
|
|
|
|
|
[[TOC]]
|
|
|
|
|
|
|
|
== Why Relay Load Varies ==
|
|
|
|
|
|
## 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.
|
|
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.
|
|
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? ===
|
|
### Why does Tor need bandwidth scanners?
|
|
|
|
|
|
Most providers tell you the maximum speed of your local connection.
|
|
Most providers tell you the maximum speed of your local connection.
|
|
|
|
|
... | @@ -18,7 +18,7 @@ But tor has users all over the world, and our users connect to one or two Guard |
... | @@ -18,7 +18,7 @@ But tor has users all over the world, and our users connect to one or two Guard |
|
|
|
|
|
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.
|
|
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? ===
|
|
### What is a normal relay load?
|
|
|
|
|
|
It's normal for most relays to be loaded at 30%-80% of their capacity.
|
|
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.
|
|
This is good for clients: an overloaded relay has high latency.
|
... | @@ -29,23 +29,23 @@ connections are limited. Other times, it is the network that is slow: |
... | @@ -29,23 +29,23 @@ 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
|
|
the relay has bad peering to most other tor relays, or is a long
|
|
distance away.
|
|
distance away.
|
|
|
|
|
|
== Finding Out what is Limiting a Relay ==
|
|
## Finding Out what is Limiting a Relay
|
|
|
|
|
|
Lots of things can slow down a relay. Here's how to track them down.
|
|
Lots of things can slow down a relay. Here's how to track them down.
|
|
|
|
|
|
=== System Limits ===
|
|
### System Limits
|
|
|
|
|
|
1. Check RAM, CPU, and socket/file descriptor usage on your relay
|
|
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.
|
|
Tor logs some of these when it starts. Others can be viewed using top or similar tools.
|
|
|
|
|
|
=== Provider Limits ===
|
|
### Provider Limits
|
|
|
|
|
|
2. Check the internet peering (bandwidth, latency) from your relay's provider to
|
|
2. Check the internet peering (bandwidth, latency) from your relay's provider to
|
|
other relays. Relays transiting via Comcast have been slow at times.
|
|
other relays. Relays transiting via Comcast have been slow at times.
|
|
Relays outside North America and Western Europe are usually slower.
|
|
Relays outside North America and Western Europe are usually slower.
|
|
|
|
|
|
=== Tor Network Limits ===
|
|
### Tor Network Limits
|
|
|
|
|
|
Relay bandwidth can be limited by a relay's own observed bandwidth, or by the directory authorities' measured bandwidth.
|
|
Relay bandwidth can be limited by a relay's own observed bandwidth, or by the directory authorities' measured bandwidth.
|
|
|
|
|
... | @@ -76,7 +76,7 @@ https://lists.torproject.org/pipermail/tor-relays/2016-November/010913.html |
... | @@ -76,7 +76,7 @@ https://lists.torproject.org/pipermail/tor-relays/2016-November/010913.html |
|
|
|
|
|
https://lists.torproject.org/pipermail/tor-relays/2016-October/010784.html
|
|
https://lists.torproject.org/pipermail/tor-relays/2016-October/010784.html
|
|
|
|
|
|
==== How to Fix It ====
|
|
#### How to Fix It
|
|
|
|
|
|
The smallest of these figures is limiting the bandwidth allocated to the relay.
|
|
The smallest of these figures is limiting the bandwidth allocated to the relay.
|
|
|
|
|
... | @@ -89,7 +89,7 @@ sees itself getting faster. You need to work out why it is slow. |
... | @@ -89,7 +89,7 @@ sees itself getting faster. You need to work out why it is slow. |
|
If it's the median measured bandwidth, your relay looks slow from a majority of
|
|
If it's the median measured bandwidth, your relay looks slow from a majority of
|
|
bandwidth authorities. You need to work out why they measure it slow.
|
|
bandwidth authorities. You need to work out why they measure it slow.
|
|
|
|
|
|
=== Doing Your Own Relay Measurements ===
|
|
### Doing Your Own Relay Measurements
|
|
|
|
|
|
If your relay thinks it is slow, or the bandwidth authorities think it is
|
|
If your relay thinks it is slow, or the bandwidth authorities think it is
|
|
slow, you can test the bandwidth yourself.
|
|
slow, you can test the bandwidth yourself.
|
... | @@ -104,7 +104,7 @@ https://lists.torproject.org/pipermail/tor-relays/2016-September/010173.html |
... | @@ -104,7 +104,7 @@ https://lists.torproject.org/pipermail/tor-relays/2016-September/010173.html |
|
|
|
|
|
https://gitweb.torproject.org/chutney.git/tree/README#n79
|
|
https://gitweb.torproject.org/chutney.git/tree/README#n79
|
|
|
|
|
|
=== Next Steps ===
|
|
### Next Steps
|
|
|
|
|
|
We are working on better measurements. More bandwidth authorities in more
|
|
We are working on better measurements. More bandwidth authorities in more
|
|
locations will help. See BandwidthAuthorityMeasurements for details. |
|
locations will help. See BandwidthAuthorityMeasurements for details. |
|
|
|
\ No newline at end of file |