Tomcat 11: Lenient vs Strict Defaults, Side by Side
A side-by-side comparison of legacy Tomcat defaults and the strict defaults in Tomcat 11, showing which behaviors change and what to verify before you upgrade a Java web tier.
ClickhouseBenchmark
Postgres memory tuning is difficult because work_mem applies per operation, not per query, and parallel workers multiply memory usage without a query-wide cap. Some executor structures, such as those in recursive queries, have no disk-backed fallback and can grow until the backend runs out of memory. A benchmark using a recursive query that exhausts memory tested ClickHouse Managed Postgres, Cloud SQL, PlanetScale, and Amazon RDS on 16 GiB instances. ClickHouse Managed Postgres enforces a memory ceiling at 57% of host RAM, rejecting queries that exceed it, while RDS allows backends to consume nearly all RAM until the host crashes. Cloud SQL and PlanetScale enforce similar caps, but ClickHouse Managed Postgres’s ceiling is lower, a deliberate tradeoff that returns clean query failures instead of forcing every client through crash recovery.
The post explains Postgres memory management challenges, including work_mem limitations and non-spillable structures, then benchmarks four Postgres providers using a recursive query that exhausts memory to compare reliability under pathological workloads.
ClickHouse Managed Postgres enforces a lower memory ceiling (57% of host RAM) to reject runaway queries instead of allowing them to crash the database, trading some memory utilization for uptime.
Postgres work_mem applies per operation per process, not per query, and parallel workers multiply memory usage without a query-wide cap, making memory tuning opaque.
Some executor structures (e.g., in recursive queries) have no disk-backed fallback and can grow until the backend runs out of memory, posing a crash risk.
ClickHouse Managed Postgres enforces a lower memory ceiling (57% of host RAM) to reject runaway queries, while RDS allows higher memory usage but risks crashes and cache competition.
work_mem applies per operation per process, not per query. Parallel workers each get their own budget, and hash-flavored nodes get a multiplier from hash_mem_multiplier. So a query can use many times the work_mem value across multiple nodes and processes.
Some executor structures, such as those in recursive queries, have no disk-backed fallback. They keep growing in memory until the query finishes or the backend runs out of memory, potentially crashing the database.
ClickHouse Managed Postgres enforces a lower memory ceiling (57% of host RAM) and rejects queries that exceed it, returning a clean failure. RDS allows backends to consume nearly all RAM until the host crashes, completing more queries at moderate load but risking crash recovery and cache competition.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
A side-by-side comparison of legacy Tomcat defaults and the strict defaults in Tomcat 11, showing which behaviors change and what to verify before you upgrade a Java web tier.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.