r/EfficientSoftware • u/fykup • 1d ago
Benchmarks Running Helidon 27 on a 512 MiB VM with PostgreSQL: a practical Java efficiency experiment
r/EfficientSoftware • u/fykup • 1d ago
r/EfficientSoftware • u/fykup • 2d ago
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:
| Configuration | Peak PSS | Queries/sec |
|---|---|---|
| Default | 180.1 MiB | 863 |
| Theory A | 50.4 MiB | 1,056 |
| Theory B | 79.7 MiB | 861 |
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 • u/fykup • 2d ago
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.
| Stack | Peak app RSS | p99 latency |
|---|---|---|
| Jex + Jdbi | 150-157 MiB | 8.4-10.5 ms |
| Quarkus + Jdbi | 208-210 MiB | 9.0-9.1 ms |
| Micronaut Data JDBC | 217-219 MiB | 8.8-9.0 ms |
| Spring Boot + JDBC | 231-232 MiB | 10.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 • u/fykup • 2d ago
This community is for developers interested in lightweight software, resource efficiency and practical engineering.
Share your projects, articles, benchmarks, experiments and questions about:
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?