Using Logic Apps (Consumption)? Tell us what’s keeping you there
June 4, 2025Microsoft 365 data residency offerings now available in Malaysia
June 4, 2025Optimizing JVM Configuration for Azure Deployments
Tuning the Java Virtual Machine (JVM) for cloud deployments is notoriously challenging. Over 30% of developers tend to deploy Java workloads with no JVM configuration at all, therefore relying on the default settings of the HotSpot JVM.
The default settings in OpenJDK are intentionally conservative, designed to work across a wide range of environments and scenarios. However, these defaults often lead to suboptimal resource utilization in cloud-based deployments, where memory and CPU tend to be dedicated for application workloads (use of containers and VMs) but still require intelligent management to maximize efficiency and cost-effectiveness.
To address this, we are excited to introduce jaz, a new JVM launcher optimized specifically for Azure. jaz provides better default ergonomics for Java applications running in containers and virtual machines, ensuring a more efficient use of resources right from the start, and leverages advanced JVM features automatically, such as AppCDS and in the future, Project Leyden.
Why jaz?
Conservative Defaults Lead to Underutilization of Resources
When deploying Java applications to the cloud, developers often need to fine-tune JVM parameters such as heap size, garbage collection strategies, and other tuning configurations to achieve better resource utilization and potentially higher performance. The default OpenJDK settings, while safe, do not take full advantage of available resources in cloud environments, leading to unnecessary waste and increased operational costs.
While advancements in dynamic heap sizing are underway by Oracle, Google, and Microsoft, they are still in development and will be available primarily in future major releases of OpenJDK. In the meantime, developers running applications on current and older JDK versions (such as OpenJDK 8, 11, 17, and 21) still need to optimize their configurations manually or rely on external tools like Paketo Buildpacks, which automate tuning but may not be suitable for all use cases.
With jaz, we are providing a smarter starting point for Java applications on Azure, with default configurations designed for cloud environments. The jaz launcher helps by:
- Optimizing resource utilization: By setting JVM parameters tailored for cloud deployments, jaz reduces wasted memory and CPU cycles.
- Improve first-deploy performance: New applications often require trial and error to find the right JVM settings. jaz increases the likelihood of better performance on first deployment.
- Enhance cost efficiency: By making better use of available resources, applications using jaz can reduce unnecessary cloud costs.
This tool is ideal for developers who:
- Want better JVM defaults without diving deep into tuning guides
- Develop and deploy cloud native microservices with Spring Boot, Quarkus, or Micronaut
- Prefer container-based workflows such as Kubernetes and OpenShift
- Deploy Java workloads on Azure Container Apps, Azure Kubernetes Service, Azure Red Hat OpenShift, or Azure VMs
How jaz works?
jaz sits between your container startup command and the JVM. It will:
- Detect the cloud environment (e.g., container limits, available memory)
- Analyzes the workload type and selects best-fit JVM options
- Launches the Java process with optimized flags, such as:
- Heap sizing
- GC selection and tuning
- Logging and diagnostics settings as needed
Example Usage
Instead of this:
$ JAVA_OPTS=”-XX:… several JVM tuning flags” $ java $JAVA_OPTS -jar myapp.jar”
Use:
$ jaz -jar myapp.jar
You will automatically benefit from:
- Battle-tested defaults for cloud native and container workloads
- Reduced memory waste
- Better startup and warmup performance
- No manual tuning required
How to Access jaz (Private Preview)
jaz is currently available through a Private Preview. During this phase, we are working closely with selected customers to refine the experience and gather feedback.
To request access:
Participants in the Private Preview will receive access to jaz via easily installed standalone Linux packages for container images of the Microsoft Build of OpenJDK and Eclipse Temurin (for Java 8). Customers will have direct communication with our engineering and product teams to further enhance the tool to fit their needs. For a sneak peek, you can read the documentation.
Our Roadmap
Our long-term vision for jaz includes adaptive JVM configuration based on telemetry and usage patterns, helping developers achieve optimal performance across all Azure services.
- ⚙️ JVM Configuration Profiles
- 📦 AppCDS Support
- 📦 Leyden Support
- 🔄 Continuous Tuning
- 📊 Share telemetry through Prometheus
We’re excited to work with the Java community to shape this tool. Your feedback will be critical in helping us deliver a smarter, cloud-native Java runtime experience on Azure.