Feature #5183

[PATCH] openssl: add OP_NO_COMPRESSION constant

Added by Eric Wong over 2 years ago. Updated over 2 years ago.

[ruby-core:38911]
Status:Closed
Priority:Low
Assignee:Martin Bosslet
Category:ext
Target version:1.9.3

Description

Disabling OpenSSL compression can save memory since zlib buffers
enforce a rather large per-connection overhead. For
memory-constrained systems that have OpenSSL built against zlib,
there can be a drastic reduction in memory usage with 1000 open
connections:

Compression enabled
VmRSS: 596132 kB
Compression disabled
VmRSS: 21924 kB

The above was generated with openssl 1.0.0.d-3 on Debian testing
(x86_64). The NOCOMP environment variable controls compression
in the attached script.

If you prefer: git pull git://bogomips.org/ruby openssl-no-compression

0001-openssl-add-OP_NO_COMPRESSION-constant.patch Magnifier (3.29 KB) Eric Wong, 08/11/2011 05:52 AM

ossl-memory-usage-no-comp.rb Magnifier - script to test memory usage (1.06 KB) Eric Wong, 08/11/2011 05:52 AM

Associated revisions

Revision 32973
Added by emboss over 2 years ago

  • ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
  • test/openssl/test_ssl.rb: Add a test for it. Thanks to Eric Wong for the patch. [Ruby 1.9 - Feature #5183]

History

#1 Updated by Anonymous over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32973.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
  • test/openssl/test_ssl.rb: Add a test for it. Thanks to Eric Wong for the patch. [Ruby 1.9 - Feature #5183]

#2 Updated by Martin Bosslet over 2 years ago

  • Target version changed from 2.0.0 to 1.9.3

I can only repeat what Motohiro said the other day - thanks a lot
for your contribution, Eric!

I also backported this to 1.9.3, as I can only see benefit in this
patch.

It shouldn't affect the stability of 1.9.3. But please object if
anyone thinks different, then I would revert the commit right away.

#3 Updated by Motohiro KOSAKI over 2 years ago

2011/8/15 Martin Bosslet Martin.Bosslet@googlemail.com:

Issue #5183 has been updated by Martin Bosslet.

Target version changed from 1.9.x to 1.9.3

I can only repeat what Motohiro said the other day - thanks a lot
for your contribution, Eric!

I also backported this to 1.9.3, as I can only see benefit in this
patch.

It shouldn't affect the stability of 1.9.3.

At least, I agree with you. :)

But please object if
anyone thinks different, then I would revert the commit right away.

Also available in: Atom PDF