(dist)(iseries)Secure Sockets Layer performance tips
Use this page to learn about SSL performance tips. Be sure to consider that performance issues typically involve trade-offs between function and speed. Usually, the more function and the more processing involved, the slower the performance.
The following are two types of SSL performance:
- Handshake
- Bulk encryption and decryption
When an SSL connection is established, an SSL handshake occurs.When a connection is made, SSL performs bulk encryption and decryption for each read/write. The performance cost of an SSL handshake is much larger than that of bulk encryption and decryption.
To enhance SSL performance, decrease the number of individual SSL connections and handshakes.
Decreasing the number of connections increases performance for secure communication through SSL connections, as well as non-secure communication through simple Transmission Control Protocol/Internet Protocol (TCP/IP) connections. One way to decrease individual SSL connections is to use a browser that supports HTTP 1.1. Decreasing individual SSL connections can be impossible if we cannot upgrade to HTTP 1.1.
Another common approach is to decrease the number of connections (both TCP/IP and SSL) between two WebSphere Application Server components. The following guidelines help to verify that the HTTP transport of the application server is configured so that the web server plug-in does not repeatedly reopen new connections to the application server:
- Verify that the maximum number of keep alives are, at minimum, as large as the maximum number of requests per thread of the web server (or maximum number of processes for IBM HTTP Server on UNIX). Make sure the web server plug-in is capable of obtaining a keep alive connection for every possible concurrent connection to the application server. Otherwise, the application server closes the connection when a single request is processed. Also, the maximum number of threads in the web container thread pool should be larger than the maximum number of keep alives, to prevent the keep alive connections from consuming the web container threads.
HTTP Transports have been deprecated. For instructions on how to set a maximum keep alive value for channel-based configurations, see. HTTP transport channel settings
- Increase the maximum number of requests per keep alive connection. The default value is 100, which means the application server closes the connection from the plug-in following 100 requests. The plug-in then must open a new connection. The purpose of this parameter is to prevent denial of service attacks when connecting to the application server and preventing continuous send requests to tie up threads in the application server.
- Use a hardware accelerator if the system performs several SSL handshakes.
Hardware accelerators that are currently supported by the WAS increase the SSL handshake performance, not the bulk encryption, and decryption. An accelerator typically benefits the web server because web server connections are short-lived. All other SSL connections in WebSphere Application Server are long-lived.
(iseries) The IBM Cryptographic Coprocessor is not supported for use with WebSphere Application Server. However, we can use the IBM Cryptographic Coprocessor to improve SSL performance for other products, such as IBM HTTP Server for iSeries , which is powered by Apache.
- Use an alternative cipher suite with better performance.
The performance of a cipher suite is different from software and hardware. Just because a cipher suite performs better in software does not mean that a cipher suite will perform better with hardware. Some algorithms are typically inefficient in hardware, for example, Data Encryption Standard (DES) and triple-strength DES (3DES); however, specialized hardware can provide efficient implementations of these same algorithms.
The performance of bulk encryption and decryption is affected by the cipher suite used for an individual SSL connection. The following chart displays the performance of each cipher suite. The test software calculating the data was Java Secure Socket Extension (JSSE) for both the client and server software, which used no cryptographic hardware support. The test did not include the time to establish a connection, but only the time to transmit data through an established connection. Therefore, the data reveals the relative SSL performance of various cipher suites for long running connections.
Before establishing a connection, the client enables a single cipher suite for each test case. After the connection is established, the client times how long it takes to write an integer to the server and for the server to write the specified number of bytes back to the client. Varying the amount of data had negligible effects on the relative performance of the cipher suites.
An analysis of the previous data reveals the following:
- Bulk encryption performance is only affected by what follows theWITH in the cipher suite name because the portion preceding the WITH identifies the algorithm used only during the SSL handshake.
- MD5 and Secure Hash Algorithm SHA are the two hash algorithms used to provide data integrity. MD5 is generally faster than SHA, however, SHA is more secure than MD5.
- DES and RC2 are slower than RC4. Triple DES is the most secure, but the performance cost is high when using only software.
- The cipher suite providing the best performance while still providing privacy is SSL_RSA_WITH_RC4_128_MD5. Even though SSL_RSA_EXPORT_WITH_RC4_40_MD5 is cryptographically weaker than RSA_WITH_RC4_128_MD5, the performance for bulk encryption is the same. Therefore, as long as the SSL connection is a long-running connection, the difference in the performance of high, and medium security levels is negligible. IBM recommends that a security level of high be used, instead of medium, for all components participating in communication only among WebSphere Application Server products. Make sure the connections are long running connections.
Related tasks
Tune security performance