Wealthfront Jun 25, 2026

Tuning Android build nodes for maximum throughput

M2 Related OWASP risk: Inadequate Supply Chain Security Learn more →

Article Summary

Wealthfront's Android team cut their CI build times by rethinking how Gradle uses resources on AWS EC2 instances. Turns out, more workers doesn't always mean faster builds.

The Wealthfront engineering team shares their deep dive into optimizing Gradle performance on m7i.8xlarge EC2 instances (32 cores, 128GB RAM). They methodically tuned everything from daemon configuration to worker counts to squeeze maximum throughput from their Android CI pipeline.

Key Takeaways

Critical Insight

Halving Gradle workers from the default CPU count improved build performance by avoiding memory bottlenecks, proving that resource tuning requires testing over assumptions.

The team reveals why their next optimization target is the Kotlin daemon, which runs separately from Gradle and has its own performance characteristics.

About This Article

Problem

Wealthfront's Android team had trouble with memory overhead and unpredictable performance from Gradle daemon processes running on their CI infrastructure. Since builds happen hours apart, they never got the benefit of a warm cache.

Solution

They switched to single-use daemons that start fresh for each build and shut down when done. This eliminated the persistent memory overhead and kept each CI build independent from what came before.

Impact

Memory consumption on their m7i.8xlarge instances went down while build reliability stayed solid. They could now confidently use the remaining 128GB of RAM across Gradle workers, test heap sizes, and Jenkins executors without daemon-related memory leaks piling up over time.