- доказательства уровней 3–4 (прогон 2 на GitHub runner) - трек 1: 129 прогонов серий A–E, анализ, графики, подтверждённое улучшение - Dockerfile: базовые образы закреплены по digest - собственные тесты перенесены в student-tests/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
64 KiB
HTML
33 lines
64 KiB
HTML
<!doctype html><html lang="ru"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Трек 1 отчёт</title><style>
|
||
.viz-root{color-scheme:light;--surface-1:#fcfcfb;--page:#f9f9f7;--text-primary:#0b0b0b;--text-secondary:#52514e;
|
||
--muted:#898781;--grid:#e1e0d9;--axis:#c3c2b7;--border:rgba(11,11,11,.10);
|
||
--series-1:#2a78d6;--series-2:#eb6834;--series-3:#1baf7a;--series-4:#eda100}
|
||
@media (prefers-color-scheme:dark){:root:where(:not([data-theme="light"])) .viz-root{color-scheme:dark;--surface-1:#1a1a19;
|
||
--page:#0d0d0d;--text-primary:#f0efec;--text-secondary:#c3c2b7;--grid:#2c2c2a;--axis:#383835;--border:rgba(255,255,255,.10);
|
||
--series-1:#3987e5;--series-2:#d95926;--series-3:#199e70;--series-4:#c98500}}
|
||
:root[data-theme="dark"] .viz-root{color-scheme:dark;--surface-1:#1a1a19;--page:#0d0d0d;--text-primary:#f0efec;
|
||
--text-secondary:#c3c2b7;--grid:#2c2c2a;--axis:#383835;--border:rgba(255,255,255,.10);
|
||
--series-1:#3987e5;--series-2:#d95926;--series-3:#199e70;--series-4:#c98500}
|
||
body{margin:0;background:var(--page)}
|
||
.viz-root{font:14px/1.45 system-ui,sans-serif;color:var(--text-primary);background:var(--page);padding:16px;max-width:1100px;margin:auto}
|
||
h1{font-size:22px}h2{font-size:18px;margin-top:32px}p,li{color:var(--text-secondary)}
|
||
.charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));gap:16px}
|
||
figure{margin:0;min-width:0;background:var(--surface-1);border:1px solid var(--border);border-radius:8px;padding:12px}
|
||
figcaption{font-weight:600;margin-bottom:6px}svg{width:100%;height:auto;display:block}
|
||
.legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:var(--text-secondary);margin-bottom:4px}
|
||
.key{display:inline-flex;align-items:center;gap:4px}
|
||
.grid{stroke:var(--grid);stroke-width:1}.axis{stroke:var(--axis);stroke-width:1}
|
||
.tick{fill:var(--muted);font-size:11px}.dlabel{fill:var(--text-secondary);font-size:11px}
|
||
.pt{stroke:var(--surface-1);stroke-width:2}.hit{fill:transparent;cursor:default}
|
||
table{border-collapse:collapse;width:100%;font-size:12px;background:var(--surface-1);font-variant-numeric:tabular-nums}
|
||
th,td{border-bottom:1px solid var(--grid);padding:4px 6px;text-align:right}th:first-child,td:first-child{text-align:left}
|
||
.wrap{overflow-x:auto}
|
||
#tip{position:fixed;pointer-events:none;background:var(--surface-1);color:var(--text-primary);border:1px solid var(--border);
|
||
border-radius:6px;padding:4px 8px;font-size:12px;display:none;box-shadow:0 2px 8px rgba(0,0,0,.15)}
|
||
</style></head><body><div class="viz-root"><h1>Трек 1 — цена масштабирования</h1><p>Медианы по повторам. Наведите на точку — значение. Полные данные — таблицы под графиками и summary.csv.</p><h2>A_fixed_total — Фиксированный суммарный бюджет API: 1.0 CPU / 768M</h2><p><b>Гипотеза:</b> При фиксированном суммарном CPU рост числа реплик не увеличивает пиковый RPS (тот же бюджет) и немного ухудшает p95 из-за накладных расходов на процесс и пул соединений; выигрыш реплик — только отказоустойчивость.</p><div class="charts"><figure><figcaption>Успешные RPS</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x1.00</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.25</span></div><svg viewBox="0 0 640 300" role="img" aria-label="Успешные RPS"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="174.1" y2="174.1"/><text class="tick" x="50" y="174.1" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="88.1" y2="88.1"/><text class="tick" x="50" y="88.1" text-anchor="end" dy="4">200</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">ok RPS</text><path d="M56.0 67.2 L288.0 38.2 L520.0 47.8" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="67.2" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=4 · 224.4"/><circle class="hit" cx="56.0" cy="67.2" r="12" data-tip="1x1.00 · c=4 · 224.4"/><circle class="pt" cx="288.0" cy="38.2" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=16 · 258.1"/><circle class="hit" cx="288.0" cy="38.2" r="12" data-tip="1x1.00 · c=16 · 258.1"/><circle class="pt" cx="520.0" cy="47.8" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=64 · 246.9"/><circle class="hit" cx="520.0" cy="47.8" r="12" data-tip="1x1.00 · c=64 · 246.9"/><text class="dlabel" x="528.0" y="43.3" dy="4">1x1.00</text><path d="M56.0 89.7 L288.0 59.2 L520.0 43.9" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="89.7" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 198.2"/><circle class="hit" cx="56.0" cy="89.7" r="12" data-tip="2x0.50 · c=4 · 198.2"/><circle class="pt" cx="288.0" cy="59.2" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 233.7"/><circle class="hit" cx="288.0" cy="59.2" r="12" data-tip="2x0.50 · c=16 · 233.7"/><circle class="pt" cx="520.0" cy="43.9" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 251.5"/><circle class="hit" cx="520.0" cy="43.9" r="12" data-tip="2x0.50 · c=64 · 251.5"/><text class="dlabel" x="528.0" y="42.4" dy="4">2x0.50</text><path d="M56.0 103.8 L288.0 75.1 L520.0 61.6" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="103.8" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=4 · 181.8"/><circle class="hit" cx="56.0" cy="103.8" r="12" data-tip="4x0.25 · c=4 · 181.8"/><circle class="pt" cx="288.0" cy="75.1" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=16 · 215.2"/><circle class="hit" cx="288.0" cy="75.1" r="12" data-tip="4x0.25 · c=16 · 215.2"/><circle class="pt" cx="520.0" cy="61.6" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=64 · 230.9"/><circle class="hit" cx="520.0" cy="61.6" r="12" data-tip="4x0.25 · c=64 · 230.9"/><text class="dlabel" x="528.0" y="63.1" dy="4">4x0.25</text></svg></figure><figure><figcaption>p95 задержки, мс</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x1.00</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.25</span></div><svg viewBox="0 0 640 300" role="img" aria-label="p95 задержки, мс"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="194.9" y2="194.9"/><text class="tick" x="50" y="194.9" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="129.7" y2="129.7"/><text class="tick" x="50" y="129.7" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="64.6" y2="64.6"/><text class="tick" x="50" y="64.6" text-anchor="end" dy="4">600</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">мс</text><path d="M56.0 245.4 L288.0 213.8 L520.0 71.4" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="245.4" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=4 · 44.8"/><circle class="hit" cx="56.0" cy="245.4" r="12" data-tip="1x1.00 · c=4 · 44.8"/><circle class="pt" cx="288.0" cy="213.8" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=16 · 142.0"/><circle class="hit" cx="288.0" cy="213.8" r="12" data-tip="1x1.00 · c=16 · 142.0"/><circle class="pt" cx="520.0" cy="71.4" r="4" fill="var(--series-1)" data-tip="1x1.00 · c=64 · 579.2"/><circle class="hit" cx="520.0" cy="71.4" r="12" data-tip="1x1.00 · c=64 · 579.2"/><text class="dlabel" x="528.0" y="66.9" dy="4">1x1.00</text><path d="M56.0 244.1 L288.0 206.0 L520.0 39.3" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="244.1" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 48.9"/><circle class="hit" cx="56.0" cy="244.1" r="12" data-tip="2x0.50 · c=4 · 48.9"/><circle class="pt" cx="288.0" cy="206.0" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 165.7"/><circle class="hit" cx="288.0" cy="206.0" r="12" data-tip="2x0.50 · c=16 · 165.7"/><circle class="pt" cx="520.0" cy="39.3" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 677.6"/><circle class="hit" cx="520.0" cy="39.3" r="12" data-tip="2x0.50 · c=64 · 677.6"/><text class="dlabel" x="528.0" y="37.8" dy="4">2x0.50</text><path d="M56.0 242.0 L288.0 200.4 L520.0 38.2" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="242.0" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=4 · 55.2"/><circle class="hit" cx="56.0" cy="242.0" r="12" data-tip="4x0.25 · c=4 · 55.2"/><circle class="pt" cx="288.0" cy="200.4" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=16 · 182.9"/><circle class="hit" cx="288.0" cy="200.4" r="12" data-tip="4x0.25 · c=16 · 182.9"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-3)" data-tip="4x0.25 · c=64 · 681.1"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="4x0.25 · c=64 · 681.1"/><text class="dlabel" x="528.0" y="39.7" dy="4">4x0.25</text></svg></figure></div><div class="wrap"><table><thead><tr><th>config</th><th>пик RPS</th><th>к первой</th><th>c пика</th><th>c насыщения</th><th>узкое место</th><th>CPU хоста</th><th>pool empty / wait ms</th></tr></thead><tbody><tr><td>1x1.00</td><td>258.1</td><td>1.00×</td><td>16</td><td>64</td><td>redis (1.00) — насыщена</td><td>71%</td><td>0.003 / 0.02</td></tr><tr><td>2x0.50</td><td>251.5</td><td>0.97×</td><td>64</td><td>64</td><td>redis (1.00) — насыщена</td><td>79%</td><td>0.013 / 0.19</td></tr><tr><td>4x0.25</td><td>230.9</td><td>0.89×</td><td>64</td><td>64</td><td>api (0.42)</td><td>29%</td><td>0.000 / 0.09</td></tr></tbody></table></div><details><summary>Все точки серии</summary><div class="wrap"><table><thead><tr><th>config</th><th>c</th><th>repeats</th><th>ok_rps</th><th>rps_min</th><th>rps_max</th><th>write_rps</th><th>read_rps</th><th>p50_ms</th><th>p95_ms</th><th>p99_ms</th><th>err</th><th>util_api</th><th>util_pg</th><th>util_redis</th><th>util_lb</th><th>host_cores</th><th>pool_empty</th><th>pool_wait_ms</th><th>pg_active</th></tr></thead><tbody><tr><td>1x1.00</td><td>4</td><td>3</td><td>224.4</td><td>223.3</td><td>225.8</td><td>111.8</td><td>112.9</td><td>19.10</td><td>44.84</td><td>57.88</td><td>0.0000</td><td>0.70</td><td>0.19</td><td>1.03</td><td>0.09</td><td>1.44/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>1x1.00</td><td>16</td><td>3</td><td>258.1</td><td>255.0</td><td>264.0</td><td>128.2</td><td>129.9</td><td>40.23</td><td>142.01</td><td>190.66</td><td>0.0000</td><td>0.67</td><td>0.19</td><td>1.01</td><td>0.10</td><td>1.42/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>1x1.00</td><td>64</td><td>3</td><td>246.9</td><td>236.8</td><td>251.0</td><td>120.3</td><td>122.7</td><td>77.49</td><td>579.19</td><td>635.98</td><td>0.0000</td><td>0.69</td><td>0.19</td><td>1.00</td><td>0.10</td><td>1.43/2</td><td>0.003</td><td>0.02</td><td>0</td></tr><tr><td>2x0.50</td><td>4</td><td>3</td><td>198.2</td><td>190.8</td><td>205.5</td><td>97.1</td><td>101.1</td><td>17.03</td><td>48.94</td><td>63.16</td><td>0.0000</td><td>0.81</td><td>0.16</td><td>1.05</td><td>0.09</td><td>1.53/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>2x0.50</td><td>16</td><td>3</td><td>233.7</td><td>231.1</td><td>242.9</td><td>119.3</td><td>116.4</td><td>36.61</td><td>165.70</td><td>208.17</td><td>0.0000</td><td>0.79</td><td>0.20</td><td>0.99</td><td>0.09</td><td>1.55/2</td><td>0.000</td><td>0.01</td><td>0</td></tr><tr><td>2x0.50</td><td>64</td><td>3</td><td>251.5</td><td>242.0</td><td>254.7</td><td>122.5</td><td>128.0</td><td>89.25</td><td>677.59</td><td>857.04</td><td>0.0000</td><td>0.81</td><td>0.20</td><td>1.00</td><td>0.09</td><td>1.58/2</td><td>0.013</td><td>0.19</td><td>1</td></tr><tr><td>4x0.25</td><td>4</td><td>3</td><td>181.8</td><td>181.5</td><td>193.0</td><td>88.7</td><td>93.2</td><td>15.74</td><td>55.21</td><td>79.76</td><td>0.0000</td><td>0.84</td><td>0.17</td><td>0.94</td><td>0.07</td><td>1.53/2</td><td>0.000</td><td>0.01</td><td>1</td></tr><tr><td>4x0.25</td><td>16</td><td>3</td><td>215.2</td><td>214.5</td><td>221.0</td><td>106.3</td><td>108.9</td><td>41.80</td><td>182.87</td><td>326.25</td><td>0.0000</td><td>0.86</td><td>0.18</td><td>0.88</td><td>0.08</td><td>1.54/2</td><td>0.000</td><td>0.01</td><td>1</td></tr><tr><td>4x0.25</td><td>64</td><td>3</td><td>230.9</td><td>227.9</td><td>240.9</td><td>115.7</td><td>115.2</td><td>311.46</td><td>681.08</td><td>819.55</td><td>0.0000</td><td>0.42</td><td>0.05</td><td>0.19</td><td>0.02</td><td>0.57/2</td><td>0.000</td><td>0.09</td><td>0</td></tr></tbody></table></div></details><h2>B_scale_out — Рост ресурсов: реплики по 0.5 CPU, БД 1.0 CPU, LB 0.5 CPU</h2><p><b>Гипотеза:</b> Пиковый RPS растёт почти линейно, пока узкое место — CPU API; затем рост останавливается на общей зависимости (PostgreSQL, Redis или LB), чья утилизация CPU приближается к лимиту.</p><div class="charts"><figure><figcaption>Успешные RPS</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.50</span></div><svg viewBox="0 0 640 300" role="img" aria-label="Успешные RPS"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="200.4" y2="200.4"/><text class="tick" x="50" y="200.4" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="140.8" y2="140.8"/><text class="tick" x="50" y="140.8" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="81.2" y2="81.2"/><text class="tick" x="50" y="81.2" text-anchor="end" dy="4">300</text><line class="grid" x1="56" x2="520" y1="21.6" y2="21.6"/><text class="tick" x="50" y="21.6" text-anchor="end" dy="4">400</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">ok RPS</text><path d="M56.0 105.9 L288.0 84.0 L520.0 89.9" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="105.9" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=4 · 258.6"/><circle class="hit" cx="56.0" cy="105.9" r="12" data-tip="1x0.50 · c=4 · 258.6"/><circle class="pt" cx="288.0" cy="84.0" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=16 · 295.3"/><circle class="hit" cx="288.0" cy="84.0" r="12" data-tip="1x0.50 · c=16 · 295.3"/><circle class="pt" cx="520.0" cy="89.9" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=64 · 285.4"/><circle class="hit" cx="520.0" cy="89.9" r="12" data-tip="1x0.50 · c=64 · 285.4"/><text class="dlabel" x="528.0" y="85.4" dy="4">1x0.50</text><path d="M56.0 73.6 L288.0 47.7 L520.0 38.2" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="73.6" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 312.7"/><circle class="hit" cx="56.0" cy="73.6" r="12" data-tip="2x0.50 · c=4 · 312.7"/><circle class="pt" cx="288.0" cy="47.7" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 356.2"/><circle class="hit" cx="288.0" cy="47.7" r="12" data-tip="2x0.50 · c=16 · 356.2"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 372.1"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="2x0.50 · c=64 · 372.1"/><text class="dlabel" x="528.0" y="36.7" dy="4">2x0.50</text><path d="M56.0 86.3 L288.0 63.4 L520.0 47.4" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="86.3" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=4 · 291.5"/><circle class="hit" cx="56.0" cy="86.3" r="12" data-tip="4x0.50 · c=4 · 291.5"/><circle class="pt" cx="288.0" cy="63.4" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=16 · 329.9"/><circle class="hit" cx="288.0" cy="63.4" r="12" data-tip="4x0.50 · c=16 · 329.9"/><circle class="pt" cx="520.0" cy="47.4" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=64 · 356.7"/><circle class="hit" cx="520.0" cy="47.4" r="12" data-tip="4x0.50 · c=64 · 356.7"/><text class="dlabel" x="528.0" y="48.9" dy="4">4x0.50</text></svg></figure><figure><figcaption>p95 задержки, мс</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.50</span></div><svg viewBox="0 0 640 300" role="img" aria-label="p95 задержки, мс"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="213.2" y2="213.2"/><text class="tick" x="50" y="213.2" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="166.4" y2="166.4"/><text class="tick" x="50" y="166.4" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="119.6" y2="119.6"/><text class="tick" x="50" y="119.6" text-anchor="end" dy="4">300</text><line class="grid" x1="56" x2="520" y1="72.8" y2="72.8"/><text class="tick" x="50" y="72.8" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="25.9" y2="25.9"/><text class="tick" x="50" y="25.9" text-anchor="end" dy="4">500</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">мс</text><path d="M56.0 235.3 L288.0 204.4 L520.0 38.2" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="235.3" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=4 · 52.8"/><circle class="hit" cx="56.0" cy="235.3" r="12" data-tip="1x0.50 · c=4 · 52.8"/><circle class="pt" cx="288.0" cy="204.4" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=16 · 118.7"/><circle class="hit" cx="288.0" cy="204.4" r="12" data-tip="1x0.50 · c=16 · 118.7"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=64 · 473.8"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="1x0.50 · c=64 · 473.8"/><text class="dlabel" x="528.0" y="33.7" dy="4">1x0.50</text><path d="M56.0 244.2 L288.0 208.8 L520.0 44.7" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="244.2" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 33.8"/><circle class="hit" cx="56.0" cy="244.2" r="12" data-tip="2x0.50 · c=4 · 33.8"/><circle class="pt" cx="288.0" cy="208.8" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 109.3"/><circle class="hit" cx="288.0" cy="208.8" r="12" data-tip="2x0.50 · c=16 · 109.3"/><circle class="pt" cx="520.0" cy="44.7" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 460.0"/><circle class="hit" cx="520.0" cy="44.7" r="12" data-tip="2x0.50 · c=64 · 460.0"/><text class="dlabel" x="528.0" y="43.2" dy="4">2x0.50</text><path d="M56.0 244.9 L288.0 206.5 L520.0 73.0" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="244.9" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=4 · 32.3"/><circle class="hit" cx="56.0" cy="244.9" r="12" data-tip="4x0.50 · c=4 · 32.3"/><circle class="pt" cx="288.0" cy="206.5" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=16 · 114.2"/><circle class="hit" cx="288.0" cy="206.5" r="12" data-tip="4x0.50 · c=16 · 114.2"/><circle class="pt" cx="520.0" cy="73.0" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=64 · 399.5"/><circle class="hit" cx="520.0" cy="73.0" r="12" data-tip="4x0.50 · c=64 · 399.5"/><text class="dlabel" x="528.0" y="74.5" dy="4">4x0.50</text></svg></figure></div><div class="wrap"><table><thead><tr><th>config</th><th>пик RPS</th><th>к первой</th><th>c пика</th><th>c насыщения</th><th>узкое место</th><th>CPU хоста</th><th>pool empty / wait ms</th></tr></thead><tbody><tr><td>1x0.50</td><td>295.3</td><td>1.00×</td><td>16</td><td>64</td><td>api (1.00) — насыщена</td><td>53%</td><td>0.011 / 0.03</td></tr><tr><td>2x0.50</td><td>372.1</td><td>1.26×</td><td>64</td><td>64</td><td>redis (1.00) — насыщена</td><td>75%</td><td>0.009 / 0.12</td></tr><tr><td>4x0.50</td><td>356.7</td><td>1.21×</td><td>64</td><td>64</td><td>redis (0.97) — насыщена</td><td>80%</td><td>0.000 / 0.00</td></tr></tbody></table></div><details><summary>Все точки серии</summary><div class="wrap"><table><thead><tr><th>config</th><th>c</th><th>repeats</th><th>ok_rps</th><th>rps_min</th><th>rps_max</th><th>write_rps</th><th>read_rps</th><th>p50_ms</th><th>p95_ms</th><th>p99_ms</th><th>err</th><th>util_api</th><th>util_pg</th><th>util_redis</th><th>util_lb</th><th>host_cores</th><th>pool_empty</th><th>pool_wait_ms</th><th>pg_active</th></tr></thead><tbody><tr><td>1x0.50</td><td>4</td><td>3</td><td>258.6</td><td>227.4</td><td>261.2</td><td>129.9</td><td>128.2</td><td>13.65</td><td>52.79</td><td>61.48</td><td>0.0000</td><td>0.99</td><td>0.14</td><td>0.78</td><td>0.07</td><td>1.06/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>1x0.50</td><td>16</td><td>3</td><td>295.3</td><td>293.3</td><td>300.3</td><td>148.1</td><td>148.0</td><td>48.74</td><td>118.69</td><td>151.75</td><td>0.0000</td><td>1.00</td><td>0.14</td><td>0.79</td><td>0.08</td><td>1.08/2</td><td>0.000</td><td>0.00</td><td>5</td></tr><tr><td>1x0.50</td><td>64</td><td>3</td><td>285.4</td><td>281.2</td><td>285.7</td><td>143.7</td><td>142.1</td><td>341.54</td><td>473.85</td><td>509.37</td><td>0.0000</td><td>1.00</td><td>0.13</td><td>0.78</td><td>0.07</td><td>1.06/2</td><td>0.011</td><td>0.03</td><td>0</td></tr><tr><td>2x0.50</td><td>4</td><td>3</td><td>312.7</td><td>304.5</td><td>316.1</td><td>153.5</td><td>159.1</td><td>12.58</td><td>33.81</td><td>41.91</td><td>0.0000</td><td>0.77</td><td>0.15</td><td>1.01</td><td>0.08</td><td>1.48/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>2x0.50</td><td>16</td><td>3</td><td>356.2</td><td>352.9</td><td>360.5</td><td>174.9</td><td>183.3</td><td>24.92</td><td>109.31</td><td>138.03</td><td>0.0000</td><td>0.74</td><td>0.18</td><td>1.00</td><td>0.09</td><td>1.47/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>2x0.50</td><td>64</td><td>3</td><td>372.1</td><td>368.7</td><td>373.7</td><td>182.1</td><td>190.5</td><td>56.62</td><td>460.00</td><td>511.75</td><td>0.0000</td><td>0.77</td><td>0.19</td><td>1.00</td><td>0.09</td><td>1.50/2</td><td>0.009</td><td>0.12</td><td>0</td></tr><tr><td>4x0.50</td><td>4</td><td>3</td><td>291.5</td><td>289.5</td><td>292.3</td><td>144.7</td><td>147.5</td><td>12.11</td><td>32.35</td><td>43.74</td><td>0.0000</td><td>0.44</td><td>0.17</td><td>1.00</td><td>0.08</td><td>1.60/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>4x0.50</td><td>16</td><td>3</td><td>329.9</td><td>325.7</td><td>329.9</td><td>164.9</td><td>164.9</td><td>34.25</td><td>114.19</td><td>140.18</td><td>0.0000</td><td>0.44</td><td>0.18</td><td>0.99</td><td>0.09</td><td>1.61/2</td><td>0.000</td><td>0.01</td><td>1</td></tr><tr><td>4x0.50</td><td>64</td><td>3</td><td>356.7</td><td>346.3</td><td>359.6</td><td>177.0</td><td>179.7</td><td>62.23</td><td>399.52</td><td>461.76</td><td>0.0000</td><td>0.43</td><td>0.20</td><td>0.97</td><td>0.10</td><td>1.59/2</td><td>0.000</td><td>0.00</td><td>4</td></tr></tbody></table></div></details><h2>D_improvement — Кандидаты улучшения на 4×0.5 CPU</h2><p><b>Гипотеза:</b> Инвалидация кэша истории через SCAN (lab2) делает O(keyspace/100) запросов к Redis на каждую запись; ключ с версией чата (CACHE_INVALIDATION=version) делает 1 INCR и поднимает RPS записи при большом keyspace. Альтернативы: меньший пул на реплику, leastconn.</p><div class="charts"><figure><figcaption>Успешные RPS</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>baseline_scan</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>cache_version</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>pool_8</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3"/></svg>leastconn</span></div><svg viewBox="0 0 640 300" role="img" aria-label="Успешные RPS"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="179.2" y2="179.2"/><text class="tick" x="50" y="179.2" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="98.4" y2="98.4"/><text class="tick" x="50" y="98.4" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="17.6" y2="17.6"/><text class="tick" x="50" y="17.6" text-anchor="end" dy="4">600</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">32</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">ok RPS</text><path d="M56.0 173.6 L520.0 170.4" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="173.6" r="4" fill="var(--series-1)" data-tip="baseline_scan · c=32 · 214.0"/><circle class="hit" cx="56.0" cy="173.6" r="12" data-tip="baseline_scan · c=32 · 214.0"/><circle class="pt" cx="520.0" cy="170.4" r="4" fill="var(--series-1)" data-tip="baseline_scan · c=64 · 221.9"/><circle class="hit" cx="520.0" cy="170.4" r="12" data-tip="baseline_scan · c=64 · 221.9"/><text class="dlabel" x="528.0" y="165.9" dy="4">baseline_scan</text><path d="M56.0 40.4 L520.0 38.2" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="40.4" r="4" fill="var(--series-2)" data-tip="cache_version · c=32 · 543.7"/><circle class="hit" cx="56.0" cy="40.4" r="12" data-tip="cache_version · c=32 · 543.7"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-2)" data-tip="cache_version · c=64 · 549.1"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="cache_version · c=64 · 549.1"/><text class="dlabel" x="528.0" y="36.7" dy="4">cache_version</text><path d="M56.0 175.9 L520.0 165.6" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="175.9" r="4" fill="var(--series-3)" data-tip="pool_8 · c=32 · 208.2"/><circle class="hit" cx="56.0" cy="175.9" r="12" data-tip="pool_8 · c=32 · 208.2"/><circle class="pt" cx="520.0" cy="165.6" r="4" fill="var(--series-3)" data-tip="pool_8 · c=64 · 233.7"/><circle class="hit" cx="520.0" cy="165.6" r="12" data-tip="pool_8 · c=64 · 233.7"/><text class="dlabel" x="528.0" y="167.1" dy="4">pool_8</text><path d="M56.0 166.4 L520.0 169.7" fill="none" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="166.4" r="4" fill="var(--series-4)" data-tip="leastconn · c=32 · 231.6"/><circle class="hit" cx="56.0" cy="166.4" r="12" data-tip="leastconn · c=32 · 231.6"/><circle class="pt" cx="520.0" cy="169.7" r="4" fill="var(--series-4)" data-tip="leastconn · c=64 · 223.5"/><circle class="hit" cx="520.0" cy="169.7" r="12" data-tip="leastconn · c=64 · 223.5"/><text class="dlabel" x="528.0" y="174.2" dy="4">leastconn</text></svg></figure><figure><figcaption>p95 задержки, мс</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>baseline_scan</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>cache_version</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>pool_8</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3"/></svg>leastconn</span></div><svg viewBox="0 0 640 300" role="img" aria-label="p95 задержки, мс"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="188.5" y2="188.5"/><text class="tick" x="50" y="188.5" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="117.1" y2="117.1"/><text class="tick" x="50" y="117.1" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="45.6" y2="45.6"/><text class="tick" x="50" y="45.6" text-anchor="end" dy="4">600</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">32</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">мс</text><path d="M56.0 136.3 L520.0 38.2" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="136.3" r="4" fill="var(--series-1)" data-tip="baseline_scan · c=32 · 346.3"/><circle class="hit" cx="56.0" cy="136.3" r="12" data-tip="baseline_scan · c=32 · 346.3"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-1)" data-tip="baseline_scan · c=64 · 620.9"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="baseline_scan · c=64 · 620.9"/><text class="dlabel" x="528.0" y="33.7" dy="4">baseline_scan</text><path d="M56.0 213.7 L520.0 165.5" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="213.7" r="4" fill="var(--series-2)" data-tip="cache_version · c=32 · 129.6"/><circle class="hit" cx="56.0" cy="213.7" r="12" data-tip="cache_version · c=32 · 129.6"/><circle class="pt" cx="520.0" cy="165.5" r="4" fill="var(--series-2)" data-tip="cache_version · c=64 · 264.5"/><circle class="hit" cx="520.0" cy="165.5" r="12" data-tip="cache_version · c=64 · 264.5"/><text class="dlabel" x="528.0" y="164.0" dy="4">cache_version</text><path d="M56.0 136.2 L520.0 39.3" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="136.2" r="4" fill="var(--series-3)" data-tip="pool_8 · c=32 · 346.6"/><circle class="hit" cx="56.0" cy="136.2" r="12" data-tip="pool_8 · c=32 · 346.6"/><circle class="pt" cx="520.0" cy="39.3" r="4" fill="var(--series-3)" data-tip="pool_8 · c=64 · 617.7"/><circle class="hit" cx="520.0" cy="39.3" r="12" data-tip="pool_8 · c=64 · 617.7"/><text class="dlabel" x="528.0" y="40.8" dy="4">pool_8</text><path d="M56.0 145.2 L520.0 39.9" fill="none" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="145.2" r="4" fill="var(--series-4)" data-tip="leastconn · c=32 · 321.4"/><circle class="hit" cx="56.0" cy="145.2" r="12" data-tip="leastconn · c=32 · 321.4"/><circle class="pt" cx="520.0" cy="39.9" r="4" fill="var(--series-4)" data-tip="leastconn · c=64 · 616.1"/><circle class="hit" cx="520.0" cy="39.9" r="12" data-tip="leastconn · c=64 · 616.1"/><text class="dlabel" x="528.0" y="44.4" dy="4">leastconn</text></svg></figure></div><div class="wrap"><table><thead><tr><th>config</th><th>пик RPS</th><th>к первой</th><th>c пика</th><th>c насыщения</th><th>узкое место</th><th>CPU хоста</th><th>pool empty / wait ms</th></tr></thead><tbody><tr><td>baseline_scan</td><td>221.9</td><td>1.00×</td><td>64</td><td>64</td><td>redis (0.99) — насыщена</td><td>75%</td><td>0.000 / 0.12</td></tr><tr><td>cache_version</td><td>549.1</td><td>2.48×</td><td>64</td><td>64</td><td>postgres (0.57)</td><td>78%</td><td>0.024 / 0.11</td></tr><tr><td>pool_8</td><td>233.7</td><td>1.05×</td><td>64</td><td>64</td><td>redis (0.98) — насыщена</td><td>76%</td><td>0.016 / 0.17</td></tr><tr><td>leastconn</td><td>231.6</td><td>1.04×</td><td>32</td><td>64</td><td>redis (0.99) — насыщена</td><td>75%</td><td>0.000 / 0.02</td></tr></tbody></table></div><h3>Кандидаты против baseline_scan</h3><div class="wrap"><table><thead><tr><th>кандидат</th><th>c</th><th>ΔRPS %</th><th>Δp95 %</th><th>повторы b/c</th><th>подтверждено</th></tr></thead><tbody><tr><td>cache_version</td><td>64</td><td>147.5</td><td>-57.4</td><td>3/3</td><td>да</td></tr><tr><td>pool_8</td><td>64</td><td>5.3</td><td>-0.5</td><td>3/3</td><td>нет</td></tr><tr><td>leastconn</td><td>64</td><td>0.7</td><td>-0.8</td><td>3/3</td><td>нет</td></tr></tbody></table></div><details><summary>Все точки серии</summary><div class="wrap"><table><thead><tr><th>config</th><th>c</th><th>repeats</th><th>ok_rps</th><th>rps_min</th><th>rps_max</th><th>write_rps</th><th>read_rps</th><th>p50_ms</th><th>p95_ms</th><th>p99_ms</th><th>err</th><th>util_api</th><th>util_pg</th><th>util_redis</th><th>util_lb</th><th>host_cores</th><th>pool_empty</th><th>pool_wait_ms</th><th>pg_active</th></tr></thead><tbody><tr><td>baseline_scan</td><td>32</td><td>3</td><td>214.0</td><td>212.9</td><td>216.0</td><td>105.5</td><td>108.8</td><td>50.05</td><td>346.31</td><td>399.77</td><td>0.0000</td><td>0.38</td><td>0.19</td><td>1.00</td><td>0.09</td><td>1.49/2</td><td>0.000</td><td>0.02</td><td>1</td></tr><tr><td>baseline_scan</td><td>64</td><td>3</td><td>221.9</td><td>214.7</td><td>230.9</td><td>110.8</td><td>111.1</td><td>401.92</td><td>620.88</td><td>740.32</td><td>0.0000</td><td>0.39</td><td>0.18</td><td>0.99</td><td>0.10</td><td>1.50/2</td><td>0.000</td><td>0.12</td><td>1</td></tr><tr><td>cache_version</td><td>32</td><td>3</td><td>543.7</td><td>540.1</td><td>566.4</td><td>267.5</td><td>276.7</td><td>48.60</td><td>129.57</td><td>174.33</td><td>0.0000</td><td>0.38</td><td>0.58</td><td>0.24</td><td>0.20</td><td>1.55/2</td><td>0.001</td><td>0.11</td><td>24</td></tr><tr><td>cache_version</td><td>64</td><td>3</td><td>549.1</td><td>547.6</td><td>573.7</td><td>275.5</td><td>273.8</td><td>91.17</td><td>264.48</td><td>351.21</td><td>0.0000</td><td>0.39</td><td>0.57</td><td>0.23</td><td>0.19</td><td>1.56/2</td><td>0.024</td><td>0.11</td><td>43</td></tr><tr><td>pool_8</td><td>32</td><td>3</td><td>208.2</td><td>187.3</td><td>227.5</td><td>104.7</td><td>103.5</td><td>197.00</td><td>346.58</td><td>407.86</td><td>0.0000</td><td>0.37</td><td>0.18</td><td>1.00</td><td>0.09</td><td>1.48/2</td><td>0.001</td><td>0.01</td><td>1</td></tr><tr><td>pool_8</td><td>64</td><td>3</td><td>233.7</td><td>229.1</td><td>237.3</td><td>116.5</td><td>116.4</td><td>387.35</td><td>617.68</td><td>699.87</td><td>0.0000</td><td>0.40</td><td>0.20</td><td>0.98</td><td>0.10</td><td>1.53/2</td><td>0.016</td><td>0.17</td><td>2</td></tr><tr><td>leastconn</td><td>32</td><td>3</td><td>231.6</td><td>222.3</td><td>232.7</td><td>115.0</td><td>114.7</td><td>189.50</td><td>321.39</td><td>412.19</td><td>0.0000</td><td>0.39</td><td>0.19</td><td>0.99</td><td>0.09</td><td>1.53/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>leastconn</td><td>64</td><td>3</td><td>223.5</td><td>211.8</td><td>253.1</td><td>114.6</td><td>108.9</td><td>418.69</td><td>616.12</td><td>745.16</td><td>0.0000</td><td>0.38</td><td>0.20</td><td>0.99</td><td>0.09</td><td>1.51/2</td><td>0.000</td><td>0.02</td><td>2</td></tr></tbody></table></div></details><h2>C_shared_resources — 4×0.5 CPU API, меняем ресурсы общих зависимостей</h2><p><b>Гипотеза:</b> Если насыщение B вызвано общей зависимостью, увеличение её CPU поднимает пиковый RPS, а увеличение CPU других зависимостей — нет.</p><div class="charts"><figure><figcaption>Успешные RPS</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>pg1_lb0.5_redis0.5</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>pg2</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>lb1</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3"/></svg>redis1</span></div><svg viewBox="0 0 640 300" role="img" aria-label="Успешные RPS"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="218.8" y2="218.8"/><text class="tick" x="50" y="218.8" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="177.5" y2="177.5"/><text class="tick" x="50" y="177.5" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="136.3" y2="136.3"/><text class="tick" x="50" y="136.3" text-anchor="end" dy="4">300</text><line class="grid" x1="56" x2="520" y1="95.1" y2="95.1"/><text class="tick" x="50" y="95.1" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="53.8" y2="53.8"/><text class="tick" x="50" y="53.8" text-anchor="end" dy="4">500</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">ok RPS</text><path d="M56.0 72.3 L520.0 56.5" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="72.3" r="4" fill="var(--series-1)" data-tip="pg1_lb0.5_redis0.5 · c=16 · 455.1"/><circle class="hit" cx="56.0" cy="72.3" r="12" data-tip="pg1_lb0.5_redis0.5 · c=16 · 455.1"/><circle class="pt" cx="520.0" cy="56.5" r="4" fill="var(--series-1)" data-tip="pg1_lb0.5_redis0.5 · c=64 · 493.5"/><circle class="hit" cx="520.0" cy="56.5" r="12" data-tip="pg1_lb0.5_redis0.5 · c=64 · 493.5"/><text class="dlabel" x="528.0" y="52.0" dy="4">pg1_lb0.5_redis0.5</text><path d="M56.0 69.2 L520.0 53.6" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="69.2" r="4" fill="var(--series-2)" data-tip="pg2 · c=16 · 462.7"/><circle class="hit" cx="56.0" cy="69.2" r="12" data-tip="pg2 · c=16 · 462.7"/><circle class="pt" cx="520.0" cy="53.6" r="4" fill="var(--series-2)" data-tip="pg2 · c=64 · 500.5"/><circle class="hit" cx="520.0" cy="53.6" r="12" data-tip="pg2 · c=64 · 500.5"/><text class="dlabel" x="528.0" y="52.1" dy="4">pg2</text><path d="M56.0 73.2 L520.0 59.4" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="73.2" r="4" fill="var(--series-3)" data-tip="lb1 · c=16 · 452.9"/><circle class="hit" cx="56.0" cy="73.2" r="12" data-tip="lb1 · c=16 · 452.9"/><circle class="pt" cx="520.0" cy="59.4" r="4" fill="var(--series-3)" data-tip="lb1 · c=64 · 486.4"/><circle class="hit" cx="520.0" cy="59.4" r="12" data-tip="lb1 · c=64 · 486.4"/><text class="dlabel" x="528.0" y="60.9" dy="4">lb1</text><path d="M56.0 57.1 L520.0 38.2" fill="none" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="57.1" r="4" fill="var(--series-4)" data-tip="redis1 · c=16 · 492.1"/><circle class="hit" cx="56.0" cy="57.1" r="12" data-tip="redis1 · c=16 · 492.1"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-4)" data-tip="redis1 · c=64 · 537.9"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="redis1 · c=64 · 537.9"/><text class="dlabel" x="528.0" y="42.7" dy="4">redis1</text></svg></figure><figure><figcaption>p95 задержки, мс</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>pg1_lb0.5_redis0.5</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>pg2</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>lb1</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3"/></svg>redis1</span></div><svg viewBox="0 0 640 300" role="img" aria-label="p95 задержки, мс"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="184.3" y2="184.3"/><text class="tick" x="50" y="184.3" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="108.7" y2="108.7"/><text class="tick" x="50" y="108.7" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="33.0" y2="33.0"/><text class="tick" x="50" y="33.0" text-anchor="end" dy="4">300</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">мс</text><path d="M56.0 199.0 L520.0 42.9" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="199.0" r="4" fill="var(--series-1)" data-tip="pg1_lb0.5_redis0.5 · c=16 · 80.6"/><circle class="hit" cx="56.0" cy="199.0" r="12" data-tip="pg1_lb0.5_redis0.5 · c=16 · 80.6"/><circle class="pt" cx="520.0" cy="42.9" r="4" fill="var(--series-1)" data-tip="pg1_lb0.5_redis0.5 · c=64 · 286.9"/><circle class="hit" cx="520.0" cy="42.9" r="12" data-tip="pg1_lb0.5_redis0.5 · c=64 · 286.9"/><text class="dlabel" x="528.0" y="38.4" dy="4">pg1_lb0.5_redis0.5</text><path d="M56.0 200.5 L520.0 51.0" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="200.5" r="4" fill="var(--series-2)" data-tip="pg2 · c=16 · 78.7"/><circle class="hit" cx="56.0" cy="200.5" r="12" data-tip="pg2 · c=16 · 78.7"/><circle class="pt" cx="520.0" cy="51.0" r="4" fill="var(--series-2)" data-tip="pg2 · c=64 · 276.2"/><circle class="hit" cx="520.0" cy="51.0" r="12" data-tip="pg2 · c=64 · 276.2"/><text class="dlabel" x="528.0" y="49.5" dy="4">pg2</text><path d="M56.0 196.5 L520.0 38.2" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="196.5" r="4" fill="var(--series-3)" data-tip="lb1 · c=16 · 84.0"/><circle class="hit" cx="56.0" cy="196.5" r="12" data-tip="lb1 · c=16 · 84.0"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-3)" data-tip="lb1 · c=64 · 293.2"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="lb1 · c=64 · 293.2"/><text class="dlabel" x="528.0" y="39.7" dy="4">lb1</text><path d="M56.0 202.2 L520.0 54.1" fill="none" stroke="var(--series-4)" stroke-width="2" stroke-dasharray="8 3 2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="202.2" r="4" fill="var(--series-4)" data-tip="redis1 · c=16 · 76.3"/><circle class="hit" cx="56.0" cy="202.2" r="12" data-tip="redis1 · c=16 · 76.3"/><circle class="pt" cx="520.0" cy="54.1" r="4" fill="var(--series-4)" data-tip="redis1 · c=64 · 272.2"/><circle class="hit" cx="520.0" cy="54.1" r="12" data-tip="redis1 · c=64 · 272.2"/><text class="dlabel" x="528.0" y="58.6" dy="4">redis1</text></svg></figure></div><div class="wrap"><table><thead><tr><th>config</th><th>пик RPS</th><th>к первой</th><th>c пика</th><th>c насыщения</th><th>узкое место</th><th>CPU хоста</th><th>pool empty / wait ms</th></tr></thead><tbody><tr><td>pg1_lb0.5_redis0.5</td><td>493.5</td><td>1.00×</td><td>64</td><td>64</td><td>redis (1.00) — насыщена</td><td>76%</td><td>0.000 / 0.07</td></tr><tr><td>pg2</td><td>500.5</td><td>1.01×</td><td>64</td><td>64</td><td>redis (0.99) — насыщена</td><td>75%</td><td>0.001 / 0.04</td></tr><tr><td>lb1</td><td>486.4</td><td>0.99×</td><td>64</td><td>64</td><td>redis (0.99) — насыщена</td><td>75%</td><td>0.002 / 0.00</td></tr><tr><td>redis1</td><td>537.9</td><td>1.09×</td><td>64</td><td>64</td><td>redis (0.55)</td><td>83%</td><td>0.000 / 0.00</td></tr></tbody></table></div><details><summary>Все точки серии</summary><div class="wrap"><table><thead><tr><th>config</th><th>c</th><th>repeats</th><th>ok_rps</th><th>rps_min</th><th>rps_max</th><th>write_rps</th><th>read_rps</th><th>p50_ms</th><th>p95_ms</th><th>p99_ms</th><th>err</th><th>util_api</th><th>util_pg</th><th>util_redis</th><th>util_lb</th><th>host_cores</th><th>pool_empty</th><th>pool_wait_ms</th><th>pg_active</th></tr></thead><tbody><tr><td>pg1_lb0.5_redis0.5</td><td>16</td><td>3</td><td>455.1</td><td>446.8</td><td>470.5</td><td>228.5</td><td>226.6</td><td>32.17</td><td>80.56</td><td>106.30</td><td>0.0000</td><td>0.36</td><td>0.23</td><td>0.99</td><td>0.11</td><td>1.51/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>pg1_lb0.5_redis0.5</td><td>64</td><td>3</td><td>493.5</td><td>490.0</td><td>503.8</td><td>247.1</td><td>249.3</td><td>61.64</td><td>286.88</td><td>318.98</td><td>0.0000</td><td>0.35</td><td>0.24</td><td>1.00</td><td>0.12</td><td>1.51/2</td><td>0.000</td><td>0.07</td><td>1</td></tr><tr><td>pg2</td><td>16</td><td>3</td><td>462.7</td><td>453.3</td><td>471.7</td><td>236.4</td><td>225.8</td><td>29.69</td><td>78.70</td><td>97.97</td><td>0.0000</td><td>0.35</td><td>0.11</td><td>1.00</td><td>0.10</td><td>1.46/2</td><td>0.000</td><td>0.00</td><td>2</td></tr><tr><td>pg2</td><td>64</td><td>3</td><td>500.5</td><td>489.1</td><td>515.0</td><td>251.0</td><td>249.5</td><td>170.53</td><td>276.21</td><td>306.59</td><td>0.0000</td><td>0.35</td><td>0.12</td><td>0.99</td><td>0.11</td><td>1.49/2</td><td>0.001</td><td>0.04</td><td>1</td></tr><tr><td>lb1</td><td>16</td><td>3</td><td>452.9</td><td>450.9</td><td>467.4</td><td>225.9</td><td>228.3</td><td>22.14</td><td>83.95</td><td>103.89</td><td>0.0000</td><td>0.36</td><td>0.23</td><td>1.00</td><td>0.06</td><td>1.52/2</td><td>0.000</td><td>0.01</td><td>2</td></tr><tr><td>lb1</td><td>64</td><td>3</td><td>486.4</td><td>483.1</td><td>489.7</td><td>241.6</td><td>244.8</td><td>47.63</td><td>293.16</td><td>333.18</td><td>0.0000</td><td>0.35</td><td>0.24</td><td>0.99</td><td>0.06</td><td>1.50/2</td><td>0.002</td><td>0.00</td><td>1</td></tr><tr><td>redis1</td><td>16</td><td>3</td><td>492.1</td><td>487.1</td><td>505.8</td><td>249.3</td><td>242.9</td><td>28.82</td><td>76.35</td><td>99.39</td><td>0.0000</td><td>0.40</td><td>0.25</td><td>0.54</td><td>0.12</td><td>1.65/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>redis1</td><td>64</td><td>3</td><td>537.9</td><td>522.0</td><td>543.3</td><td>268.1</td><td>269.9</td><td>131.86</td><td>272.16</td><td>304.75</td><td>0.0000</td><td>0.39</td><td>0.27</td><td>0.55</td><td>0.12</td><td>1.66/2</td><td>0.000</td><td>0.00</td><td>2</td></tr></tbody></table></div></details><h2>E_scale_out_after_fix — Рост реплик после улучшения (CACHE_INVALIDATION=version), реплики по 0.5 CPU</h2><p><b>Гипотеза:</b> После снятия упора в Redis рост реплик снова увеличивает RPS, пока не насытится следующая общая зависимость (ожидаем PostgreSQL) или CPU хоста.</p><div class="charts"><figure><figcaption>Успешные RPS</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.50</span></div><svg viewBox="0 0 640 300" role="img" aria-label="Успешные RPS"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="188.2" y2="188.2"/><text class="tick" x="50" y="188.2" text-anchor="end" dy="4">200</text><line class="grid" x1="56" x2="520" y1="116.4" y2="116.4"/><text class="tick" x="50" y="116.4" text-anchor="end" dy="4">400</text><line class="grid" x1="56" x2="520" y1="44.5" y2="44.5"/><text class="tick" x="50" y="44.5" text-anchor="end" dy="4">600</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">ok RPS</text><path d="M56.0 89.3 L288.0 76.1 L520.0 58.9" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="89.3" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=4 · 475.3"/><circle class="hit" cx="56.0" cy="89.3" r="12" data-tip="1x0.50 · c=4 · 475.3"/><circle class="pt" cx="288.0" cy="76.1" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=16 · 512.0"/><circle class="hit" cx="288.0" cy="76.1" r="12" data-tip="1x0.50 · c=16 · 512.0"/><circle class="pt" cx="520.0" cy="58.9" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=64 · 560.0"/><circle class="hit" cx="520.0" cy="58.9" r="12" data-tip="1x0.50 · c=64 · 560.0"/><text class="dlabel" x="528.0" y="54.4" dy="4">1x0.50</text><path d="M56.0 41.1 L288.0 38.2 L520.0 43.1" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="41.1" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 609.7"/><circle class="hit" cx="56.0" cy="41.1" r="12" data-tip="2x0.50 · c=4 · 609.7"/><circle class="pt" cx="288.0" cy="38.2" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 617.7"/><circle class="hit" cx="288.0" cy="38.2" r="12" data-tip="2x0.50 · c=16 · 617.7"/><circle class="pt" cx="520.0" cy="43.1" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 603.9"/><circle class="hit" cx="520.0" cy="43.1" r="12" data-tip="2x0.50 · c=64 · 603.9"/><text class="dlabel" x="528.0" y="41.6" dy="4">2x0.50</text><path d="M56.0 44.8 L288.0 47.7 L520.0 46.2" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="44.8" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=4 · 599.3"/><circle class="hit" cx="56.0" cy="44.8" r="12" data-tip="4x0.50 · c=4 · 599.3"/><circle class="pt" cx="288.0" cy="47.7" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=16 · 591.3"/><circle class="hit" cx="288.0" cy="47.7" r="12" data-tip="4x0.50 · c=16 · 591.3"/><circle class="pt" cx="520.0" cy="46.2" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=64 · 595.5"/><circle class="hit" cx="520.0" cy="46.2" r="12" data-tip="4x0.50 · c=64 · 595.5"/><text class="dlabel" x="528.0" y="47.7" dy="4">4x0.50</text></svg></figure><figure><figcaption>p95 задержки, мс</figcaption><div class="legend"><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-1)" stroke-width="2" stroke-dasharray=""/></svg>1x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3"/></svg>2x0.50</span><span class="key"><svg width="22" height="10"><line x1="1" x2="21" y1="5" y2="5" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3"/></svg>4x0.50</span></div><svg viewBox="0 0 640 300" role="img" aria-label="p95 задержки, мс"><line class="grid" x1="56" x2="520" y1="260.0" y2="260.0"/><text class="tick" x="50" y="260.0" text-anchor="end" dy="4">0</text><line class="grid" x1="56" x2="520" y1="169.1" y2="169.1"/><text class="tick" x="50" y="169.1" text-anchor="end" dy="4">100</text><line class="grid" x1="56" x2="520" y1="78.2" y2="78.2"/><text class="tick" x="50" y="78.2" text-anchor="end" dy="4">200</text><line class="axis" x1="56" x2="520" y1="260" y2="260"/><text class="tick" x="56.0" y="276" text-anchor="middle">4</text><text class="tick" x="288.0" y="276" text-anchor="middle">16</text><text class="tick" x="520.0" y="276" text-anchor="middle">64</text><text class="tick" x="288" y="296" text-anchor="middle">параллелизм (closed-loop воркеры)</text><text class="tick" x="56" y="12">мс</text><path d="M56.0 231.0 L288.0 200.0 L520.0 100.1" fill="none" stroke="var(--series-1)" stroke-width="2" stroke-dasharray="" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="231.0" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=4 · 31.9"/><circle class="hit" cx="56.0" cy="231.0" r="12" data-tip="1x0.50 · c=4 · 31.9"/><circle class="pt" cx="288.0" cy="200.0" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=16 · 66.0"/><circle class="hit" cx="288.0" cy="200.0" r="12" data-tip="1x0.50 · c=16 · 66.0"/><circle class="pt" cx="520.0" cy="100.1" r="4" fill="var(--series-1)" data-tip="1x0.50 · c=64 · 176.0"/><circle class="hit" cx="520.0" cy="100.1" r="12" data-tip="1x0.50 · c=64 · 176.0"/><text class="dlabel" x="528.0" y="95.6" dy="4">1x0.50</text><path d="M56.0 249.1 L288.0 212.4 L520.0 72.3" fill="none" stroke="var(--series-2)" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="249.1" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=4 · 12.0"/><circle class="hit" cx="56.0" cy="249.1" r="12" data-tip="2x0.50 · c=4 · 12.0"/><circle class="pt" cx="288.0" cy="212.4" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=16 · 52.4"/><circle class="hit" cx="288.0" cy="212.4" r="12" data-tip="2x0.50 · c=16 · 52.4"/><circle class="pt" cx="520.0" cy="72.3" r="4" fill="var(--series-2)" data-tip="2x0.50 · c=64 · 206.5"/><circle class="hit" cx="520.0" cy="72.3" r="12" data-tip="2x0.50 · c=64 · 206.5"/><text class="dlabel" x="528.0" y="70.8" dy="4">2x0.50</text><path d="M56.0 248.2 L288.0 209.1 L520.0 38.2" fill="none" stroke="var(--series-3)" stroke-width="2" stroke-dasharray="2 3" stroke-linejoin="round" stroke-linecap="round"/><circle class="pt" cx="56.0" cy="248.2" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=4 · 13.0"/><circle class="hit" cx="56.0" cy="248.2" r="12" data-tip="4x0.50 · c=4 · 13.0"/><circle class="pt" cx="288.0" cy="209.1" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=16 · 56.0"/><circle class="hit" cx="288.0" cy="209.1" r="12" data-tip="4x0.50 · c=16 · 56.0"/><circle class="pt" cx="520.0" cy="38.2" r="4" fill="var(--series-3)" data-tip="4x0.50 · c=64 · 244.1"/><circle class="hit" cx="520.0" cy="38.2" r="12" data-tip="4x0.50 · c=64 · 244.1"/><text class="dlabel" x="528.0" y="39.7" dy="4">4x0.50</text></svg></figure></div><div class="wrap"><table><thead><tr><th>config</th><th>пик RPS</th><th>к первой</th><th>c пика</th><th>c насыщения</th><th>узкое место</th><th>CPU хоста</th><th>pool empty / wait ms</th></tr></thead><tbody><tr><td>1x0.50</td><td>560.0</td><td>1.00×</td><td>64</td><td>16</td><td>api (1.00) — насыщена</td><td>53%</td><td>0.000 / 0.00</td></tr><tr><td>2x0.50</td><td>617.7</td><td>1.10×</td><td>16</td><td>16</td><td>api (0.78)</td><td>79%</td><td>0.000 / 0.00</td></tr><tr><td>4x0.50</td><td>599.3</td><td>1.07×</td><td>4</td><td>16</td><td>postgres (0.46)</td><td>78%</td><td>0.000 / 0.00</td></tr></tbody></table></div><details><summary>Все точки серии</summary><div class="wrap"><table><thead><tr><th>config</th><th>c</th><th>repeats</th><th>ok_rps</th><th>rps_min</th><th>rps_max</th><th>write_rps</th><th>read_rps</th><th>p50_ms</th><th>p95_ms</th><th>p99_ms</th><th>err</th><th>util_api</th><th>util_pg</th><th>util_redis</th><th>util_lb</th><th>host_cores</th><th>pool_empty</th><th>pool_wait_ms</th><th>pg_active</th></tr></thead><tbody><tr><td>1x0.50</td><td>4</td><td>3</td><td>475.3</td><td>465.2</td><td>482.1</td><td>240.3</td><td>234.9</td><td>5.72</td><td>31.90</td><td>39.57</td><td>0.0000</td><td>1.00</td><td>0.37</td><td>0.23</td><td>0.17</td><td>1.06/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>1x0.50</td><td>16</td><td>3</td><td>512.0</td><td>510.8</td><td>524.3</td><td>252.7</td><td>259.3</td><td>24.45</td><td>66.03</td><td>81.17</td><td>0.0000</td><td>1.00</td><td>0.36</td><td>0.22</td><td>0.17</td><td>1.06/2</td><td>0.000</td><td>0.00</td><td>1</td></tr><tr><td>1x0.50</td><td>64</td><td>3</td><td>560.0</td><td>555.3</td><td>563.4</td><td>280.1</td><td>279.7</td><td>109.09</td><td>175.97</td><td>204.49</td><td>0.0000</td><td>1.00</td><td>0.40</td><td>0.23</td><td>0.19</td><td>1.09/2</td><td>0.893</td><td>13.65</td><td>2</td></tr><tr><td>2x0.50</td><td>4</td><td>3</td><td>609.7</td><td>582.4</td><td>611.3</td><td>302.3</td><td>305.7</td><td>5.71</td><td>12.00</td><td>20.64</td><td>0.0000</td><td>0.79</td><td>0.45</td><td>0.33</td><td>0.21</td><td>1.50/2</td><td>0.000</td><td>0.00</td><td>3</td></tr><tr><td>2x0.50</td><td>16</td><td>3</td><td>617.7</td><td>603.4</td><td>625.4</td><td>310.1</td><td>303.3</td><td>23.05</td><td>52.36</td><td>73.64</td><td>0.0000</td><td>0.78</td><td>0.50</td><td>0.35</td><td>0.20</td><td>1.58/2</td><td>0.000</td><td>0.00</td><td>9</td></tr><tr><td>2x0.50</td><td>64</td><td>3</td><td>603.9</td><td>598.0</td><td>606.0</td><td>303.1</td><td>298.9</td><td>99.56</td><td>206.53</td><td>260.69</td><td>0.0000</td><td>0.78</td><td>0.55</td><td>0.24</td><td>0.20</td><td>1.55/2</td><td>0.799</td><td>10.55</td><td>29</td></tr><tr><td>4x0.50</td><td>4</td><td>3</td><td>599.3</td><td>584.2</td><td>599.7</td><td>300.3</td><td>298.9</td><td>5.80</td><td>13.02</td><td>20.18</td><td>0.0000</td><td>0.43</td><td>0.44</td><td>0.29</td><td>0.20</td><td>1.54/2</td><td>0.000</td><td>0.00</td><td>3</td></tr><tr><td>4x0.50</td><td>16</td><td>3</td><td>591.3</td><td>586.7</td><td>605.5</td><td>291.8</td><td>299.5</td><td>23.53</td><td>56.00</td><td>76.31</td><td>0.0000</td><td>0.41</td><td>0.46</td><td>0.29</td><td>0.19</td><td>1.56/2</td><td>0.000</td><td>0.00</td><td>9</td></tr><tr><td>4x0.50</td><td>64</td><td>3</td><td>595.5</td><td>588.2</td><td>597.7</td><td>297.5</td><td>298.0</td><td>87.94</td><td>244.09</td><td>351.81</td><td>0.0000</td><td>0.42</td><td>0.51</td><td>0.27</td><td>0.19</td><td>1.56/2</td><td>0.022</td><td>0.08</td><td>45</td></tr></tbody></table></div></details><div id="tip"></div></div><script>
|
||
const tip=document.getElementById('tip');
|
||
document.querySelectorAll('[data-tip]').forEach(el=>{
|
||
el.addEventListener('mousemove',e=>{tip.textContent=el.dataset.tip;tip.style.display='block';
|
||
tip.style.left=Math.min(e.clientX+12,innerWidth-220)+'px';tip.style.top=(e.clientY+12)+'px'});
|
||
el.addEventListener('mouseleave',()=>tip.style.display='none')});
|
||
</script></body></html> |