0

Our processing applications running on each OCI instance need to use OCI SDK to make certain requests and a couple of them are taking a lot longer than expected to complete. Other methods elsewhere in our code seems to run fine so I'm wondering what is going on if its an SDK issue or something on an infra level combined with the method as to why it's taking so long for just these two. Especially the ComputeClient.builder().build() which takes over 2 minutes

Here are the SDK methods in question. AbstractAuthenticationDetailsProvider provider = InstancePrincipalsAuthenticationDetailsProvider.builder().build(); //this one takes around 20 seconds to finish

ComputeClient computeClient = ComputeClient.builder().region(Region.fromRegionCodeOrId("us-sanjose-1")).build(provider); //this one takes around 2 minutes to finish

These 2 methods eventually complete and there are no errors or warnings. If you have any idea on why they take so long or ways to reduce them let me know.

We use the 3.5.0 version of the Java SDK, we use OpenJDK 8 as the runtime environment. The server specs are: VM.Standard.E4.Flex, 4 OCPUs, 16 GB of Memory, Ubuntu 20.04 running in OCI San Jose region

Tried the two methods...and they run to completion, but run extremely slowly in relation to the dozens of methods we are using in the SDK elsewhere. How can we optimize these two to run at a similar speed to all the other methods we are leveraging?

  • Hi - can you try running these commands with debug logging on, and share the debug logs? From the timestamps in those logs we may be able to see exactly where the slow downs are. You can enable debug logs following https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm#logging Also, can you try with the latest 2.x version of the OCI Java SDK? I'm wondering if this is maybe a bug specific to the 3.x version of the SDK. – Joe Mar 31 '23 at 23:21

0 Answers0