<?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[雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3）]]></title><description><![CDATA[<h1>雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3）</h1>
<p dir="auto">各位好，分享下我部機嘅 SGLang + HiCache 完整實測。雙 4080 SUPER 32G（64G 總顯存）跑 Qwen3.8-27B-FP8，開 256K context。呢個部署最特别嘅地方：<strong>成個調校過程（kernel tuning、P2P 排查、參數定案）全部係我用 GLM Zcode + GLM 5.3 嘅 agent 搞掂，我基本只負責出指令同審 log</strong>——正正係 terry 話過嗰句「讓你的 Agent 去操作」嘅實例。</p>
<p dir="auto">先講結論（TL;DR）</p>
<ul>
<li>2× RTX 4080 SUPER 32G，TP2，各食 ~30G VRAM</li>
<li>SGLang v0.5.18 + HiCache（hicache-ratio 2，RAM 層 748K tokens，總 cache ~1.12M tokens）</li>
<li>256K context、FP8 KV、NEXTN/MTP 投機解碼（accept rate ~0.61，單流 peak 過 200 t/s）</li>
<li>Decode：1 用戶 65.6 t/s → 4 用戶 aggregate 179 t/s（temp 0 實文測試）</li>
<li>Prefill 天花板 ~1,950 t/s（<strong>NVIDIA 驅動封咗 Ada GeForce 嘅 P2P，NCCL 要行 host RAM</strong>，呢個係硬頂）</li>
<li>HiCache 實測：50K prompt 27.8s → 2.4s（<strong>11.6x</strong>）；32K 16.4s → 0.5s（<strong>32x</strong>）</li>
<li>生產 log 17 分鐘窗口：HiCache 命中 62/146 個 prefill batch，单次最大命中 <strong>86,528 tokens</strong></li>
<li>全部調校由 GLM Zcode + GLM 5.3 agent 執行：W8A8 FP8 GEMM 手動 tune 5 個 shape、P2P/ACS/IOMMU 排查、參數 A/B——agent 做嘢，人審 log</li>
</ul>
<h2>一、硬件配置</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>配置</th>
</tr>
</thead>
<tbody>
<tr>
<td>主板</td>
<td>華南金牌 H12D-8D V2.0（X99 雙路平台，單路用，2× PCIe 4.0 x16 實測跑滿 16GT/s）</td>
</tr>
<tr>
<td>CPU</td>
<td>AMD EPYC 7K62 48C/96T @ 3.3GHz（單路）</td>
</tr>
<tr>
<td>內存</td>
<td>125GB DDR4-2400（4× 32GB SK Hynix ECC），HiCache host 層食咗 ~36GB</td>
</tr>
<tr>
<td>顯卡</td>
<td>2× NVIDIA RTX 4080 SUPER 32GB（PCIe Gen4 x16，<strong>無 NVLink、無 P2P</strong>，TP 走 PCIe + NCCL）</td>
</tr>
<tr>
<td>存儲</td>
<td>KIOXIA EXCERIA Basic 1.8TB NVMe</td>
</tr>
<tr>
<td>系統</td>
<td>Ubuntu 24.04，NVIDIA driver 595.84 / CUDA 13.2，Docker 部署</td>
</tr>
<tr>
<td>網絡</td>
<td>LAN 192.168.0.122 + Tailscale（100.82.33.33，OpenAI-compatible API 尾網直達）</td>
</tr>
</tbody>
</table>
<p dir="auto">GPU 空載 ~185W（cap 320W），52-57C。</p>
<h2>二、成個部署點樣搞：GLM Zcode + GLM 5.3 agent</h2>
<p dir="auto">呢部機嘅 SGLang 部署、調校、排查，流程全部係 agent 做：</p>
<ol>
<li>起手俾指令：「幫我部雙 4080S 部署 Qwen3.8-27B-FP8，SGLang，要 256K context，要 HiCache」</li>
<li>agent 自己拉 image、寫啟動腳本、對齊 param（<code>--hicache-ratio 2</code>、<code>--page-size 64</code>、<code>--max-mamba-cache-size 32</code> 全部係佢測出嚟嘅）</li>
<li>之後嘅優化全部係 agent 主導：
<ul>
<li><strong>W8A8 block-FP8 Triton GEMM 手動 tune</strong>：寫咗 5 個 weight shape（qkv_proj / o_proj / gate_up / down_proj + 2 個小 shape）嘅 benchmark script，每個 shape 掃幾百組 block config，寫返成 tuned config JSON 掛進 image。結果 GEMM 快 1-5%，decode 整體 <strong>+3%</strong>——GEMM 只係 prefill 時間嘅 ~25%，所以唔係大頭</li>
<li><strong>P2P 排查</strong>：agent 自己試晒 ACS（setpci 清 root port offset 0x2a6）、iommu=pt、amd_iommu=off，最後 <code>cudaDeviceCanAccessPeer</code> 仍然 False → 結論係 <strong>NVIDIA 驅動層面封晒所有 Ada GeForce 卡（4080/4080S/4090）嘅 P2P</strong>，係 SKU policy 唔係硬件問題，主板/ACS/IOMMU 全部排除</li>
<li><strong>DSpark 投機解碼實驗</strong>：deadlock 同 HiCache、block-7 喺 32G OOM、block-3 比 NEXTN 慢 → 放棄，用 checkpoint 自帶嘅 NEXTN head</li>
<li><strong>踩坑清單</strong>（agent 試出嚟先寫返入 README 嘅）：<code>--hicache-io-backend kernel</code> 同 hybrid Mamba 模型會 crash（sglang #24121），要行 <code>direct</code>；chunked-prefill 加大無用；MSCCL++ allreduce TP2 唔支援</li>
</ul>
</li>
</ol>
<p dir="auto">人嘅角色：審 log、拍板、出下一個指令。呢個同 forum 前人嘅做法一致——terry 講過「把地址粘贴给你的AI Agent...千万不要自己动手去配置」，我部機正正係咁。</p>
<h2>三、軟件棧</h2>
<ul>
<li>Docker: <code>lmsysorg/sglang:v0.5.18</code></li>
<li>模型: <code>Qwen3.8-27B-FP8</code>（29GB，含 vision tower）</li>
<li>啟動參數：</li>
</ul>
<pre><code>python3 -m sglang.launch_server \
  --model-path /models/Qwen3.8-27B-FP8 \
  --host 0.0.0.0 --port 30000 \
  --tp 2 \
  --kv-cache-dtype fp8_e4m3 \
  --context-length 262144 \
  --mem-fraction-static 0.88 \
  --max-running-requests 8 \
  --cuda-graph-max-bs 8 \
  --chunked-prefill-size 4096 \
  --page-size 64 \
  --max-mamba-cache-size 32 \
  --enable-hierarchical-cache \
  --hicache-ratio 2 \
  --hicache-io-backend direct \
  --hicache-write-policy write_through \
  --speculative-algorithm NEXTN \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_coder \
  --enable-metrics \
  --default-chat-template-kwargs {"reasoning_effort": "medium"}
</code></pre>
<p dir="auto">容量拆解：GPU KV pool ~374K tokens + HiCache RAM 層 748K tokens = <strong>總 cache ~1.12M tokens</strong>（約 4 條 262K 並行）。MTP 投機要食一部份容量（開 MTP 前係 ~2.0M），接受呢個 trade-off。</p>
<h2>四、實測數據（2026-09-09 HKT，全部本機實跑）</h2>
<h3>Decode（實文測試，temp 0）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>並發</th>
<th>每用戶</th>
<th>總吞吐</th>
</tr>
</thead>
<tbody>
<tr>
<td>1 用戶</td>
<td>65.6 t/s</td>
<td>65.6 t/s</td>
</tr>
<tr>
<td>2 用戶</td>
<td>51.7 t/s</td>
<td>103 t/s</td>
</tr>
<tr>
<td>4 用戶</td>
<td>44.7 t/s</td>
<td><strong>179 t/s</strong></td>
</tr>
<tr>
<td>8 用戶（agent workload）</td>
<td>~27 t/s</td>
<td>~213 t/s</td>
</tr>
</tbody>
</table>
<p dir="auto">scaling 曲線好順：1→4 用戶 aggregate 2.7x，8 用戶見頂 ~213 t/s（PCIe TP + KV pool 限制）。</p>
<h3>Prefill</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>場景</th>
<th>吞吐</th>
</tr>
</thead>
<tbody>
<tr>
<td>1× 32K</td>
<td>~1,930 t/s</td>
</tr>
<tr>
<td>2× 32K</td>
<td>~1,950 t/s</td>
</tr>
<tr>
<td>4× 32K</td>
<td>~1,970 t/s</td>
</tr>
<tr>
<td>1× 128K</td>
<td>~1,530 t/s</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>~2K t/s 就係呢部機 TP2 嘅硬頂</strong>——因為 NVIDIA 封咗 P2P，NCCL allreduce 全部行 host RAM。要突破就得上 NVLink 卡（A6000/H100 級）或者 community hack 4090 驅動（生產環境唔建議）。</p>
<h3>TTFT（冷，流式首 token）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Prompt</th>
<th>TTFT</th>
</tr>
</thead>
<tbody>
<tr>
<td>128 tok</td>
<td>82ms</td>
</tr>
<tr>
<td>2K</td>
<td>1.65s</td>
</tr>
<tr>
<td>4K</td>
<td>1.78s</td>
</tr>
<tr>
<td>8K</td>
<td>3.63s</td>
</tr>
<tr>
<td>16K</td>
<td>7.44s</td>
</tr>
<tr>
<td>32K</td>
<td>16.35s</td>
</tr>
<tr>
<td>64K</td>
<td>39.0s</td>
</tr>
</tbody>
</table>
<h3>HiCache 效果（呢部機最大嘅賣點）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>場景</th>
<th>冷</th>
<th>命中</th>
<th>加速</th>
</tr>
</thead>
<tbody>
<tr>
<td>50K prompt 重覆</td>
<td>27.8s</td>
<td><strong>2.4s</strong></td>
<td><strong>11.6x</strong></td>
</tr>
<tr>
<td>32K prompt 重覆</td>
<td>16.35s</td>
<td><strong>0.51s</strong></td>
<td><strong>32x</strong></td>
</tr>
<tr>
<td>5.6K prefix 重覆</td>
<td>2.88s</td>
<td>0.32s（cached_tokens=5568）</td>
<td>8.9x</td>
</tr>
</tbody>
</table>
<p dir="auto">生產 log 實證（17 分鐘 agent 真實 workload 窗口，09:32→09:50 HKT）：</p>
<ul>
<li>146 個 prefill batch 入面 <strong>62 個命中 cache</strong>（42%）</li>
<li>单次最大命中 <strong>86,528 tokens</strong>（長 conversation 直接搬返 VRAM）</li>
<li>519 個 batch 只有 14 個 queue&gt;0——8 路並發都基本唔塞</li>
<li>NEXTN accept rate 平均 <strong>0.61</strong>，decode gen throughput 中位 70.9 t/s、p90 103 t/s、<strong>peak 295 t/s</strong></li>
</ul>
<h2>五、同 forum 前人 post 對照</h2>
<ul>
<li><strong>#1559（W7800 48G SGLang 投產實測）</strong>：佢單卡 bf16 KV，cache hit 65-77%、decode 中位 57-60 t/s。我雙卡 FP8 KV 單流 65-70 t/s、並發高一檔（TP2 分攤 VRAM 先頂得住 256K）。佢嗰邊 gfx1100 靠社區 fork，我呢邊 Ada 卡官方 SGLang 直接就行，但 P2P 被封係 Ada 獨有嘅痛</li>
<li><strong>#1542 / #1532（terry / flyer666 7900XTX 雙卡）</strong>：佢哋話雙卡 TP + HiCache 係補齊 7900XTX 最後短板，4 併發 200 t/s。我部機 4 併發 179 t/s（實文 temp 0）、8 併發 213 t/s，數量級對得上。flyer666 講 HiCache 要夠內存，我 125G 配 748K token RAM pool，agent 長 session 唔會觸頂</li>
<li><strong>#1559 嘅 MTP 結論</strong>：佢 gfx1100 上 MTP-3 係最大加分項；我呢度 NEXTN（checkpoint 自帶 head）accept rate 0.61，decode 中位拉上 70 t/s，peak 295——方向一致，投機解碼喺 27B 呢個級別都係值得開</li>
</ul>
<h2>六、幾句心得</h2>
<ol>
<li><strong>4080 SUPER 32G × 2 跑 27B FP8 + 256K ctx + HiCache 係啱啱好嘅甜點</strong>：64G VRAM 再大 10% 都冇咁舒服，29G 模型 + KV pool 374K + MTP 全部塞得入</li>
<li><strong>Ada 卡做 TP2 嘅真瓶頸係 P2P 被封</strong>：GEMM tune 完 +3% 都冇用，allreduce 行 RAM 就係 ~2K t/s 天花板。呢個要買卡之前就知道</li>
<li><strong>HiCache write_through + direct backend</strong> 係 agent 場景正解：prefix 重覆率極高，直接寫穿命中最穩；kernel backend 有 crash bug 唔好碰</li>
<li><strong>agent 代操係真嘅可行</strong>：GLM Zcode + GLM 5.3 做晒 kernel tuning、P2P 排查、參數 A/B，人只需要審 log 拍板。成個調校過程 log 完整可溯源，agent 仲會自己寫 README 記坑——呢個就係本地機 + 本地 agent + 本地模型嘅完整閉環</li>
<li>256K context 代價：GPU 各食 ~92%，冇得再調 mem-fraction；MTP 食走一部份 cache 容量（1.12M vs 2.0M tokens）</li>
</ol>
<p dir="auto">完整 benchmark log、SGLang server log、tuning script、README 全部留底，想對數據嘅朋友留言，我貼 log 片段。</p>
<p dir="auto">用呢部機做本地 coding agent（多 subagent 並行）實戰：4-6 併發流暢、單流打字速度肉眼可接受、長 conversation 第二次開始 TTFT 全部 &lt;1s。洋垃圾 X99 平台 + 兩張 32G 卡 + 本地 agent 全程調校，呢個價位我目前見到性價比最高嘅 256K 長上下文投產方案，歡迎各位大佬補充同指正。</p>
]]></description><link>https://lcz.me/topic/1587</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 21:49:13 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1587.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Sep 2026 13:22:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3） on Wed, 09 Sep 2026 16:16:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/applejuice" aria-label="Profile: applejuice">@<bdi>applejuice</bdi></a> 主要的差距在PCIE，如果都能到PCIE3.0 x 16的带宽就足够用了。当然心的内存会好点，4代的。但主要还是PCIE。</p>
]]></description><link>https://lcz.me/post/16932</link><guid isPermaLink="true">https://lcz.me/post/16932</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 09 Sep 2026 16:16:18 GMT</pubDate></item><item><title><![CDATA[Reply to 雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3） on Wed, 09 Sep 2026 14:52: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>
<p dir="auto">而且我发现内存 越快也越好<br />
我一开始内存 插错槽<br />
decode/prefill 性能比x99 更差<br />
过后插对槽, decode/prefill 性能立刻提升20-30%<br />
所以内存速度应该有分别</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnnybegood" aria-label="Profile: johnnybegood">@<bdi>johnnybegood</bdi></a> 过分了 甚至主板那些也起价</p>
]]></description><link>https://lcz.me/post/16924</link><guid isPermaLink="true">https://lcz.me/post/16924</guid><dc:creator><![CDATA[applejuice]]></dc:creator><pubDate>Wed, 09 Sep 2026 14:52:41 GMT</pubDate></item><item><title><![CDATA[Reply to 雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3） on Wed, 09 Sep 2026 14:34:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/applejuice" aria-label="Profile: applejuice">@<bdi>applejuice</bdi></a> 不止一点点了， 4080s 32g 也 15000+了</p>
]]></description><link>https://lcz.me/post/16919</link><guid isPermaLink="true">https://lcz.me/post/16919</guid><dc:creator><![CDATA[johnnybegood]]></dc:creator><pubDate>Wed, 09 Sep 2026 14:34:55 GMT</pubDate></item><item><title><![CDATA[Reply to 雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3） on Wed, 09 Sep 2026 14:23:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/franklee006" aria-label="Profile: franklee006">@<bdi>franklee006</bdi></a> 非常好的分享，也说明洋垃圾在硬件上是够的。但你用的不是x99平台，是EPYC平台。</p>
]]></description><link>https://lcz.me/post/16916</link><guid isPermaLink="true">https://lcz.me/post/16916</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 09 Sep 2026 14:23:38 GMT</pubDate></item><item><title><![CDATA[Reply to 雙 4080 SUPER 32G + SGLang HiCache 實測：Qwen3.8-27B-FP8，256K context，agent 全程代操（GLM Zcode + GLM 5.3） on Wed, 09 Sep 2026 14:20:32 GMT]]></title><description><![CDATA[<p dir="auto">现阶段 4080 32gb 价钱只高过3090 一点点<br />
感觉比3090 划算多了<br />
64gb<br />
也不需要nvlink 就有2000prefill</p>
]]></description><link>https://lcz.me/post/16914</link><guid isPermaLink="true">https://lcz.me/post/16914</guid><dc:creator><![CDATA[applejuice]]></dc:creator><pubDate>Wed, 09 Sep 2026 14:20:32 GMT</pubDate></item></channel></rss>