oci-java-sdk
oci-java-sdk copied to clipboard
Performance regression in versions 2.14.1 and later for all API operations
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 theOCI_JAVASDK_JERSEY_CLIENT_DEFAULT_CONNECTOR_ENABLED
environment variable totrue
or any other methods mentioned here - Disable the use of
NoConnectionReuseStrategy
for theApacheConnectorProvider
by setting theApacheConnectorProperties.connectionReuseStrategy
tonull
andApacheConnectorProperties.requestRetryHandler
tonull
// 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.
Hello y-chandra, Could you please share plan when are we targeting this issue to be fixed? Thanks, Tej
@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.