MODSIDECAR-23 -Compare sidecar resource consumption between native binary and Java images.

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

Image Variant

Image ID

Build Age

Size

folio-module-sidecar-native

29bce759a688

2 hours ago

238MB

folio-module-sidecar-fips

c328d5abc954

3 weeks ago

714MB

folio-module-sidecar (Java)

ca8bd2d48e64

2 months ago

289MB


🧠 Memory Usage (RSS)

Runtime

PID

RSS (Approx)

Command Snippet

Runtime

PID

RSS (Approx)

Command Snippet

Native

430676

~122 MB

./application -Dquarkus.http.host=0.0.0.0

Java

542045

~392 MB

Java process with -Xms64m -Xmx64m and debugging options


⏱ Startup Time (from logs)

Runtime

Init Message Timestamp

Credential Ready Timestamp

Startup Duration

Runtime

Init Message Timestamp

Credential Ready Timestamp

Startup Duration

Native

2025-05-21 14:20:51,884

2025-05-21 14:20:55,472

~3.6 sec

Java

2025-05-21 16:08:50,111

2025-05-21 16:08:54,497

~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.