Comments on: Resize CPU Limit To Speed Up Java Startup on Kubernetes https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/ Java, Spring, Kotlin, microservices, Kubernetes, containers Mon, 15 Jan 2024 14:18:42 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2260 Mon, 15 Jan 2024 14:18:42 +0000 https://piotrminkowski.com/?p=14406#comment-2260 In reply to Mikołaj Stefaniak.

Cool idea! Thanks for that tip. I’ll take a look on it.

]]>
By: Mikołaj Stefaniak https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2176 Thu, 02 Nov 2023 13:55:15 +0000 https://piotrminkowski.com/?p=14406#comment-2176 I’m working on a similar approach to the one proposed by Piotr but with a dedicated k8s operator rather than Kyverno. Such approach gives more flexibility for approaching different aspects of this particular problem IMO. We have PoC of a working Kube Startup CPU Boost operator so far (https://github.com/google/kube-startup-cpu-boost)

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2123 Thu, 07 Sep 2023 22:05:56 +0000 https://piotrminkowski.com/?p=14406#comment-2123 In reply to Ahmet.

Hi,
Good question. For sure you can do that into several different ways. For example, with ArgoCD Events. But are those things more lightweignt than Kyverno? Hard to say for me

]]>
By: Ahmet https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2120 Thu, 07 Sep 2023 13:24:02 +0000 https://piotrminkowski.com/?p=14406#comment-2120 Hi Piotr,
This is a great way for fast Java starts.
Is there a more lightweight alternative to use instead of kyverno?
Thanks

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2100 Fri, 25 Aug 2023 08:20:48 +0000 https://piotrminkowski.com/?p=14406#comment-2100 In reply to Phanideep.

Please, double check you have run minikube properly:
“`
minikube start –memory=’8g’ –feature-gates=InPlacePodVerticalScaling=true
“`

]]>
By: Phanideep https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2099 Thu, 24 Aug 2023 10:14:47 +0000 https://piotrminkowski.com/?p=14406#comment-2099 I have tried the same but getting below error, can some one help on this
background/resize-pod-policy “msg”=”failed to update target resource” “error”=”Pod \”sample-kotlin-spring-784b96f988-tzzm2\” is invalid: spec: Forbidden: pod updates may not change fields

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2098 Wed, 23 Aug 2023 21:15:06 +0000 https://piotrminkowski.com/?p=14406#comment-2098 In reply to rocketraman.

Yes, I need to take a look on it (this case with CPUs and GC).

]]>
By: rocketraman https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2095 Wed, 23 Aug 2023 12:56:54 +0000 https://piotrminkowski.com/?p=14406#comment-2095 Very intesting article, thank you. Regarding @Mahatma Fatal ‘s comment above, he has a very valid point. The JVM chooses a garbage collector — for the entire life of the application — based on the CPU cores available at startup. By allocating more cores at startup, you are subverting this choice. It may or may not be suboptimal for whatever workload is running in the pod, but it is something worth considering when using this technique.

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2091 Tue, 22 Aug 2023 21:16:28 +0000 https://piotrminkowski.com/?p=14406#comment-2091 In reply to elia rohana.

Hi,
I can agree with you – in my opinion setting CPU request is enought. But many people set CPU limits for their apps on k8s. This article is for them

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/08/22/resize-cpu-limit-to-speed-up-java-startup-on-kubernetes/#comment-2090 Tue, 22 Aug 2023 21:12:54 +0000 https://piotrminkowski.com/?p=14406#comment-2090 In reply to Mahatma Fatal.

Hi, it’s about startup time not gc. I’m not very sure what you mean

]]>