Opened 14 years ago

#164 new task

measure memory usage per connection

Reported by: Brian Warner Owned by:
Priority: major Milestone: undecided
Component: performance Version: 0.5.1
Keywords: Cc:

Description

Reading http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html , I saw the following note:

OpenSSL tends to allocate about 50KB of memory for each connection. We have patched OpenSSL to reduce this to about 5KB and the Tor project have independently written a similar patch that is now upstream. (Check for SSL_MODE_RELEASE_BUFFERS in OpenSSL 1.0.0a.). Keeping memory usage down is vitally important when dealing with many connections.

and I remembered that we used to see bad memory usage in Foolscap applications that maintain open connections to hundreds of peers. I don't remember the details, but I think it was something like 1MB per connection or something crazy. This was back in 2005/2006.

One of the first things I did at Allmydata was to build a test harness to measure this memory usage. The task is to ressurect that harness, measure RAM footprint for 10/100/1k/10k connections, and figure out the slope. I'm ok with 50kB/connection for now, but if there's something we can do from Foolscap to hit 5kB instead, that'd be a nice improvement.

Change History (0)

Note: See TracTickets for help on using tickets.