Skip to content

Commit f212e60

Browse files
committed
Fix capitalization of PostgreSQL in benchmark description and networking sections
1 parent 56b18ec commit f212e60

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • content/post/hidden-cost-rootless-container-networking

content/post/hidden-cost-rootless-container-networking/index.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This post walks through the investigation that found the culprit.
2222

2323
== The gap
2424

25-
The benchmark is a REST/CRUD application backed by PostgreSQL. The app runs on the host, postgres in a rootless podman container. Each HTTP request executes 2 SQL queries (confirmed via https://www.postgresql.org/docs/current/pgstatstatements.html[pg_stat_statements]).
25+
The benchmark is a REST/CRUD application backed by PostgreSQL. The app runs on the host, PostgreSQL in a rootless podman container. Each HTTP request executes 2 SQL queries (confirmed via https://www.postgresql.org/docs/current/pgstatstatements.html[pg_stat_statements]).
2626

2727
image::throughput-gap.svg[Throughput comparison: Local vs Perf-lab]
2828

29-
Spring delivers roughly the same throughput in both environments (~12-13K TPS). Quarkus swings from 15.5K to 24.5K -- it is being held back locally. **Something between the app and postgres is penalizing Quarkus specifically.**
29+
Spring delivers roughly the same throughput in both environments (~12-13K TPS). Quarkus swings from 15.5K to 24.5K -- it is being held back locally. **Something between the app and PostgreSQL is penalizing Quarkus specifically.**
3030

3131
== mpstat: where is the CPU going?
3232

@@ -73,10 +73,10 @@ Rootless podman on Fedora uses https://passt.top/passt/[pasta (passt)] to forwar
7373

7474
----
7575
With pasta (default rootless):
76-
App --> kernel --> pasta (userspace) --> kernel --> container netns --> postgres
76+
App --> kernel --> pasta (userspace) --> kernel --> container netns --> PostgreSQL
7777
7878
With --network=host:
79-
App --> kernel --> postgres (same network namespace)
79+
App --> kernel --> PostgreSQL (same network namespace)
8080
----
8181

8282
Every JDBC packet traverses two extra kernel/userspace boundary crossings plus a userspace copy in the pasta process. For a chatty protocol like JDBC with small, frequent packets, this is devastating.
@@ -104,7 +104,7 @@ In other words, **pasta was masking Quarkus's CPU efficiency advantage** -- the
104104

105105
== The fix
106106

107-
Run the postgres container with `--network=host` instead of port-mapping (`-p 5432:5432`). We added `DB_HOST_NETWORK=true` to the benchmark's https://github.com/quarkusio/spring-quarkus-perf-comparison/blob/main/scripts/infra.sh[infrastructure script].
107+
Run the PostgreSQL container with `--network=host` instead of port-mapping (`-p 5432:5432`). We added `DB_HOST_NETWORK=true` to the benchmark's https://github.com/quarkusio/spring-quarkus-perf-comparison/blob/main/scripts/infra.sh[infrastructure script].
108108

109109
[cols="2,1,1,1", options="header"]
110110
|===
@@ -140,7 +140,7 @@ image::diff-flamegraph.png[Differential flamegraph: default pasta vs host networ
140140

141141
Red means more CPU in the default (pasta) run; blue means more CPU with host networking. The red stacks that dominated the first flamegraph — `_raw_spin_unlock_irqrestore`, `nft_do_chain`, `tcp_clean_rtx_queue` — have disappeared.
142142

143-
**With `--network=host`, the app and postgres share the same network namespace; packets never leave the kernel.**
143+
**With `--network=host`, the app and PostgreSQL share the same network namespace; packets never leave the kernel.**
144144

145145
== Takeaways
146146

0 commit comments

Comments
 (0)