﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
164	measure memory usage per connection	Brian Warner		"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.
"	task	new	major	undecided	performance	0.5.1			
