Skip to content

Guides

How to size runners for Java builds

You are guessing at a runner size for a Maven or Gradle build.

4 min read

You are guessing at a runner size for a Maven or Gradle build.

Why it happens

JVM builds are memory-hungry before they are CPU-hungry, and GC thrash looks exactly like a slow build.

How to fix it

  1. Start at 8 vCPU with 4 GB per vCPU; Gradle and Maven both parallelise across modules
  2. Give the JVM enough heap — an undersized heap costs more than an undersized CPU
  3. Watch for the configuration phase, which is single-threaded and unaffected by core count
  4. Scale up only if module-level parallelism is actually saturating the cores

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.