forked from mtusi2026/mtusi2026lab2
One to eight replicas of 1 CPU, 512 MiB and one worker each, three repeats per rate; the 4x1 point comes from series A. Peak successful RPS: 1 720 for one replica, 2 936 for two, 4 724 for four and only 4 260 for eight, lower than four. Up to two replicas the API is the limit (101 % and 201 % of its CPU). At eight replicas the API uses 473 of its 800 % and the balancer 40 % of a core, while PostgreSQL is at 178 of 200 %, 47.5 of the 64 pool connections wait for a chat row lock and the balancer queue holds 744 requests. The locking SELECT ... FOR UPDATE of the chat takes 14.2 ms on average, 97 % of all statement time of the step, and about 7 connections sit idle in transaction: the lock holders wait for the application between round trips. A universal scalability law fit over 1, 2, 4 and 8 CPUs gives sigma 0.014 and kappa 0.038, a peak near five replicas and a decline after it. No step of this series was rejected as disturbed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
4.9 KiB
4.9 KiB
| 1 | ts | name | cpu_pct | mem_usage | mem_pct | net_io | block_io | pids |
|---|---|---|---|---|---|---|---|---|
| 2 | 1793223405 | mtusi2026lab3-api-1 | 66.47% | 119.9MiB / 512MiB | 23.43% | 483MB / 680MB | 0B / 0B | 7 |
| 3 | 1793223405 | mtusi2026lab3-postgres-1 | 27.39% | 144.5MiB / 1GiB | 14.11% | 155MB / 319MB | 53.2kB / 1.59GB | 14 |
| 4 | 1793223405 | mtusi2026lab3-lb-1 | 8.70% | 17.79MiB / 128MiB | 13.90% | 572MB / 597MB | 0B / 0B | 2 |
| 5 | 1793223405 | mtusi2026lab3-valkey-1 | 0.80% | 11.04MiB / 128MiB | 8.63% | 28.1MB / 31.1MB | 0B / 729kB | 6 |
| 6 | 1793223409 | mtusi2026lab3-k6-run-274c515c0c16 | 17.09% | 70.59MiB / 1GiB | 6.89% | 12.5MB / 2.19MB | 0B / 0B | 9 |
| 7 | 1793223409 | mtusi2026lab3-api-1 | 64.55% | 119.6MiB / 512MiB | 23.37% | 493MB / 694MB | 0B / 0B | 7 |
| 8 | 1793223409 | mtusi2026lab3-postgres-1 | 27.65% | 146.1MiB / 1GiB | 14.27% | 158MB / 326MB | 53.2kB / 1.62GB | 14 |
| 9 | 1793223409 | mtusi2026lab3-lb-1 | 8.20% | 17.71MiB / 128MiB | 13.84% | 584MB / 610MB | 0B / 0B | 2 |
| 10 | 1793223409 | mtusi2026lab3-valkey-1 | 1.85% | 11.05MiB / 128MiB | 8.63% | 28.7MB / 31.7MB | 0B / 729kB | 6 |
| 11 | 1793223412 | mtusi2026lab3-k6-run-274c515c0c16 | 17.43% | 72.72MiB / 1GiB | 7.10% | 22.1MB / 3.76MB | 0B / 0B | 9 |
| 12 | 1793223412 | mtusi2026lab3-api-1 | 65.94% | 119.9MiB / 512MiB | 23.42% | 500MB / 704MB | 0B / 0B | 7 |
| 13 | 1793223412 | mtusi2026lab3-postgres-1 | 28.96% | 144.1MiB / 1GiB | 14.07% | 162MB / 333MB | 53.2kB / 1.65GB | 13 |
| 14 | 1793223412 | mtusi2026lab3-lb-1 | 8.01% | 17.77MiB / 128MiB | 13.88% | 596MB / 622MB | 0B / 0B | 2 |
| 15 | 1793223412 | mtusi2026lab3-valkey-1 | 1.81% | 11.04MiB / 128MiB | 8.63% | 29.5MB / 32.5MB | 0B / 729kB | 6 |
| 16 | 1793223416 | mtusi2026lab3-k6-run-274c515c0c16 | 17.82% | 79.42MiB / 1GiB | 7.76% | 32.3MB / 5.36MB | 0B / 0B | 9 |
| 17 | 1793223416 | mtusi2026lab3-api-1 | 66.49% | 119.9MiB / 512MiB | 23.42% | 514MB / 723MB | 0B / 0B | 7 |
| 18 | 1793223416 | mtusi2026lab3-postgres-1 | 29.31% | 149MiB / 1GiB | 14.55% | 165MB / 340MB | 53.2kB / 1.67GB | 14 |
| 19 | 1793223416 | mtusi2026lab3-lb-1 | 8.11% | 17.51MiB / 128MiB | 13.68% | 609MB / 635MB | 0B / 0B | 2 |
| 20 | 1793223416 | mtusi2026lab3-valkey-1 | 2.44% | 11.05MiB / 128MiB | 8.63% | 29.9MB / 33MB | 0B / 729kB | 6 |
| 21 | 1793223420 | mtusi2026lab3-k6-run-274c515c0c16 | 15.36% | 79.82MiB / 1GiB | 7.79% | 42.1MB / 6.93MB | 0B / 0B | 9 |
| 22 | 1793223420 | mtusi2026lab3-api-1 | 59.94% | 119.9MiB / 512MiB | 23.42% | 524MB / 737MB | 0B / 0B | 7 |
| 23 | 1793223420 | mtusi2026lab3-postgres-1 | 22.63% | 151.1MiB / 1GiB | 14.75% | 168MB / 346MB | 53.2kB / 1.72GB | 14 |
| 24 | 1793223420 | mtusi2026lab3-lb-1 | 7.80% | 17.26MiB / 128MiB | 13.49% | 621MB / 648MB | 0B / 0B | 2 |
| 25 | 1793223420 | mtusi2026lab3-valkey-1 | 1.84% | 11.04MiB / 128MiB | 8.63% | 30.5MB / 33.7MB | 0B / 729kB | 6 |
| 26 | 1793223423 | mtusi2026lab3-k6-run-274c515c0c16 | 17.55% | 79.86MiB / 1GiB | 7.80% | 50.2MB / 8.22MB | 0B / 0B | 9 |
| 27 | 1793223423 | mtusi2026lab3-api-1 | 77.24% | 119.9MiB / 512MiB | 23.42% | 532MB / 749MB | 0B / 0B | 7 |
| 28 | 1793223423 | mtusi2026lab3-postgres-1 | 28.15% | 152.3MiB / 1GiB | 14.87% | 171MB / 352MB | 53.2kB / 1.74GB | 14 |
| 29 | 1793223423 | mtusi2026lab3-lb-1 | 8.36% | 18.14MiB / 128MiB | 14.17% | 631MB / 658MB | 0B / 0B | 2 |
| 30 | 1793223423 | mtusi2026lab3-valkey-1 | 1.78% | 11.04MiB / 128MiB | 8.63% | 31.1MB / 34.4MB | 0B / 729kB | 6 |
| 31 | 1793223426 | mtusi2026lab3-k6-run-274c515c0c16 | 14.87% | 79.89MiB / 1GiB | 7.80% | 60.3MB / 9.79MB | 0B / 0B | 9 |
| 32 | 1793223426 | mtusi2026lab3-api-1 | 59.92% | 120MiB / 512MiB | 23.43% | 542MB / 764MB | 0B / 0B | 7 |
| 33 | 1793223426 | mtusi2026lab3-postgres-1 | 24.13% | 153.5MiB / 1GiB | 14.99% | 174MB / 359MB | 53.2kB / 1.77GB | 14 |
| 34 | 1793223426 | mtusi2026lab3-lb-1 | 7.62% | 18.42MiB / 128MiB | 14.39% | 643MB / 671MB | 0B / 0B | 2 |
| 35 | 1793223426 | mtusi2026lab3-valkey-1 | 2.43% | 11.31MiB / 128MiB | 8.83% | 31.6MB / 34.9MB | 0B / 745kB | 6 |
| 36 | 1793223430 | mtusi2026lab3-k6-run-274c515c0c16 | 18.53% | 79.92MiB / 1GiB | 7.80% | 69.7MB / 11.4MB | 0B / 0B | 9 |
| 37 | 1793223430 | mtusi2026lab3-api-1 | 66.64% | 119.9MiB / 512MiB | 23.42% | 552MB / 777MB | 0B / 0B | 7 |
| 38 | 1793223430 | mtusi2026lab3-postgres-1 | 29.38% | 154.2MiB / 1GiB | 15.06% | 176MB / 364MB | 53.2kB / 1.79GB | 14 |
| 39 | 1793223430 | mtusi2026lab3-lb-1 | 8.58% | 18.23MiB / 128MiB | 14.24% | 655MB / 683MB | 0B / 0B | 2 |
| 40 | 1793223430 | mtusi2026lab3-valkey-1 | 1.90% | 11.06MiB / 128MiB | 8.64% | 32.3MB / 35.7MB | 0B / 745kB | 6 |
| 41 | 1793223434 | mtusi2026lab3-k6-run-274c515c0c16 | 17.36% | 79.96MiB / 1GiB | 7.81% | 78.1MB / 12.8MB | 0B / 0B | 9 |
| 42 | 1793223434 | mtusi2026lab3-api-1 | 73.60% | 120MiB / 512MiB | 23.44% | 561MB / 790MB | 0B / 0B | 7 |
| 43 | 1793223434 | mtusi2026lab3-postgres-1 | 24.50% | 155.8MiB / 1GiB | 15.21% | 180MB / 371MB | 53.2kB / 1.82GB | 14 |
| 44 | 1793223434 | mtusi2026lab3-lb-1 | 8.16% | 18.09MiB / 128MiB | 14.13% | 665MB / 694MB | 0B / 0B | 2 |
| 45 | 1793223434 | mtusi2026lab3-valkey-1 | 2.44% | 11.16MiB / 128MiB | 8.72% | 32.8MB / 36.3MB | 0B / 745kB | 6 |
| 46 | 1793223437 | mtusi2026lab3-k6-run-274c515c0c16 | 16.57% | 79.98MiB / 1GiB | 7.81% | 87.7MB / 14.3MB | 0B / 0B | 9 |
| 47 | 1793223437 | mtusi2026lab3-api-1 | 66.86% | 119.7MiB / 512MiB | 23.37% | 571MB / 804MB | 0B / 0B | 7 |
| 48 | 1793223437 | mtusi2026lab3-postgres-1 | 28.62% | 157.3MiB / 1GiB | 15.36% | 182MB / 376MB | 53.2kB / 1.85GB | 14 |
| 49 | 1793223437 | mtusi2026lab3-lb-1 | 8.63% | 17.93MiB / 128MiB | 14.01% | 677MB / 706MB | 0B / 0B | 2 |
| 50 | 1793223437 | mtusi2026lab3-valkey-1 | 1.90% | 11.31MiB / 128MiB | 8.83% | 33.4MB / 36.9MB | 0B / 745kB | 6 |
| 51 | 1793223441 | mtusi2026lab3-k6-run-274c515c0c16 | 15.67% | 83.52MiB / 1GiB | 8.16% | 97.5MB / 15.9MB | 0B / 0B | 9 |
| 52 | 1793223441 | mtusi2026lab3-api-1 | 61.84% | 119.7MiB / 512MiB | 23.38% | 581MB / 818MB | 0B / 0B | 7 |
| 53 | 1793223441 | mtusi2026lab3-postgres-1 | 26.04% | 159.3MiB / 1GiB | 15.55% | 186MB / 383MB | 53.2kB / 1.89GB | 14 |
| 54 | 1793223441 | mtusi2026lab3-lb-1 | 8.00% | 17.49MiB / 128MiB | 13.66% | 689MB / 719MB | 0B / 0B | 2 |
| 55 | 1793223441 | mtusi2026lab3-valkey-1 | 1.84% | 11.06MiB / 128MiB | 8.64% | 34MB / 37.6MB | 0B / 745kB | 6 |