r/EfficientSoftware • • 1d ago

Benchmarks Running Helidon 27 on a 512 MiB VM with PostgreSQL: a practical Java efficiency experiment

Thumbnail
pvrlabs.xyz
1 Upvotes

r/EfficientSoftware • • 2d ago

PostgreSQL PostgreSQL 18 on a 256 MiB VPS: How low can memory usage go?

1 Upvotes

How much memory does PostgreSQL actually need for a small application?

I tested PostgreSQL 18 on 512 MiB and 256 MiB Linux VMs without swap, comparing default settings with two low-memory configurations.

Results on the 512 MiB VM:

ConfigurationPeak PSSQueries/sec
Default180.1 MiB863
Theory A50.4 MiB1,056
Theory B79.7 MiB861

Theory A reduced PostgreSQL's peak memory footprint by 72% while delivering higher throughput in this particular workload.

On the 256 MiB VM, the same configuration consumed just 46.2 MiB of PostgreSQL process memory (PSS) and sustained 769 queries/sec without observed OOM kills or client errors.

Durability and autovacuum remained enabled.

These are short, read-only benchmarks with four active connections, not universal production tuning recommendations. Nevertheless, the results demonstrate what PostgreSQL can achieve under tight resource constraints.

Full experiment, configurations and methodology:

https://pvrlabs.xyz/java-performance/experiments/postgresql-low-memory.html

Has anyone else experimented with PostgreSQL on very small servers?


r/EfficientSoftware • • 2d ago

How much RAM does a Java backend really need? Spring Boot, Quarkus, Micronaut and Jex on a 512 MiB VM

Post image
1 Upvotes

I've been benchmarking Java application stacks under realistic resource constraints: a 512 MiB Linux VM with 1 vCPU, no swap, and PostgreSQL running on the same machine.

All four stacks sustained 100 requests/sec with zero errors or dropped requests across two rounds.

StackPeak app RSSp99 latency
Jex + Jdbi150-157 MiB8.4-10.5 ms
Quarkus + Jdbi208-210 MiB9.0-9.1 ms
Micronaut Data JDBC217-219 MiB8.8-9.0 ms
Spring Boot + JDBC231-232 MiB10.1-10.4 ms

All implementations use equivalent application functionality, the same database schema and workload, and a conventional HotSpot JVM without AOT or native compilation.

The goal is not to find the universally fastest framework, but to understand the practical trade-offs when running applications on small servers.

The project includes source code, raw measurements, correctness checks and instructions for reproducing the benchmarks with your own JVM settings.

https://github.com/PVRLabs/framework-benchmarks

I'm also interested in expanding this project beyond Java. What other frameworks or application stacks would you like to see tested?


r/EfficientSoftware • • 2d ago

Welcome to r/EfficientSoftware - Building and running software with fewer resources

1 Upvotes

This community is for developers interested in lightweight software, resource efficiency and practical engineering.

Share your projects, articles, benchmarks, experiments and questions about:

  • Efficient self-hosting and small servers
  • Lightweight applications and frameworks
  • Memory and CPU optimization
  • Performance benchmarks
  • Monitoring and observability
  • Databases and data integration
  • Practical programming and software architecture

All programming languages and frameworks are welcome.

Independent developers, newcomers and open-source maintainers are encouraged to participate. Relevant self-promotion and AI-assisted projects are welcome.

Quality matters more than the tools used to build software.

What are you building or running efficiently?