<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><blockquote type="cite">May I ask what your set up is?<br>Are you running your relays on separate VMs on the main system or are<br>you using a different set up like having all IP addresses on the same OS<br>and using OutboundBindAddress , routing, etc... to separate them? If I<br>know more, I might be able to make a script specific to your set up.</blockquote><br></div><div>Thank you. Yes, of course.</div><div><br></div><div>Ubuntu server 22.04 runs on bare metal. Ansible-relayor manages 20 exit relays on each system. Netplan has each IP individually listed (sub-divided as a /25 per server from within a dedicated /24, similarly for v6 addresses). I believe an available IP is randomly picked by ansible-relayor and used statically in each torrc file.</div><div><br></div><div>Here is an example torrc:</div><div><br></div><div><p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(50, 244, 241);"><span style="font-variant-ligatures: no-common-ligatures"># ansible-relayor generated torrc configuration file</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(50, 244, 241);"><span style="font-variant-ligatures: no-common-ligatures"># Note: manual changes will be OVERWRITTEN on the next ansible-playbook run</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">OfflineMasterKey 1</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">RunAsDaemon 0</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">Log notice syslog</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">OutboundBindAddress 23.129.64.130</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">SocksPort 0</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">User _tor-23.129.64.130_443</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">DataDirectory /var/lib/tor-instances/23.129.64.130_443</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ORPort 23.129.64.130:443</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ORPort [2620:18c:0:192::130]:443</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">OutboundBindAddress [2620:18c:0:192::130]</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">DirPort 23.129.64.130:80</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">Address 23.129.64.130</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">SyslogIdentityTag 23.129.64.130_443</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ControlSocket /var/run/tor-instances/23.129.64.130_443/control GroupWritable RelaxDirModeCheck</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">Nickname ageis</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ContactInfo url:emeraldonion.org proof:uri-rsa ciissversion:2 tech@emeraldonion.org</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">Sandbox 1</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">NoExec 1</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(50, 244, 241);"><span style="font-variant-ligatures: no-common-ligatures"># we are an exit relay!</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ExitRelay 1</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">IPv6Exit 1</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">DirPort [2620:18c:0:192::130]:80 NoAdvertise</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">DirPortFrontPage /etc/tor/instances/tor-exit-notice.html</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">ExitPolicy reject 23.129.64.128/25:*,reject6 [2613:18c:0:192::]/64:*,accept *:*,accept6 *:*</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0); min-height: 13px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures">MyFamily <snip></span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(50, 244, 241);"><span style="font-variant-ligatures: no-common-ligatures"># end of torrc</span></p></div><div><br></div><br><div>
<meta charset="UTF-8"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>--</div><div>Christopher Sheats (yawnbox)</div><div>Executive Director</div><div>Emerald Onion</div><div>Signal: +1 206.739.3390</div><div>Website: https://emeraldonion.org/</div><div>Mastodon: https://digitalcourage.social/@EmeraldOnion/</div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br><blockquote type="cite"><div>On Dec 4, 2022, at 10:08 PM, Chris <tor@wcbsecurity.com> wrote:</div><br class="Apple-interchange-newline"><div><div>Sorry to hear it wasn't much help. Even though the additions I suggested<br>didn't help they certainly couldn't cause any harm and can't be<br>responsible for the drops in traffic.<br><br>As for the torutils scripts, I'm sure toralf would be able to better<br>investigate that but I have a feeling you have a certain set up that<br>might not have worked with the script. May I ask what your set up is?<br>Are you running your relays on separate VMs on the main system or are<br>you using a different set up like having all IP addresses on the same OS<br>and using OutboundBindAddress , routing, etc... to separate them? If I<br>know more, I might be able to make a script specific to your set up.<br><br>On 12/3/2022 2:07 PM, Christopher Sheats wrote:<br><blockquote type="cite">Hello,<br><br>Thank you for this information. After 24-hours of testing, these<br>configurations brought Tor to a halt.<br><br>At first I started with the sysctl modifications. After a few hours<br>with just that, there was no improvement in ~75%<br>inet_csk_bind_conflict utilization. I then installed Torutils for both<br>IPv4 and IPv6. After only a couple of hours, Tor dropped to below 15<br>Mbps across both servers (40 relays). 16 hours later, Tor dropped<br>below 2 Mbps.<br><br>I've removed all of these new settings and restarted.<br><br>--<br>Christopher Sheats (yawnbox)<br>Executive Director<br>Emerald Onion<br>Signal: +1 206.739.3390<br>Website: https://emeraldonion.org/<br>Mastodon: https://digitalcourage.social/@EmeraldOnion/<br><br><br><br><br><blockquote type="cite">On Dec 2, 2022, at 7:30 AM, Chris <tor@wcbsecurity.com> wrote:<br><br>Hi,<br><br>As I'm sure you've already gathered, your system is maxing out trying to<br>deal with all the connection requests. When inet_csk_get_port is called<br>and the port is found to be occupied then inet_csk_bind_conflict is<br>called to resolve the conflict. So in normal circumstances you shouldn't<br>see it in perf top much less at 79%. There are two ways to deal with it,<br>and each method should be complimented by the other. One way is to try<br>to increase the number of ports and reduce the wait time which you have<br>somehow tried. I would add the following:<br><br>net.ipv4.tcp_fin_timeout = 20<br><br>net.ipv4.tcp_max_tw_buckets = 1200<br><br>net.ipv4.tcp_keepalive_time = 1200<br><br>net.ipv4.tcp_syncookies = 1<br><br>net.ipv4.tcp_max_syn_backlog = 8192<br><br>The complimentary method to the above is to lower the number of<br>connection requests by removing the frivolous connection requests out of<br>the equation using a few iptables rules.<br><br>I'm assuming the increased load you're experiencing is due to the<br>current DDos attacks and I'm not sure if you're using anything to<br>mitigate that but you should consider it.<br><br>You may find something useful at the following  links<br><br>[1](https://github.com/Enkidu-6/tor-ddos)<br><br>[2](https://github.com/toralf/torutils)<br><br>[background](https://gitlab.torproject.org/tpo/community/support/-/issues/40093)<br><br>Cheers.<br><br>On 12/1/2022 3:35 PM, Christopher Sheats wrote:<br><blockquote type="cite">Hello tor-relays,<br><br>We are using Ubuntu server currently for our exit relays.<br>Occasionally, exit throughput will drop from ~4Gbps down to ~200Mbps<br>and the only observable data point that we have is a significant<br>increase in inet_csk_bind_conflict, as seen via 'perf top', where it<br>will hit 85% [kernel] utilization.<br><br>A while back we thought we solved with with two /etc/sysctl.conf<br>settings:<br>net.ipv4.ip_local_port_range = 1024 65535<br>net.ipv4.tcp_tw_reuse = 1<br><br>However we are still experiencing this problem.<br><br>Both of our (currently, two) relay servers suffer from the same<br>problem, at the same time. They are AMD Epyc 7402P bare-metal servers<br>each with 96GB RAM, each has 20 exit relays on them. This issue<br>persists after upgrading to 0.4.7.11.<br><br>Screenshots of perf top are shared<br>here: https://digitalcourage.social/@EmeraldOnion/109440197076214023<br><br>Does anyone have experience troubleshooting and/or fixing this problem?<br><br>Cheers,<br><br>--<br>Christopher Sheats (yawnbox)<br>Executive Director<br>Emerald Onion<br>Signal: +1 206.739.3390<br>Website: https://emeraldonion.org/<br>Mastodon: https://digitalcourage.social/@EmeraldOnion/<br><br><br><br><br><br>_______________________________________________<br>tor-relays mailing list<br>tor-relays@lists.torproject.org<br>https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays<br></blockquote></blockquote><br></blockquote></div></div></blockquote></div><br></body></html>