Project

General

Profile

Actions

Feature #4672

closed

[PATCH] openssl: enable SSL_MODE_RELEASE_BUFFERS if available

Added by normalperson (Eric Wong) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
[ruby-core:36127]

Description

Available in OpenSSL 1.0.0a and later, this can save up to 34KB
per idle connection.

Using the test script below run with the time(1) command on 64-bit
Linux (needs /proc/$PID/status to grab VmRSS:)

before

conn_clients: 500
srv_clients: 500
VmRSS: 65428 kB
19.18user 1.86system 0:20.72elapsed 101%CPU (0avgtext+0avgdata 263952maxresident
0inputs+0outputs (0major+56932minor)pagefaults 0swaps

after

conn_clients: 500
srv_clients: 500
VmRSS: 19228 kB
19.41user 1.53system 0:20.64elapsed 101%CPU (0avgtext+0avgdata 77424maxresident)
0inputs+0outputs (0major+20845minor)pagefaults 0swaps

(test script attached)

You can also pull my change via git:

git clone git://bogomips.org/ruby.git ssl-memory


Files

0001-openssl-enable-SSL_MODE_RELEASE_BUFFERS-if-available.patch (2.75 KB) 0001-openssl-enable-SSL_MODE_RELEASE_BUFFERS-if-available.patch patch to enable SSL_MODE_RELEASE_BUFFERS normalperson (Eric Wong), 05/12/2011 04:05 PM
openssl_memory.rb (1.1 KB) openssl_memory.rb test script used to generate output normalperson (Eric Wong), 05/12/2011 04:05 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0