Java 17→25 upgrade plus 10 fixes cuts Cloud Run cold starts 62% to 5.0s

rseroter · x · 2026-11-20

By upgrading an app from Java 17 to Java 25 and applying a series of targeted fixes, Arun cut median cold start times on Google Cloud Run from 13.2s to 5.0s (62%). Measured medians per step: a 1s probe inflated startup to 18.1s (baseline reset); servlet registration in one loop −1.2s; Spring AOT −0.9s; JDK AOT cache −2.9s; JVM options −2.0s; fixing a service URL −4.0s (biggest single win); extracted jar −1.5s; removing AlwaysPreTouch −0.3s; dropping environment logging −0.5s; servlets by class −0.1s. Takeaway: the JDK upgrade alone isn't the win — AOT caching, JVM flags and deployment details do the heavy lifting.

Original post →

More from coding & agent

coding & agent channel →