Skip to content
Snippets Groups Projects
Commit 7c4103b1 authored by Gus's avatar Gus :chocolate_bar:
Browse files

Merge branch 'bug_289' into 'main'

Improve relay overload documentation

Closes #289

See merge request tpo/web/support!90
parents bd91ef54 56212aef
No related branches found
No related tags found
No related merge requests found
......@@ -29,13 +29,16 @@ If you notice that your relay is overloaded please:
If you are experiencing TCP port exhaustion consider expanding your local port range.
You can do that with
`# sysctl -w net.ipv4.ip_local_port_range="15000 64000"`
`# sysctl -w net.ipv4.ip_local_port_range="15000 64000"`
or
`# echo 15000 64000 > /proc/sys/net/ipv4/ip_local_port_range`
`# echo 15000 64000 > /proc/sys/net/ipv4/ip_local_port_range`
### DNS timeout
Keep in mind that tuning `sysctl` as described is not permanent and will be lost upon restart.
You need to add the configuration to `/etc/sysctl.conf` or to a file in `/etc/sysctl.d/` to make it permanent.
### DNS timeout (exit relays only)
If you are experiencing DNS timeout, you should investigate if this is a network or a resolver issue.
......@@ -67,21 +70,21 @@ Set a very strict access policy with ``MetricsPortPolicy`` and consider using yo
Here is an example of what output enabling ``MetricsPort`` will produce:
```
# HELP tor_relay_load_onionskins_total Total number of onionskins handled
# TYPE tor_relay_load_onionskins_total counter
# HELP tor_relay_load_onionskins_total Total number of onionskins handled
# TYPE tor_relay_load_onionskins_total counter
tor_relay_load_onionskins_total{type="tap",action="processed"} 0
tor_relay_load_onionskins_total{type="tap",action="dropped"} 0
tor_relay_load_onionskins_total{type="fast",action="processed"} 0
tor_relay_load_onionskins_total{type="fast",action="dropped"} 0
tor_relay_load_onionskins_total{type="ntor",action="processed"} 0
tor_relay_load_onionskins_total{type="ntor",action="dropped"} 0
# HELP tor_relay_exit_dns_query_total Total number of DNS queries done by this relay
# TYPE tor_relay_exit_dns_query_total counter
# HELP tor_relay_exit_dns_query_total Total number of DNS queries done by this relay
# TYPE tor_relay_exit_dns_query_total counter
tor_relay_exit_dns_query_total{record="A"} 0
tor_relay_exit_dns_query_total{record="PTR"} 0
tor_relay_exit_dns_query_total{record="AAAA"} 0
# HELP tor_relay_exit_dns_error_total Total number of DNS errors encountered by this relay
# TYPE tor_relay_exit_dns_error_total counter
# HELP tor_relay_exit_dns_error_total Total number of DNS errors encountered by this relay
# TYPE tor_relay_exit_dns_error_total counter
tor_relay_exit_dns_error_total{record="A",reason="success"} 0
tor_relay_exit_dns_error_total{record="A",reason="format"} 0
tor_relay_exit_dns_error_total{record="A",reason="serverfailed"} 0
......@@ -118,21 +121,21 @@ tor_relay_exit_dns_error_total{record="AAAA",reason="timeout"} 0
tor_relay_exit_dns_error_total{record="AAAA",reason="shutdown"} 0
tor_relay_exit_dns_error_total{record="AAAA",reason="cancel"} 0
tor_relay_exit_dns_error_total{record="AAAA",reason="nodata"} 0
# HELP tor_relay_load_tcp_exhaustion_total Total number of times we ran out of TCP ports
# TYPE tor_relay_load_tcp_exhaustion_total counter
# HELP tor_relay_load_tcp_exhaustion_total Total number of times we ran out of TCP ports
# TYPE tor_relay_load_tcp_exhaustion_total counter
tor_relay_load_tcp_exhaustion_total 0
# HELP tor_relay_load_socket_total Total number of sockets
# TYPE tor_relay_load_socket_total gauge
# HELP tor_relay_load_socket_total Total number of sockets
# TYPE tor_relay_load_socket_total gauge
tor_relay_load_socket_total{state="opened"} 135
tor_relay_load_socket_total 1048544
# HELP tor_relay_load_oom_bytes_total Total number of bytes the OOM has freed by subsystem
# TYPE tor_relay_load_oom_bytes_total counter
# HELP tor_relay_load_oom_bytes_total Total number of bytes the OOM has freed by subsystem
# TYPE tor_relay_load_oom_bytes_total counter
tor_relay_load_oom_bytes_total{subsys="cell"} 0
tor_relay_load_oom_bytes_total{subsys="dns"} 0
tor_relay_load_oom_bytes_total{subsys="geoip"} 0
tor_relay_load_oom_bytes_total{subsys="hsdir"} 0
# HELP tor_relay_load_global_rate_limit_reached_total Total number of global connection bucket limit reached
# TYPE tor_relay_load_global_rate_limit_reached_total counter
# HELP tor_relay_load_global_rate_limit_reached_total Total number of global connection bucket limit reached
# TYPE tor_relay_load_global_rate_limit_reached_total counter
tor_relay_load_global_rate_limit_reached_total{side="read"} 0
tor_relay_load_global_rate_limit_reached_total{side="write"} 0
```
......@@ -152,7 +155,7 @@ It can happen that this pool starts dropping work due to memory or CPU pressure
If your server is running at capacity this will likely be triggered.
### tor_relay_exit_dns_error_total{...}
### tor_relay_exit_dns_error_total{...}
Any counter in the "*_dns_error_total" realm indicates a DNS problem.
......@@ -163,7 +166,7 @@ This might not be because your relay is overloaded in terms of resources but it
[DNS timeouts](#dns-timeout) at the Exits are a _huge_ UX problem for tor users.
Therefore Exit operators really need to address these issues to help the network.
### tor_relay_load_oom_bytes_total{...}
### tor_relay_load_oom_bytes_total{...}
An Out-Of-Memory invocation indicates a RAM problem.
The relay might need more RAM or it is leaking memory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment