<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
<div>Hi,<br></div><div dir="auto"><br></div><div dir="auto"><i>> </i><span style=""><span class="" style=""><span class="" style="font-family:Verdana, sans-serif"><span class="" style=""><span class="" style="font-size:16px"><i>No network experience but already running 2 TOR instances: 1 TOR service + 1 bridge.</i></span></span></span></span></span><br></div><div dir="auto"><span style=""><span class="" style=""><span class="" style="font-family:Verdana, sans-serif"><span class="" style=""><span class="" style="font-size:16px"></span></span></span></span></span><br></div><div dir="auto">Very nice! You're asking some great questions and I'll try to answer as many as I can :).<br></div><div dir="auto"><br></div><div dir="auto"><i>> My
 preferred choice at the moment is [3] where I would like to have 3 
relays (one of each type; 3.5 GB RAM needed).</i><br></div><div dir="auto"><br></div><div dir="auto">In most cases guard and middle relays are the same thing (they are both at the same time in most cases). So in your case, instead of hosting one guard, one middle and one exit, it probably makes more sense to host two guard/middle relays and one exit relays (or one guard/middle and two exits, which probably is more useful tot he network).<br></div><div dir="auto"><br></div><div dir="auto"><i>> The [TOR-friendly] ISP I'm looking at have these 4 offers available:</i><br></div><div dir="auto"><br></div><div dir="auto">Are these monthly bandwidth allowances tx/rx (send + receive traffic) combined or based on the highest of the two? In the former, you would only have half of it effectively since Tor's traffic is more or less symmetrical in nature. That's good to know beforehand.<br></div><div dir="auto"><br></div><div dir="auto">I'm running a few exit relays on a basic VPS with one similar core and 2GB of ram and those move ~23 TB a month (rx+tx combined). Do note that this VPS provider has extremely poor CPU performance that doesn't even come remotely close to proper virtualized CPU performance (let alone bare metal). But this being the case and assuming the VPS provider you are looking at has similar or better CPU performance, you will easily move more traffic than the monthly allowance on any of their offerings. In other words: without a increase in monthly allowance your CPU will either be idle for a large portion of the month (e.g. AccountingMax) or will be idling a lot (e.g. BandwidthRate).<br></div><div dir="auto"><br></div><div dir="auto">If you think that's undesirable, you might inquiry about increasing the monthly allowance beforehand or look for another provider. But on the other hand, it will still be useful to the Tor network and you will also be able to learn and get experience from such a setup (which is one of your goals) so there also is nothing wrong with going with one of the options you mentioned :-).<br></div><div dir="auto"><br></div><div dir="auto"><i>> From </i><a target="_blank" rel="noopener noreferrer" href="https://community.torproject.org/relay/relays-requirements/" title="relay requirements"><i>relay requirements</i></a><i>, my understanding is that [1] is what is expected for a guard or middle relay and [2] for an exit relay.</i><br></div><div dir="auto"><br></div><div dir="auto">Although these memory requirements are fine to use as a 'bare minimum', it will change a lot when multiple relays are being hosted. For example, if I would take the requirement page literally I would need 60 GB of ram for my Tor relays (40 per server), but in reality they never come even close to 30% of that. Running a few relays on 1-2 CPU cores with limited RAM is fine, but just keep an eye on it and don't run other memory intensive stuff on the server (like DNS query caching, which can take quite some RAM as well).<br></div><div dir="auto"><br></div><div dir="auto"><i>> I
 guess my fundamental question is what is the advantage of running 
multiple relays of the same type, on the same server? I see some 
operators running dozens of them, all in the same country, same ISP. Why
 not just a single relay running with a large capacity?</i><br></div><div dir="auto"><br></div><div dir="auto">Sadly the current Tor relay software can't use multiple cores effectively, so it won't scale at all on multi thread CPU architectures. Ideally I would run one relay per server, but because of this limitation in Tor's architecture the only other way to utilize the CPU to its full potential is by running many relays.<br></div><div><br></div><div dir="auto"><i>> Also, is there a
 requirement for the number of relays per core? (Maybe this is the answer to my question.)</i><br></div><div dir="auto"><br></div><div dir="auto">Not really, unless you're really optimizing for max. bandwidth per CPU. You could run one relay per physical core, one relay per thread or even multiple relays per thread on modern hardware and it wouldn't matter much as long as there is enough headroom for the memory overhead of multiple processes. In my experience, one relay per CPU core isn't enough to saturate a modern CPU. Even running one relay per thread (in the case of SMT) often isn't enough.<br></div><div dir="auto"><br></div><div dir="auto">But in a lot of cases people run Tor relays on type 1 or type 2 hypervisors with OS virtualization (typical VPS providers), and then the OS that you use for Tor won't have control over the CPU threads and hence can't optimize this meaningfully. In that case it depends more on the amount of RAM (which is often limited on cheap VPS) you have available for running additional relays.<br></div><div dir="auto"><br></div><div dir="auto"><i>> I know my bridge is currently 
keeping one core of my 2-core server constantly under load.</i><br></div><div dir="auto"><br></div><div dir="auto">If your monthly bandwidth allowance, bandwidth and electricity consumption allow for it, then I would always advise to run more relays to use the CPU more effectively. It's a waste of good CPU cycles to not saturate it! ^_^<br></div><div dir="auto"><br></div><div dir="auto">Hopefully this was useful to you and don't hesitate to ask more or follow-up questions!<br></div><div dir="auto"><br></div><div dir="auto">Cheers,<br></div><div dir="auto"><br></div><div dir="auto">NTH<br></div><div><br></div><div>Mar 7, 2023, 08:14 by sydney+tor@liaison.club:<br></div><blockquote class="tutanota_quote" style="border-left: 1px solid #93A3B8; padding-left: 10px; margin-left: 5px;"><div><span style=""><span style="font-family:Verdana, sans-serif" class=""><span style="font-size:16px" class="">Newbie here.  No network experience but already running 2 TOR instances: 1 TOR service + 1 bridge.</span></span></span><br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">I would like to "upgrade" to TOR relays but have a few questions relating to hardware needs.<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">The [TOR-friendly] ISP I'm looking at have these 4 offers available:<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">[1]<br></div><div style="font-family:Verdana, sans-serif;font-size:16px">1 core @ 3.1GHz<br></div><div style="font-family:Verdana, sans-serif;font-size:16px">1 GB RAM<br></div><div style="font-family:Verdana, sans-serif;font-size:16px">10 TB/mo @ 5 Gbps BW<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">[2]<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><div><span>1 core @ 3.1GHz</span><br></div><div>2 GB RAM<br></div><div><span>10 TB/mo @ 5 Gbps BW</span><br></div></div><div style="font-family:Verdana, sans-serif;font-size:16px"><span></span><br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><span>[3]</span><br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><div><span><span>2 core @ 3.1GHz</span></span><br></div><span><div>4 GB RAM<br></div></span><div><span><span>20 TB/mo @ 5 Gbps BW</span></span><br></div></div><div style="font-family:Verdana, sans-serif;font-size:16px"><span></span><br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><span>[4]</span><br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><span><div><span>3 core @ 3.1GHz</span><br></div><div>12 GB RAM<br></div><div><span>30 TB/mo @ 5 Gbps BW</span><br></div></span></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">From <a title="relay requirements" href="https://community.torproject.org/relay/relays-requirements/" rel="noopener noreferrer" target="_blank">relay requirements</a>, my understanding is that [1] is what is expected for a guard or middle relay and [2] for an exit relay.<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">My
 preferred choice at the moment is [3] where I would like to have 3 
relays (one of each type; 3.5 GB RAM needed). Each relay would be 
limited to, say, 6.6 TB/mo BW. This would allow me to experiment and get
 used to the network and its requirements.<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">My questions is about future increase. If I want to increase my offer to the TOR network I could:<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><div><br></div><ul><li>Negotiate with my ISP to increase my BW to 30 TB/mo while still running on [3] and increase each BW limit to 10 TB/mo;<br></li><li>Move my 3 relays on [4] and increase each BW limit to 10 TB/mo;<br></li><li>Move
 my 3 relays on [4], add 2 IP addresses and 6 relays (2 of each type; 
10.5 GB RAM needed total), and limit each relay to 3.3 TB/mo.<br></li></ul></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div style="font-family:Verdana, sans-serif;font-size:16px">I
 guess my fundamental question is what is the advantage of running 
multiple relays of the same type, on the same server? I see some 
operators running dozens of them, all in the same country, same ISP. Why
 not just a single relay running with a large capacity? Also, is there a
 requirement for the number of relays per core? (Maybe this is the answer to my question.) I know my bridge is currently 
keeping one core of my 2-core server constantly under load.<br></div><div style="font-family:Verdana, sans-serif;font-size:16px"><br></div><div><span style=""><span style="font-family:Verdana, sans-serif" class=""><span style="font-size:16px" class="">Thank in advance.</span></span></span><br></div><div style="font-family: Verdana, sans-serif; font-size: 16px;"><br></div></blockquote><div dir="auto"><br></div>  </body>
</html>