Subject: FW: Memory leak - Apache2.0.47 and openSSL 0.9.7c

From: "John Hughes" <[email-masked]>
Date: Fri, 19 Dec 2003 09:19:15 -0000

I've been performing some stress tests on the following environment:

- Redhat 8.0
- Apache web server 2.0.47
- openSSL 0.9.7c

the tests have involved accessing simple web pages many times using an
automated load generator.

Whilst memory utilization without mod_ssl load was seen to be flat (using
gkrellm) - as soon as I loaded mod_ssl and started to use SSL connections
memory increases and grows.

I've done tests with server authn and with client authn - there would appear
to be a memory leak in both cases.

In order to obtain more accurate memory utilization metrics due to httpd
with mod_ssl I've produced a utility that logged every minute the average
RSS over all of the httpd threads I had loaded (1074 in all).

In a period of 5 hours I had a leak of 25 Mbytes - per httpd thread

A few more details on the test:
	- 100 "virtual" clients
	- total load of about 45 trans/sec - because of a few embedded images this
results in about 70->80/sec HTTP GETs
	- each HTTP GET in general will result in a new SSL connection
	- in all about 500,000 trans where performed.

Please let me know if you would like any other information.  I do have
output from the load generator and the utility that I can send anyone.

John

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Mads Toftum <[email-masked]>
Date: Fri, 19 Dec 2003 10:37:12 +0100

> output from the load generator and the utility that I can send anyone.
What type of SSLSessionCache are you using? Do you any any 3rd party
modules?
Please also note that the current release version is 2.0.48

vh

Mads Toftum
-- 
`Darn it, who spiked my coffee with water?!' - lwall

---

From: "John Hughes" <[email-masked]>
Date: Fri, 19 Dec 2003 11:01:57 -0000

I have no 3rd party modules loaded.  The testing I did was with and without
mod_ssl loaded.  Only when mod_ssl was loaded - and SSL was used - did I see
a memory leak under load.

My SSLSessionCache values are the default and are:

SSLSessionCache		dbm:logs/ssl_scache
SSLSessionCacheTimeout	300

John

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Mads Toftum
> Sent: 19 December 2003 09:37
> To: [email-masked]
> Subject: Re: FW: Memory leak - Apache2.0.47 and openSSL 0.9.7c
>
>

---

From: Mads Toftum <[email-masked]>
Date: Fri, 19 Dec 2003 13:58:32 +0100

> SSLSessionCacheTimeout	300
On linux you really should be using a shared memory session cache - like
SSLSessionCache shmcb:logs/ssl_gcache_data(512000)
SSLSessionCacheTimeout        300

vh

Mads Toftum

---

From: "John Hughes" <[email-masked]>
Date: Mon, 22 Dec 2003 20:05:46 -0000

Mads,

that worked - thank you.

Had my test harness working for about 75 hours - and performed about 13
Million trans.  Not a memory leak in sight.

Thanks again

John

> Sent: 19 December 2003 12:59