SSL performance results

In following with the previous tests, I performed a performance test of IO and Converted IO with SSL.

The testing environment is the same as the previous tests except that anonymous software SSL was enabled.

There are a total of three cases:

  • IO Server, IO Client
  • Converted IO Server, Converted IO Client
  • Converted IO w/ Selector Server, Converted IO Client

“IO” uses the standard Java IO (from the “Converted IO” is an NIO wrapper to InputStream and OutputStream. The server with “Converted IO” uses a separate thread per client. The server with “Converted IO w/ Selector” uses a single thread for all clients and switches between them using an NIO Selector.

SSL IO Server, IO Client SSL Converted IO Server, Converted IO Client
SSL Converted IO w/ Selector Server, Converted IO Client

Analysis (see the previous tests for more analysis):

  • Comparing with the non-SSL tests you can see that there is a significant (~50%) but expected loss in throughput.
  • As hoped, the difference between Converted IO and Converted IO using a Selector decreased dramatically (from ~33% to ~7%) due to the overhead of SSL.
  • Unfortunately, the difference between IO and Converted IO became more pronounced (from ~11% to ~25%). I do not have an explanation at this point and more investigation is needed.

A special thanks goes out to Carlo Segre for use of the cluster.

Link-back to main entry: NIO and SSL.



  1. Nice article. What application did you use to make the graphics showing the results?
    What specific unit test code did you use to get the response values?
    Your code only shows the client and the server.
    Juan C.

  2. Thank you for your interest!
    The response values *are* written in the client code (see What is not included in the mechanism that creates a whole bunch of clients, sets their parameters and starts them running (i.e. the “test harness”).
    The graphs themselves where done in Excel. Normally I use GnuPlot but I had Excel in front of me so I used it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s