<p>We use OpenShift 3.6 as our Cloud PaaS, I'm testing out Spring Boot and Vert.X applications that connect to Couchbase Cluster. The default POD sizes that are available are 250millicore X 1 GB, 400millicore X 1.5 GB and 1core X 3 GB.</p>

<p>When I try to deploy the applications (Spring Boot / Vert.X) I observe bootstrap times of > 2-3 minutes in the 250millicore POD vs 45 seconds on 1Core POD. Consequently the Couchbase bootstrap is taking a lot of time on the 250millicore POD which is breaching its default Connect Timeouts and is crashing the application. </p>

<p>If I increase the timeouts, the app starts however it is sluggish when ever any transactions are performed. I could use the 1 X 3 POD but there is an increased cost involved to it. I however dont seem to have any problem with memory used.</p>

<p>Q1) What is the CPU dependency of the JVM during the startup (spinning new threads, processing in-memory, classloading etc.).</p>

<p>Q2) I know that JVM is resource intensive during startup but <strong>is there a minimum recommended POD size for the stack in use</strong> on which the app performs decently.</p>

<p>Q3) If a higher POD size is a default requirement of a Java app/JVM, doesn't it defy the concept of being able to use it as a micro-service which should be lightweight.</p>

<p>I have tweaked around with the JVM parameters, Xmx, Xms and different combinations of GC like the G1GC, ParallelGc etc (to see if it might play out differently) but keep experiencing the same bootstrap times. The only thing that seem to have an effect is the CPU size.</p>

<p>Spring boot v2.1
OpenShift v3.6
Couchbase v5.1
Java v1.8.161
CB SDK 2.5.7</p>

<p><a href="https://i.stack.imgur.com/Dx41D.png" rel="nofollow noreferrer">Attached is a VisualVM snapshot of the app on my local machine (i5 - 4 core)</a>
This seem to taking around 30% of CPU capacity during the initial period of the app life-cycle.</p>

<p>Hello on Openshift you can set a request and a limit value. For my Spring boot application I've set the max allowed on limit value, because for your Spring Boot JVM, more CPU You have and quicker you start. Then I've set the request to be sufficient regarding my application nominal traffic. I've write step by step how I've sized my app on <a href="https://loadteststories.com/java-kubernetes-sizing-my-docker-openjdk-spring-boot-microservice/" rel="nofollow noreferrer">this post</a>. This should answer to your questions.</p>
