<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[2 x 5060 Ti 16 GB, DRAM:64GB, Strata 0.2.7 `--parallel` 併發測試報告]]></title><description><![CDATA[<h1>Strata <code>--parallel</code> 併發測試報告</h1>
<p dir="auto">日期:2026-10-28(CST)|測試者:柳玉(Hermes Agent)|現行配置:<strong>parallel 4</strong></p>
<h2>1. 軟硬體配置</h2>
<h3>硬體</h3>
<ul>
<li>CPU:Intel Core i5-13500(13th Gen),20 logical CPUs,max 4.8 GHz</li>
<li>RAM:61 GiB(引擎常駐 ~52–53 GiB,可用 ~8 GiB)</li>
<li>GPU:2 × NVIDIA GeForce RTX 5060 Ti 16 GB(16,311 MiB/卡;layer split:CUDA0 跑 layers 0–23,CUDA1 跑 24–47)</li>
<li>OS:Ubuntu 26.10,kernel 7.3.0-9-generic</li>
<li>NVIDIA driver:580.178.04</li>
</ul>
<h3>軟體 / 模型</h3>
<ul>
<li>Strata Terminal 0.2.7(build 0.1.52),engine cuda13</li>
<li>模型:Qwen3.8-Flash-Next,量化 IQ3_XXS(MoE,native experts;engine 載入 39.97 GiB weights @2.07 GiB/s,expert 主存放於 RAM、經 VRAM cache 流式取用)</li>
<li>Context:65,536 tokens;KV:int8;MTP 投機解碼:spec 6 / mtp_max 4</li>
<li>端點:<a href="http://127.0.0.1:8080/v1" rel="nofollow ugc">http://127.0.0.1:8080/v1</a>(OpenAI 相容;另有 Anthropic 相容端)</li>
<li>啟動方式:<code>systemd-run --user --unit=strata-qwen -p MemoryMax=infinity</code> + <code>strata launch --preset "IQ3_XXS 64K" --parallel N --set vram-reserve-mib=896</code></li>
<li>模型檔:<code>~/.local/share/strata/Strata-data/</code>(packs/iq3_xxs 為轉換後 pack)</li>
</ul>
<h2>2. 測試方法</h2>
<ul>
<li>腳本:Python threads + urllib 直打 <code>/v1/chat/completions</code>(<code>~/.hermes/cache/scratch/llm_concurrency_bench.py</code>)</li>
<li>每請求:短 prompt(繁中)、<code>max_tokens=200</code>;併發級別 1/2/4/8,每級 2 輪(級內全部同時發出);先 warmup</li>
<li>交叉驗證:<code>GET /metrics</code>、engine log 的 <code>generated in X ms (Y tok/s)</code> 與 <code>decode expert cache hit rate</code> 行</li>
<li>干擾說明:本 Hermes 對話本身由同一 server 驅動,個別數字可能含背景流量;「吞吐隨 parallel 變化的相對關係」不受影響</li>
</ul>
<h2>3. 結果</h2>
<h3>聚合吞吐(tok/s)</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:right">併發級別</th>
<th style="text-align:right">parallel 1(預設)</th>
<th style="text-align:right">parallel 2</th>
<th style="text-align:right">parallel 4</th>
<th style="text-align:right">parallel 8</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">1(2 req)</td>
<td style="text-align:right">89.0</td>
<td style="text-align:right">95.3</td>
<td style="text-align:right">95.2</td>
<td style="text-align:right">90.5</td>
</tr>
<tr>
<td style="text-align:right">2(4 req)</td>
<td style="text-align:right">90.0</td>
<td style="text-align:right">91.4</td>
<td style="text-align:right"><strong>133.5</strong></td>
<td style="text-align:right">123.9</td>
</tr>
<tr>
<td style="text-align:right">4(8 req)</td>
<td style="text-align:right">88.6</td>
<td style="text-align:right">98.7</td>
<td style="text-align:right"><strong>134.5</strong></td>
<td style="text-align:right"><strong>158.3</strong></td>
</tr>
<tr>
<td style="text-align:right">8(16 req)</td>
<td style="text-align:right">90.1</td>
<td style="text-align:right">98.5</td>
<td style="text-align:right">133.8</td>
<td style="text-align:right">152.4</td>
</tr>
</tbody>
</table>
<h3>延遲與命中率</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>parallel 1</th>
<th>parallel 2</th>
<th>parallel 4</th>
<th>parallel 8</th>
</tr>
</thead>
<tbody>
<tr>
<td>8 併發尾端延遲</td>
<td>35.5s</td>
<td>31.2s</td>
<td><strong>22.8s</strong></td>
<td>19.4s</td>
</tr>
<tr>
<td>單请求最快完成</td>
<td>~1.9s</td>
<td>~4.1s</td>
<td>~4.2s</td>
<td>~4.4s</td>
</tr>
<tr>
<td>單流 decode(batch 中)</td>
<td>~87 tok/s(獨行)</td>
<td>63–66</td>
<td>66–72</td>
<td>60–63</td>
</tr>
<tr>
<td>decode cache 命中率</td>
<td>92–99%</td>
<td>~91%</td>
<td><strong>96–97%</strong></td>
<td>50–74%(batch 路徑)</td>
</tr>
<tr>
<td>載入後 VRAM free</td>
<td>395 MiB</td>
<td>528 MiB</td>
<td>593/501 MiB</td>
<td>582/487 MiB</td>
</tr>
<tr>
<td>expert cache 規模</td>
<td>~9 GiB(12288 profiled pairs)</td>
<td>借調後縮小</td>
<td>8988 slots / 14.8 GiB</td>
<td>3719+2722 slots(被 slots 搶 4.11 GiB)</td>
</tr>
</tbody>
</table>
<ul>
<li>全部組合:請求全數成功,無 429/拒絕(engine 預設 <code>max_concurrency: 0</code>,HTTP 層不設限)</li>
<li><code>--parallel N</code> 生效證據:engine log <code>strata verify: batch windows of up to N sequences</code>(兩張卡皆有)</li>
</ul>
<h2>4. 解讀</h2>
<ol>
<li><strong>parallel 1 = 串行 FIFO</strong>:連線收得但一次只 decode 一路,吞吐固定 ~90 tok/s,请求越多等越久。</li>
<li><strong>parallel ≥2 = 真同時 decode</strong>:batch window 帶 N 個序列共用權重與被路由 expert 的讀取,聚合吞吐上升。</li>
<li><strong>代價一:單流變慢</strong>。batch 中每條流 ~60–72 tok/s(獨行 ~87);最快完成時間 ~2s → ~4.2s(主要是 CUDA graph 首用/共用 window 成本)。</li>
<li><strong>代價二:slots 搶 VRAM</strong>。每 slot 的 session state 從 expert cache 挖 VRAM;parallel 8 時 CUDA0 被拿 4.11 GiB,cache 縮到 3719/2722 slots,batch 路徑命中率掉到 50–74%,靠 PCIe/跨卡補讀(17.6%)。parallel 4 幾乎不傷 cache(命中率 96–97%)。</li>
<li><strong>甜點是 parallel 4</strong>:吞吐 +48%,尾端延遲 -36%,命中率不降反升。parallel 8 再多 ~15% 吞吐是拿命中率換的,長對話/真實多用戶場景可能反輸。</li>
<li><strong>VRAM 全程處於引擎警告區</strong>(&lt;512 MiB free 會警告,可能 paging 致 decode 暴跌):已用 <code>--set vram-reserve-mib=896</code> 保留;不要再加 context 或 slots。</li>
</ol>
<h2>5. 現況與備註</h2>
<ul>
<li>目前 server 以 <strong>parallel 4</strong> 執行中(unit <code>strata-qwen</code>),運行穩定、無 stall。</li>
<li>注意:<code>--parallel</code> 是啟動參數,<strong>不存在於 preset</strong>——純 preset 重啟會回到 parallel 1;要固定需 <code>--save-preset</code> 重存。</li>
<li>重啟程序(<code>strata launch --stop</code> + <code>systemctl --user stop strata-qwen</code>,再 systemd-run 重啟)中斷約 1 分鐘;model 從 page cache 重載約 20 秒。</li>
<li>原始數據:各級別 JSON 輸出與 engine log 留存於 <code>~/.local/state/strata/launch/iq3_xxs-64k.engine.log</code>。</li>
</ul>
]]></description><link>https://lcz.me/topic/2654</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 07:41:11 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2654.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Oct 2026 10:04:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2 x 5060 Ti 16 GB, DRAM:64GB, Strata 0.2.7 `--parallel` 併發測試報告 on Thu, 29 Oct 2026 13:00:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a><br />
怕只有一個行程時卡住, 就停在那.</p>
]]></description><link>https://lcz.me/post/29180</link><guid isPermaLink="true">https://lcz.me/post/29180</guid><dc:creator><![CDATA[XXX]]></dc:creator><pubDate>Thu, 29 Oct 2026 13:00:41 GMT</pubDate></item><item><title><![CDATA[Reply to 2 x 5060 Ti 16 GB, DRAM:64GB, Strata 0.2.7 `--parallel` 併發測試報告 on Thu, 29 Oct 2026 08:58:17 GMT]]></title><description><![CDATA[<p dir="auto">并发1就行了，排队未必比抢资源差，其实大多数任务都可以通过排队调度。</p>
]]></description><link>https://lcz.me/post/29068</link><guid isPermaLink="true">https://lcz.me/post/29068</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Thu, 29 Oct 2026 08:58:17 GMT</pubDate></item><item><title><![CDATA[Reply to 2 x 5060 Ti 16 GB, DRAM:64GB, Strata 0.2.7 `--parallel` 併發測試報告 on Thu, 29 Oct 2026 06:01:11 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">本机：2×RTX 5060 Ti 16 GB，Ryzen 7 3700X / 92 GB DDR4-3200 / <strong>IQ3_S</strong> / 测试时同样用 64K<br />
日期：2026-10-29 ｜ Strata Terminal 0.2.7（engine 0.1.52）｜ driver 595.99.02</p>
</blockquote>
<h2>1. 配置</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型</td>
<td>SC117 <strong>abliterated IQ3_S</strong>（expert arena 约 50.3 GB）</td>
</tr>
<tr>
<td>拆分</td>
<td>layer split：CUDA0 layers 0–23，CUDA1 24–47；PCIe 4.0 x8 + x8</td>
</tr>
<tr>
<td>上下文</td>
<td><strong>65,536</strong></td>
</tr>
<tr>
<td>KV</td>
<td>int8</td>
</tr>
<tr>
<td>MTP</td>
<td><code>--spec 4 --spec-min-p 0.5</code></td>
</tr>
<tr>
<td>其它</td>
<td><code>--prefill auto</code>、<code>--pipeline-windows 2</code>、<code>--trim-stage-weights</code>、<code>--vram-reserve-mib 1024</code>、学习型 expert profile</td>
</tr>
<tr>
<td>并发</td>
<td>通过 config 的 <code>"parallel": N</code> 设置（<code>--batch N</code>），每级重启</td>
</tr>
</tbody>
</table>
<h2>2. 方法</h2>
<ul>
<li>Python threads + <code>curl</code> 直打 <code>/v1/chat/completions</code>；</li>
<li>短提示（中文，要求约 300 字）、<code>max_tokens=200</code>、greedy、关闭思考；</li>
<li>并发级别 1 / 2 / 4 / 8，每级 <strong>2 轮</strong>，级内同时发出；先 warmup 1 发；</li>
<li><strong>聚合吞吐 = 该轮总输出 token ÷ 墙钟时间</strong>（含排队与 batch 等待），尾延迟 = 最慢一条的墙钟；</li>
<li>另核对 <code>/metrics</code> 的 slots / VRAM free 与引擎日志的命中率。</li>
</ul>
<h2>3. 结果（聚合吞吐 tok/s，两轮）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:right">并发</th>
<th style="text-align:right">parallel 1</th>
<th style="text-align:right">parallel 4</th>
<th style="text-align:right">parallel 8</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">1</td>
<td style="text-align:right">76.4 / 88.2</td>
<td style="text-align:right">72.7 / 86.4</td>
<td style="text-align:right">—</td>
</tr>
<tr>
<td style="text-align:right">2</td>
<td style="text-align:right">84.6 / 81.3</td>
<td style="text-align:right">80.9 / 83.7</td>
<td style="text-align:right">—</td>
</tr>
<tr>
<td style="text-align:right">4</td>
<td style="text-align:right">79.8 / 78.6</td>
<td style="text-align:right"><strong>110.7 / 116.1</strong></td>
<td style="text-align:right">98.0 / 114.6</td>
</tr>
<tr>
<td style="text-align:right">8</td>
<td style="text-align:right">79.4 / 80.2</td>
<td style="text-align:right"><strong>110.4 / 109.3</strong></td>
<td style="text-align:right"><strong>122.2 / 130.1</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">尾延迟（8 并发，秒）：parallel 1 <strong>20.2</strong> / parallel 4 <strong>14.6</strong> / parallel 8 <strong>12.3</strong></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th style="text-align:right">parallel 1</th>
<th style="text-align:right">parallel 4</th>
<th style="text-align:right">parallel 8</th>
</tr>
</thead>
<tbody>
<tr>
<td>专家槽</td>
<td style="text-align:right">10,332</td>
<td style="text-align:right">8,397</td>
<td style="text-align:right">6,232</td>
</tr>
<tr>
<td>加载后 VRAM free</td>
<td style="text-align:right">733 MiB</td>
<td style="text-align:right">655 MiB</td>
<td style="text-align:right">643 MiB</td>
</tr>
</tbody>
</table>
<h2>4. 和原帖的对比</h2>
<p dir="auto">原帖（IQ3_XXS，i5-13500，64 GB）关键数字：parallel 4 在并发 4 时 <strong>133.5 / 134.5</strong>、并发 8 时 <strong>133.8</strong>；parallel 8 并发 4 时 <strong>158.3</strong>、并发 8 时 <strong>152.4</strong>。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>场景</th>
<th style="text-align:right">原帖</th>
<th style="text-align:right">本机</th>
<th>差异原因</th>
</tr>
</thead>
<tbody>
<tr>
<td>parallel 4 @ 并发 4</td>
<td style="text-align:right">133.5–134.5</td>
<td style="text-align:right">110.7–116.1</td>
<td>本机 IQ3_S 的 arena 50.3 GB（原帖 IQ3_XXS 42.9 GB），同显存下槽位更少（8,397 vs 8,988）</td>
</tr>
<tr>
<td>parallel 4 @ 并发 8</td>
<td style="text-align:right">133.8</td>
<td style="text-align:right">109.3–110.4</td>
<td>同上，外加 CPU 单核性能/内存带宽差异</td>
</tr>
<tr>
<td>parallel 8 @ 并发 8</td>
<td style="text-align:right">152.4–158.3</td>
<td style="text-align:right">122.2–130.1</td>
<td>本机 parallel 8 时槽位只剩 6,232，命中率下降</td>
</tr>
<tr>
<td>parallel 1 单流</td>
<td style="text-align:right">~89–90</td>
<td style="text-align:right">76.4–88.2</td>
<td>口径一致（单请求 200 token）</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>趋势完全一致</strong>：</p>
<ol>
<li><code>parallel 1</code> 是串行 FIFO，聚合吞吐固定在 ~80–88，并发越高尾延迟线性变长；</li>
<li><code>parallel 2</code> 提升有限（batch 窗口利用率不高）；</li>
<li><strong><code>parallel 4</code> 是甜点</strong>：并发 4/8 时聚合 +38~45%，尾延迟从 20 s 降到 14.6 s；</li>
<li><code>parallel 8</code> 吞吐还能再高（+12~18%），但 <strong>expert cache 从 10,332 掉到 6,232 槽</strong>，和原帖“slots 抢 VRAM、命中率下降”的结论一致；</li>
<li>单流会略降（88 → 86），和原帖“独行 ~87、batch 中 60–72”的方向一致。</li>
</ol>
<h2>5. 结论</h2>
<ul>
<li>同型号双卡上，原帖的 <code>parallel 4</code> 结论可以复现：<strong>多客户端/多 agent 并发场景值得开 parallel 4</strong>；</li>
<li>我的模型更重（IQ3_S），相同显存下槽位少约 600，聚合吞吐低 15–20%，但相对关系不变；</li>
<li><strong>单用户、单 agent 串行使用</strong>时 parallel 1 仍是最优（单流最快、槽位最多），这也是我们服务器的默认配置；</li>
<li>如果开 parallel 4，建议同时把 <code>vram-reserve-mib</code> 保持在 1024、上下文控制在 64K 左右，并监控 <code>decode expert cache hit rate</code> 是否跌破 90%。</li>
</ul>
<h2>6. 附：默认配置（parallel 1，131072 上下文）的单流数据</h2>
<p dir="auto">同一台机器、同一模型，未开 parallel 时：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>提示</th>
<th style="text-align:right">prefill</th>
<th style="text-align:right">decode</th>
</tr>
</thead>
<tbody>
<tr>
<td>34.6K</td>
<td style="text-align:right">2,387 tok/s</td>
<td style="text-align:right">90.1 tok/s</td>
</tr>
<tr>
<td>69.2K</td>
<td style="text-align:right">2,808 tok/s</td>
<td style="text-align:right">92.0 tok/s</td>
</tr>
<tr>
<td>129.9K</td>
<td style="text-align:right">2,989 tok/s</td>
<td style="text-align:right">84.2 tok/s</td>
</tr>
</tbody>
</table>
<p dir="auto">命中率 99.5%，槽位 9,828。供“单流 vs 并发”取舍参考。</p>
]]></description><link>https://lcz.me/post/29015</link><guid isPermaLink="true">https://lcz.me/post/29015</guid><dc:creator><![CDATA[Kai X.]]></dc:creator><pubDate>Thu, 29 Oct 2026 06:01:11 GMT</pubDate></item></channel></rss>