question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenSSL server has a lower throughput than JDK SSL with larger responses

See original GitHub issue

Expected behavior

I expected the native OpenSSL provider to be faster than the JDK provider, no matter what the size of the response payload is.

Actual behavior

A Netty server using the JDK SSL provider is faster for any payload (I have tested 1MB up, and see the same results)

The results below are from running on an i3.xlarge EC2 box running Amazon Linux AMI 2018.03.0, but I have seen reproducible similar behaviour running on both Alpine Linux, and Os X 10.13.4.

OpenSSL on this EC2 box has the version:

$ openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017

Steps to reproduce

I have linked to a project that reproduces the problem reliably for me, running the runProfiling.sh script executes 6 tests.

  1. empty response (OpenSSL)
  2. empty response (JDK SSL)
  3. 5MB response (OpenSSL)
  4. 5MB response (JDK SSL)
  5. 20MB response (OpenSSL)
  6. 20MB response (JDK SSL)

The results for these tests (a full run takes around 60 mins) are then available in build/jmeter-report.

Empty Response

The empty test results are as expected;

OpenSSL image JDK image

5MB Response

The JDK SSL version gives a higher throughput than OpenSSL which is unexpected…

OpenSSL image JDK image

20MB response

Again, the JDK SSL version has a higher throughput

OpenSSL image JDK image

Minimal yet complete reproducer code (or URL to code)

https://github.com/timyates/netty-openssl-perf-test

Run ./runProfiling.sh and wait (around an hour) for the 6 tests to generate jMeter dashboards.

Netty version

4.1.25.Final

and

io.netty:netty-tcnative-boringssl-static:2.0.8.Final

JVM version (e.g. java -version)

openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

OS version (e.g. uname -a)

Linux ip-172-31-12-49 4.14.26-46.32.amzn1.x86_64 #1 SMP Fri Mar 30 22:29:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
normanmaurercommented, May 22, 2018

Also let me close this issue.

0reactions
normanmaurercommented, May 22, 2018

@timyates maybe you use Java 9 or higher on the system you run JMeter on ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable SSL/TLS Diffie-Hellman keys less that 2048 bits
This article describes how to disable certain TLS cipher suites used by Java applications such as Liberty, Solr and Zoopkeeper.
Read more >
Consolidated JDK 8 Release Notes - Oracle
In this release, the FTP Client has been enhanced to reject an address sent by a server, in response to a PASV command...
Read more >
Optimizing web servers for high throughput and low latency
We are going to discuss efficiency/performance optimizations of different layers of the system. Starting from the lowest levels like hardware ...
Read more >
The Cost of TLS in Java and Solutions
We have deployed TLS at a large scale using both hardware and software load balancers ... Looking at their server performance section chart, ......
Read more >
OpenSSL Command-Line HOWTO - madboa.com
The openssl command-line binary that ships with the OpenSSL ... If you don't have an SSL-enabled web server available for your use, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found