Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
find optimal value for number of threads for a typical PG deployment
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗pg_tps_optimizer finds the number of clients that gives PostgreSQL the most transactions per second (TPS), at the lowest latency.
It runs a workload with an increasing number of clients (1, 2, 3, 5, 8, 13, ...), waits until TPS and latency are stable for each step, and reports them, so you can see how your setup responds to more clients:
| Date time | Clients | TPS | Latency | TPS/Latency |
| | | | (usec) | |
|---------------------|---------|---------------|-----------|-------------|
| 2023-05-18 06:40:20 | 1 | 9041.345 | 221.0 | 40.911 |
| 2023-05-18 06:40:27 | 5 | 19727.549 | 516.0 | 38.232 |
| 2023-05-18 06:40:32 | 13 | 23098.930 | 1125.0 | 20.532 |
| 2023-05-18 06:40:42 | 55 | 19289.153 | 6025.0 | 3.202 |
Download the binary for your platform from the releases, and run:
pg_tps_optimizer --dsn 'host=db1.example.com user=postgres dbname=postgres' --range 200
or use the container image:
docker run --rm -e PGHOST=db1.example.com -e PGUSER=postgres -e PGPASSWORD=secret \
ghcr.io/pgvillage-tools/pg_tps_optimizer --range 200
Note: by default, pg_tps_optimizer creates a small table (pg_tps_optimizer) in the database it
connects to (dropped after the run), and generates as much load as the server can handle. With
--query, it runs your own query instead.
The documentation is at https://pgvillage-tools.github.io/pg_tps_optimizer/
(sources in docs/):
pg_tps_optimizer is open source, under the GNU General Public License v3.0.
We are always open to contributions: