Memory usage on relays

Nick Mathewson nickm at freehaven.net
Mon Jan 18 03:31:34 UTC 2010


On Sun, Jan 17, 2010 at 9:36 PM, Roger Dingledine <arma at mit.edu> wrote:
> On Sun, Jan 17, 2010 at 06:41:03PM -0700, John Brooks wrote:
>> I run a reasonably fast (500KB/s) node with Guard+Fast+Stable, so it's
>> a popular destination. It runs at bandwidth capacity at all times. The
>> only problem with this is the massive memory usage that results; at
>> the moment, Tor has 748MB res usage, with almost 7 days of uptime.
>> Generally it escalates at a rate of 100-200MB per day after a restart,
>> and tops out around this number. My understanding is that most of that
>> memory usage is related to the open connections; socket buffers, SSL
>> buffers, etc. At the moment (according to /proc/x/fd), Tor has 5,364
>> open connections.
>
> Nick wrote an OpenSSL patch to not waste so much memory in its internal
> buffers. See item #3 on
> http://archives.seul.org/or/dev/Jun-2008/msg00001.html
>
> I ran a super-fast Tor relay recently that held 15000 TLS connections
> open. That's 550MB of ram wasted inside openssl.
>
> That said, I don't know what the current state of the patch is, or where
> you can get a copy. Nick?

It's in recent versions of OpenSSL (recent as in the 1.0.0 beta versions.)

If you would rather try patching an older version of OpenSSL yourself, try out
http://freehaven.net/~nickm/openssl_mem/openssl-mem-patch-v17.txt
I have no idea whether it applies cleanly (or at all) to older versions.

hth,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo at torproject.org with
unsubscribe or-talk    in the body. http://archives.seul.org/or/talk/



More information about the tor-talk mailing list