JVM Profiles

The --profile flag selects a set of optimized JVM flags for your workload.

Available Profiles

server (default)

Standard HotSpot behavior. No additional flags.

Best for:

  • Long-running services

  • Web servers

  • Applications where throughput matters more than startup

Characteristics:

  • Full tiered compilation (C1 → C2)

  • G1GC (default garbage collector)

  • Higher memory overhead

  • Peak performance after warmup

cli

Optimized for short-lived processes and CLI tools.

Best for:

  • Command-line tools

  • Scripts

  • One-shot utilities

  • Serverless functions

Characteristics:

  • Tiered compilation with C1 only (skip C2)

  • SerialGC (simpler, faster startup)

  • Reduced code cache

  • ~200-350ms startup (with AppCDS)

Usage

Or in jbundle.toml:

Performance Comparison

Metric
cli
server

Startup (cold)

~800-1500ms

~1000-2000ms

Startup (warm)

~200-350ms

~400-600ms

Peak throughput

Lower

Higher

Memory footprint

Lower

Higher

Warmup time

Faster

Slower

When to Use Each

Combining with AppCDS and CRaC

Profiles work alongside other optimizations:

Last updated

Was this helpful?