forked from mtusi2026/mtusi2026lab3
1x4, 2x2 and 4x1 at 4 CPU and 2 GiB of API, workers equal to CPUs, 32 pool connections and 128 balancer slots in every layout, three repeats from 600 to 6 830 rps. All three keep up with the offered load up to 4 560 rps; the peaks are 5 375 rps for 1x4 (5 332..5 384), 4 964 for 2x2 (4 894..5 104) and 4 724 for 4x1 (4 686..4 794). At the peak the API uses 95 % of its four CPUs in every layout, PostgreSQL 82..89 % of its two, the balancer 40 % of one, and about half of the 32 database connections wait for the lock on a chat row. Smaller replicas cost more: at 3 040 rps the API burns 215 % CPU as 1x4, 243 % as 2x2 and about 280 % as 4x1, and p95 at 4 560 rps grows from 9 to 69 and 150 ms. The first attempt was aborted when a neighbour's image build froze the Docker API; its summary is kept under aborted/. Twelve steps of the rerun were rejected as disturbed and repeated. A config's SLO capacity now needs a majority of saturated repeats, since a median is robust to one disturbed repeat and "any repeat" is not. Series B starts at 450 rps per CPU. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
3.6 KiB
3.6 KiB
| 1 | variant | config | replicas | cpus | memory_mb | workers | pool | maxconn | api_cpuset | rate | repeat | started | db_mb | messages | k6_exit | saturated | requests | rps | ok_rps | failed_ratio | dropped_iterations | p50_ms | p95_ms | p99_ms | p95_post_ms | p95_get_ms | cpu_api | cpu_postgres | cpu_lb | cpu_valkey | cpu_k6 | mem_api_mb | mem_postgres_mb | mem_k6_mb | pg_backends_max | pg_active_avg | pg_active_max | pg_idle_avg | pg_idle_tx_avg | pg_lock_avg | pg_lock_max | pg_lwlock_avg | pg_io_avg | lb_scur_max | lb_qcur_max | lb_qtime_max_ms | lb_rtime_avg_ms | cpu_vm | cpu_other | gap_s | wall_s | disturbed |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | base | 2x2 | 2 | 2.0 | 1024 | 2 | 8 | 64 | 7-10 | 6830 | 2 | 2026-10-28T22:50:36 | 654.0 | 1357905 | 0 | True | 139216 | 4640.53 | 4640.53 | 0 | 65686 | 204.78 | 283.77 | 337.25 | 279.91 | 297.7 | 356.48 | 167.73 | 39.86 | 8.83 | 80.77 | 225.0 | 449.0 | 672.8 | 32 | 18.92 | 29 | 5.19 | 7.88 | 16.65 | 22 | 1.19 | 0.62 | 1000 | 872 | 327 | 28.66 | 777.4 | 123.7 | 4.0 | 41.7 | True |
| 3 | base | 2x2 | 2 | 2.0 | 1024 | 2 | 8 | 64 | 7-10 | 6830 | 2 | 2026-10-28T22:52:06 | 726.3 | 1510966 | 0 | True | 138349 | 4611.63 | 4611.63 | 0 | 66551 | 203.03 | 299.3 | 360.03 | 295.69 | 313.56 | 367.36 | 168.93 | 39.79 | 8.95 | 69.71 | 226.4 | 450.9 | 657.7 | 32 | 18.73 | 26 | 6.54 | 6.73 | 16.12 | 25 | 1.15 | 0.46 | 1000 | 872 | 256 | 27.83 | 792.7 | 138.0 | 4.0 | 41.7 | True |
| 4 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 900 | 1 | 2026-10-28T22:57:25 | 35.4 | 57471 | 0 | False | 26968 | 898.93 | 898.93 | 0 | 32 | 1.64 | 10.04 | 69.53 | 13.03 | 3.96 | 94.59 | 31.43 | 8.99 | 2.26 | 16.84 | 117.2 | 200.5 | 79.3 | 32 | 0.78 | 5 | 30.52 | 0.37 | 0 | 0 | 0.22 | 0.22 | 20 | 0 | 0 | 3.97 | 281.7 | 127.6 | 4.8 | 41.4 | True |
| 5 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 1350 | 1 | 2026-10-28T23:01:10 | 89.7 | 172668 | 0 | True | 39949 | 1331.63 | 1331.63 | 0 | 552 | 1.85 | 25.4 | 280.9 | 26.76 | 18.47 | 153.85 | 40.41 | 11.63 | 2.93 | 23.77 | 127.7 | 259.2 | 100.7 | 32 | 0.57 | 2 | 30.57 | 0.86 | 0 | 0 | 0.14 | 0.29 | 4 | 0 | 0 | 2.29 | 288.6 | 56.0 | 23.7 | 339.8 | True |
| 6 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 1350 | 2 | 2026-10-28T23:23:26 | 130.5 | 259037 | 0 | False | 40334 | 1344.47 | 1344.47 | 0 | 166 | 1.6 | 5.43 | 31.38 | 5.71 | 4.29 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 0 | 31 | 0 | 0 | 30 | 1 | 0 | 0 | 0 | 0.5 | 4 | 0 | 0 | 2 | 0.0 | 0.0 | 30.0 | 1055.5 | True |
| 7 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 1350 | 2 | 2026-10-28T23:57:48 | 150.4 | 301798 | 0 | False | 40344 | 1344.8 | 1344.8 | 0 | 157 | 1.49 | 5.23 | 95.77 | 5.4 | 4.38 | 122.5 | 41.98 | 11.96 | 2.86 | 21.5 | 128.5 | 321.9 | 102.2 | 32 | 0.67 | 2 | 29.8 | 0.2 | 0 | 0 | 0.13 | 0.07 | 3 | 0 | 0 | 2.06 | 254.7 | 53.9 | 16.1 | 920.1 | True |
| 8 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 1350 | 2 | 2026-10-29T00:13:29 | 170.8 | 345196 | 0 | False | 40501 | 1350.03 | 1350.03 | 0 | 0 | 1.48 | 2.28 | 6.84 | 2.33 | 2.09 | 126.78 | 44.59 | 12.43 | 3.14 | 22.59 | 128.6 | 347.7 | 114.8 | 32 | 0.5 | 2 | 30.11 | 0.72 | 0.06 | 1 | 0 | 0.17 | 4 | 0 | 1 | 2 | 251.3 | 41.8 | 11.5 | 53.1 | True |
| 9 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 3040 | 2 | 2026-10-29T00:19:24 | 371.2 | 764427 | 0 | False | 91061 | 3035.37 | 3035.37 | 0 | 140 | 2.0 | 54.8 | 113.4 | 52.28 | 65.61 | 276.75 | 106.02 | 27.23 | 6.47 | 48.43 | 129.4 | 436.6 | 239.4 | 32 | 5.88 | 25 | 22.92 | 3.04 | 4 | 22 | 0.85 | 0.38 | 241 | 113 | 32 | 7.14 | 566.0 | 101.1 | 5.9 | 41.4 | True |
| 10 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 3040 | 2 | 2026-10-29T00:20:37 | 417.2 | 861827 | 0 | True | 89549 | 2984.97 | 2984.97 | 0 | 1653 | 3.64 | 229.81 | 330.38 | 226.91 | 242.24 | 291.05 | 119.88 | 29.97 | 7.11 | 56.48 | 131.4 | 442.4 | 423.3 | 32 | 10.5 | 32 | 17.12 | 4.38 | 7.42 | 22 | 1.12 | 0.42 | 700 | 572 | 254 | 18.97 | 672.0 | 167.5 | 5.9 | 41.5 | True |
| 11 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 3040 | 2 | 2026-10-29T00:21:40 | 462.9 | 958632 | 0 | False | 90865 | 3028.83 | 3028.83 | 0 | 336 | 2.26 | 116.13 | 154.81 | 113.73 | 130.07 | 295.93 | 116.58 | 29.48 | 6.96 | 52.35 | 131.4 | 443.3 | 274.4 | 32 | 9 | 26 | 18.42 | 4.46 | 6.31 | 20 | 1.12 | 0.5 | 402 | 274 | 94 | 8.69 | 618.1 | 116.8 | 4.4 | 41.4 | True |
| 12 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 3040 | 2 | 2026-10-29T00:22:53 | 508.5 | 1055899 | 0 | False | 90939 | 3031.3 | 3031.3 | 0 | 261 | 3.44 | 104.5 | 139.32 | 100.73 | 118.0 | 304.09 | 124.14 | 30.6 | 7.2 | 55.19 | 131.4 | 444.6 | 256.1 | 32 | 11.81 | 32 | 16.23 | 3.88 | 8.81 | 24 | 0.96 | 0.77 | 342 | 214 | 73 | 14 | 658.8 | 137.6 | 5.5 | 41.5 | True |
| 13 | base | 4x1 | 4 | 1.0 | 512 | 1 | 8 | 32 | 7-10 | 4560 | 2 | 2026-10-29T00:25:30 | 669.0 | 1391373 | 0 | True | 133960 | 4465.33 | 4465.33 | 0 | 2841 | 116.65 | 229.38 | 294.82 | 227.28 | 239.26 | 362.63 | 159.67 | 39.29 | 9.32 | 71.7 | 133.7 | 561.3 | 611.3 | 32 | 18.12 | 27 | 6.27 | 7.62 | 15.08 | 24 | 1.23 | 0.62 | 999 | 871 | 197 | 27.23 | 752.3 | 109.7 | 4.0 | 41.7 | True |