<html>Hi<br /><br />I think Tor is using libraries for this functions. If the libraries in question supports QAT, then it should accelerate Tor too. If the libraries don't support QAT, then maybe it could be replaced by a library supporting it.<br /><br />In older days, I've seen configuration options in programs to activate hardware acceleartion of the library, setting environment variables for the library or other ways of control.<br /><br />Cheers<br />Andreas<br /><br />On Saturday, June 22, 2024 23:14 CEST, mail--- via tor-relays <tor-relays@lists.torproject.org> wrote:<br /> <blockquote type="cite" cite="O00ar31--N-9@nothingtohide.nl"> </blockquote><meta http-equiv="content-type" content="text/html; "><div dir="auto">Hi o/,</div><div dir="auto"> </div><div dir="auto">During the Tor Operator Meetup I asked about Quick Assist Technology (QAT) support and was asked to bring it to the tor-relays mailing list so the network team can take a look at the question.</div><div dir="auto"> </div><div dir="auto">In 2025 we're going to build one or more new servers and we're looking in to optimizing the performance per watt ratio since some of our current servers are rather power hungry ;-).</div><div dir="auto"> </div><div dir="auto">I'm wondering whether QAT works for Tor to offload compression, hashing and encryption. In theory, looking at the nature of Tor (a lot encryption), this could result in a huge performance boost of 100-300% (based on other hashing, cryptographic and compression offload benchmarks). Support for QAT also has improved considerably over the years so many programs/workloads already work nicely with it, but I'm not sure about Tor.</div><div dir="auto"> </div><div dir="auto"><span>It looks like Tor uses [1] RSA-1024, AES-CBC, AES-CTR, </span>Curve25519, Ed25519, <span>SHA1, AES256, AES3-256. Most (no Curve- and Ed25519) should in theory also work with QAT [2] (although I guess only a few would impact performance significantly when offloaded). But the question is: does it really work? If not, what would be needed to make it work? Are there Tor operators who already utilize QAT? Does the Network Team have some insight in to this? :)</span></div><div dir="auto"> </div><div dir="auto"><span>Some of the potential advantages when comparing a similar amount of traffic:</span></div><div dir="auto"><span>- Lower power consumption (much cheaper to run in expensive European countries).</span></div><div dir="auto"><span>- Less CPU cycles required (= cheaper CPUs).</span></div><div dir="auto"><span>- Less heat/cooling required (easier to put in distribution boxes and other small places).</span></div><div dir="auto"><span>- Smaller physical footprint (easier to put in distribution boxes and other small places).</span></div><div dir="auto"><span>- Alleviates some of the issues and challenges caused by Tor's single threaded architecture by effectively increasing bandwidth per CPU core considerably.</span></div><div dir="auto"> </div><div dir="auto"><span>With regards,</span></div><div dir="auto"> </div><div dir="auto"><span>tornth</span></div><div dir="auto"> </div><div id="magicdomid1001" aria-live="assertive"><span>[1] </span><span><a rel="noopener noreferrer" target="_blank" href="https://spec.torproject.org/tor-spec/preliminaries.html?highlight=cipher#ciphers">https://spec.torproject.org/tor-spec/preliminaries.html?highlight=cipher#ciphers</a></span></div><div id="magicdomid1007" aria-live="assertive"><span>[2] </span><span><a rel="noopener noreferrer" target="_blank" href="https://www.intel.com/content/www/us/en/support/articles/000093843/technologies/intel-quickassist-technology-intel-qat.html">https://www.intel.com/content/www/us/en/support/articles/000093843/technologies/intel-quickassist-technology-intel-qat.html</a></span></div><div id="magicdomid1020" aria-live="assertive"> </div><br /><br /> </html>