MODSIDECAR-23 -Compare sidecar resource consumption between native binary and Java images.
Benchmark Report: Native Image vs Java Image (Sidecar)
Jira Ticket: MODSIDECAR-23
🎯 Objective
Evaluate the memory and performance benefits of using a native image build for the folio-module-sidecar
. According to Quarkus documentation, native images may reduce memory usage and improve performance, sometimes up to 2x.
📦 Image Sizes
Image Variant | Image ID | Build Age | Size |
---|---|---|---|
|
| 2 hours ago | 238MB |
|
| 3 weeks ago | 714MB |
|
| 2 months ago | 289MB |
🧠 Memory Usage (RSS)
Runtime | PID | RSS (Approx) | Command Snippet |
---|---|---|---|
Native | 430676 | ~122 MB |
|
Java | 542045 | ~392 MB | Java process with |
⏱ Startup Time (from logs)
Runtime | Init Message Timestamp | Credential Ready Timestamp | Startup Duration |
---|---|---|---|
Native |
|
| ~3.6 sec |
Java |
|
| ~4.4 sec |
📚 Reference
✅ Conclusion
The native image demonstrates a notable reduction in memory consumption—it uses nearly 70% less RAM than the Java-based image under the same load conditions.
While startup time improvements are modest (~1 second faster), this can be impactful in dynamic environments like Kubernetes.
Request processing time remains similar, with a minor ~20% improvement, but memory savings make native images especially attractive for memory-constrained deployments.