forked from mtusi2026/mtusi2026lab3
make track1-control on b1c80ee: 8x1 at 5400 rps with a pool of 4, 8 and
16 connections per worker and an LB maxconn of 16, 32 and 64 per
replica, then 4x1 against 8x0.5 on the same CPUs 7-10, three repeats
with the variants interleaved.
The first placement attempt is kept in aborted/ only as a summary: four
4x1 runs had the write command at 7-34 ms instead of 0.2-0.6 ms, waiting
on WalSync, which the CPU based rejection does not see. The rerun right
after it is the one in control-cpus. The full output of the two failed
compose up attempts names the cause of the flaky switch: all replicas
are recreated at once and lb turns unhealthy without a ready server.
Plots and capacity.md now include both control series.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
1.8 KiB
1.8 KiB
| 1 | calls | total_ms | mean_ms | rows | shared_blks_hit | shared_blks_read | query |
|---|---|---|---|---|---|---|---|
| 2 | 173112 | 286214.693 | 1.653 | 173112 | 8702082 | 53 | WITH chat AS ( SELECT c.id, GREATEST($5::timestamptz, c.last_message_at + interval $9) AS stamp FROM chats c JOIN chat_members m ON m.chat_id = c.id AND m.user_id = $3 WHERE c.id = $2 FOR UPDATE OF c |
| 3 | 42715 | 2009.432 | 0.047 | 2174706 | 2098095 | 0 | SELECT id, chat_id, sender_id, text, created_at FROM messages WHERE chat_id = $1 ORDER BY created_at, id LIMIT $2 |
| 4 | 42715 | 1502.487 | 0.035 | 42715 | 384871 | 0 | SELECT c.id, c.title, c.created_at, ARRAY(SELECT user_id FROM chat_members WHERE chat_id = c.id ORDER BY position) AS member_ids FROM chat_members m JOIN chats c ON c.id = m.chat_id WHERE m.chat_id = |
| 5 | 259036 | 731.212 | 0.003 | 0 | 0 | 0 | RESET ALL |
| 6 | 259036 | 347.666 | 0.001 | 259036 | 0 | 0 | SELECT pg_advisory_unlock_all() |
| 7 | 259036 | 50.136 | 0.000 | 0 | 0 | 0 | CLOSE ALL |
| 8 | 259036 | 32.762 | 0.000 | 0 | 0 | 0 | UNLISTEN * |
| 9 | 20 | 1.832 | 0.092 | 20 | 277 | 1 | WITH expired AS (DELETE FROM sessions WHERE user_id = $2 AND expires_at <= $3) INSERT INTO sessions (token_hash, user_id, created_at, expires_at) VALUES ($1, $2, $3, $4) |
| 10 | 20 | 1.286 | 0.064 | 20 | 178 | 0 | INSERT INTO users (id, username, display_name, password_hash, created_at) VALUES ($1, $2, $3, $4, $5) ON CONFLICT (username) DO NOTHING RETURNING $6 |
| 11 | 10 | 1.160 | 0.116 | 20 | 400 | 0 | INSERT INTO chat_members (chat_id, user_id, position, chat_created_at) SELECT $1, member.user_id, member.position, $3 FROM unnest($2::uuid[]) WITH ORDINALITY AS member (user_id, position) |
| 12 | 396 | 0.744 | 0.002 | 396 | 0 | 0 | SELECT 1 |
| 13 | 28 | 0.331 | 0.012 | 28 | 84 | 0 | SELECT token_hash, user_id, created_at, expires_at FROM sessions WHERE token_hash = $1 AND expires_at > $2 |
| 14 | 10 | 0.329 | 0.033 | 10 | 134 | 0 | INSERT INTO chats (id, title, created_at) VALUES ($1, $2, $3) |
| 15 | 20 | 0.270 | 0.013 | 20 | 60 | 0 | SELECT id, username, display_name, password_hash, created_at FROM users WHERE username = $1 |
| 16 | 50 | 0.011 | 0.000 | 0 | 0 | 0 | BEGIN |
| 17 | 50 | 0.007 | 0.000 | 0 | 0 | 0 | COMMIT |