oci-java-sdk icon indicating copy to clipboard operation
oci-java-sdk copied to clipboard

Performance regression in versions 2.14.1 and later for all API operations

Open y-chandra opened this issue 2 years ago • 2 comments

Update : We have fixed this issue in version 2.66.2 and 3.31.0 of the SDK by using an idle connection monitor. More details can be found here


In versions 2.14.1 and later, you may encounter performance regressions when using the SDK to call API operations to any of the OCI services. The regression ranges from 30% to 60% increase in latency in SDK operations to any of the OCI services.

If you are experiencing this issue, and would like to get the older performance back, there are some workarounds you can do:

  • Switch back to the Jersey’s default HttpUrlConnectorProvider by setting the OCI_JAVASDK_JERSEY_CLIENT_DEFAULT_CONNECTOR_ENABLED environment variable to true or any other methods mentioned here
  • Disable the use of NoConnectionReuseStrategy for the ApacheConnectorProvider by setting the ApacheConnectorProperties.connectionReuseStrategy to null and ApacheConnectorProperties.requestRetryHandler to null
// For clients that should not buffer requests into memory
ObjectStorageClient client = ObjectStorageClient.builder().clientConfigurator(new ApacheConfigurator.NonBuffering(
        ApacheConnectorProperties.builder().
                .connectionReuseStrategy(null)
                .requestRetryHandler(null)
                .build()
)).build(provider);

// For clients that should buffer requests into memory
IdentityClient identityClient = IdentityClient.builder().clientConfigurator(new ApacheConfigurator(
        ApacheConnectorProperties.builder()
                .connectionReuseStrategy(null)
                .requestRetryHandler(null)
                .build()
)).build(provider);

  • Or, use SDK version 2.14.0 or earlier.

If you have any questions, please feel free to comment on this GitHub issue and we will be happy to help.

y-chandra avatar Mar 31 '22 19:03 y-chandra

Hello y-chandra, Could you please share plan when are we targeting this issue to be fixed? Thanks, Tej

tejpratap1983 avatar Sep 23 '22 05:09 tejpratap1983

@tejpratap1983 , please see the update at the very top of this issue:

Update : The change that causes the performance regression fixes the issue of the Apache client retrying internally and hence takes priority over the performance regression. Hence, we will not be working on the fix. Please use the below suggested workarounds if you encounter any performance regressions.

Please use one of the described workarounds.

mricken avatar Sep 23 '22 16:09 mricken