[GH-ISSUE #509] layer_split auto is 2.86x slower than a balanced K on prefill with a heterogeneous pair (3080 + V100, measured) #237

Closed
opened 2026-11-04 01:41:11 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @meelonjisoo-commits on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/509

Platform (all values measured on this machine)

Item Value
GPU 0 (main) NVIDIA RTX 3080 10 GB — sm_86, gen4 x16, CPU-attached
GPU 1 Tesla V100-PCIE-32GB — sm_70, gen3 x4 (chipset), via riser
CPU AMD Ryzen 5 5600X (6C/12T, AVX2, no AVX-512)
RAM 92 GiB DDR4-2133
OS / driver Ubuntu, kernel 7.0.0-34, NVIDIA 580.178.04
Strata 0.1.35, local dual-arch build (sm_86 + sm_70, 110 cubins), md5 7872494f
Model / config Qwen3.8-Flash-Next IQ3_XXS (GSQ-RCO), ctx 163,840, --kv q4_0, --expert-cache auto, MTP draft
Probe 32,368-token synthetic agent turn, cold (fresh process), drop_caches before every arm
Note The V100 is below the documented 7.5 compute-capability floor, so this pair is off-spec — see the closing note for why it still may be interesting

What happens

layer_split auto picks a placement that is 2.86x slower on prompt processing than an explicit balanced K:
549.5 t/s vs 1572.7 t/s on the same 32,368-token prompt, same engine, same build, same links. The single-card
baseline is 975.0 t/s — so the default split is 1.77x slower than not splitting, while a balanced split is
1.61x faster than not splitting. Only the K differs.

shape placement cold 32K prefill turn 3 after an aux call decode
3080 alone 48 layers, one card 975.0 t/s (33,199 ms) 0.40 s 37.4-55.5
split, layer_split auto K=11 — V100 takes 37 of 48 layers 549.5 t/s (58,903 ms) 58.5 s 62.5-105.7
split, one card, same K (--layer-split 11 --split-device 0) hand-off control on a fast link 972.4 t/s 33.4 s 39.4-64.8
split, --layer-split 24 V100 takes 24 1269.2 t/s (25,504 ms) 25.2 s 57.2-95.9
split, --layer-split 30 V100 takes 18 1572.7 t/s (20,581 ms) 20.3 s 53.8-89.8

At K=30 the first card is the bottleneck (30 layers x 0.69 s/layer = 20.7 s predicted, 20.6 s measured), so K=29-30
is this pair's optimum and ~1600 t/s its ceiling. The V100's SM clock was sampled in every split arm
(median 1380 of 1380 MHz), so the numbers are not a clock artifact.

Why auto lands on the slow placement

MULTI_GPU.md states auto "keeps the one whose caches would hold the most of the expert profile". That objective is
blind to the per-layer cost of the card the layers land on, and on a heterogeneous pair the cache-coverage
optimum and the time optimum diverge:

  • auto gave the V100 37 of 48 layers (14,598 slots, ~99.2 % of the routed mass covered);
  • but the V100 computes a layer ~1.34x slower than the 3080 (0.925 s vs 0.69 s per layer for a 32K pass, each
    measured alone on this box), so 37 layers there makes it the pipeline's bottleneck;
  • balanced 30/18, both stages run concurrently and the prompt time is set by the slower stage's share: 1573 t/s.

The engine already estimates per-stage per-layer cost at startup for its own plan log
(CUDA0 68 SMs at 1.78 GHz -> 0.60 ms per layer, CUDA1 80 SMs at 1.38 GHz -> 0.66 ms per layer), so a
time-balanced auto would be argmin_K max(K*t0, (48-K)*t1) plus the hand-off instead of a coverage ranking. (Your own
MULTI_GPU.md table shows the same, smaller, gap: auto K=22 at 2,037 t/s against "best split (K=26)" at 2,039 /
2,357 t/s on a 5080+3090.)

Two things it is NOT (both measured, so nobody re-chases them)

  1. Not the second card's link width. A split stage's PCIe expert share is derived from its own probe
    (bw>=20 -> 0.55 | bw<4 -> 0.00 | else 0.55*bw/26); our V100 stage probes 2.8 GB/s -> 0.00. Forcing the policy a
    wider slot would select changed nothing at K=11: --pcie-frac 0.14 -> 549.4, 0.28 -> 549.2, 0.55 -> 549.4 t/s.
    With a balanced K each stage's cache covers ~100 % of its own layers' profile, so almost nothing crosses the link
    during prefill at all.
  2. Not the two-stage mechanism. --layer-split 11 --split-device 0 (both stages on the one fast card, sharing
    weights/session/cache) costs -0.3 % against that card alone (972.4 vs 975.0 t/s).

Reproducing

--layer-split K with "gpu": [main, second], conversation-cache args removed (parking + split is rejected), a
32K-token cold prompt, drop_caches before each run, and the V100's SM clock sampled during the arm. The engine is
otherwise pristine 0.1.35: a dual-arch build is needed for the sm_70 card, which we did by lowering the CMake
compute-capability floor to 70 (upstream's below-7.5 community build option, #236, is the same idea). Any pair whose
two cards differ in per-layer cost (a 24 GB + 8 GB mix, a card in a narrow slot, an older card) should show the same
divergence; happy to re-measure a suggested placement on this machine.

  • #448 (closed, fixed in 0.1.35): the small-second-card 512-token chunk cap — a different cause of slow split
    prompts, and it was our first suspect for this. It is not this: our slow arm (K=11) and our fast arm (K=30) run the
    same 0.1.35 and the same 512-cap-free code path, and the only difference is K.
  • #305 / #236: sm_70 / below-7.5 support path — this pair (RTX 3080 + V100) is an off-spec, heterogeneous
    combination, which is exactly where auto's coverage objective and real time diverge most.
  • #490 (open) is a different heterogeneous idea (the MTP draft head on the second card) and does not overlap
    with this placement question.
Originally created by @meelonjisoo-commits on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/509 ## Platform (all values measured on this machine) | Item | Value | |---|---| | GPU 0 (main) | NVIDIA RTX 3080 10 GB — sm_86, gen4 x16, CPU-attached | | GPU 1 | Tesla V100-PCIE-32GB — sm_70, **gen3 x4 (chipset)**, via riser | | CPU | AMD Ryzen 5 5600X (6C/12T, AVX2, no AVX-512) | | RAM | 92 GiB DDR4-2133 | | OS / driver | Ubuntu, kernel 7.0.0-34, NVIDIA 580.178.04 | | Strata | **0.1.35**, local dual-arch build (sm_86 + sm_70, 110 cubins), md5 `7872494f` | | Model / config | Qwen3.8-Flash-Next IQ3_XXS (GSQ-RCO), ctx 163,840, `--kv q4_0`, `--expert-cache auto`, MTP draft | | Probe | 32,368-token synthetic agent turn, cold (fresh process), `drop_caches` before every arm | | Note | The V100 is below the documented 7.5 compute-capability floor, so this pair is off-spec — see the closing note for why it still may be interesting | ## What happens `layer_split auto` picks a placement that is **2.86x slower on prompt processing** than an explicit balanced `K`: **549.5 t/s vs 1572.7 t/s** on the same 32,368-token prompt, same engine, same build, same links. The single-card baseline is 975.0 t/s — so the *default* split is **1.77x slower than not splitting**, while a balanced split is **1.61x faster than not splitting**. Only the `K` differs. | shape | placement | cold 32K prefill | turn 3 after an aux call | decode | |---|---|---:|---:|---:| | 3080 alone | 48 layers, one card | 975.0 t/s (33,199 ms) | 0.40 s | 37.4-55.5 | | split, `layer_split auto` | **K=11** — V100 takes 37 of 48 layers | **549.5 t/s** (58,903 ms) | 58.5 s | 62.5-105.7 | | split, one card, same K (`--layer-split 11 --split-device 0`) | hand-off control on a fast link | 972.4 t/s | 33.4 s | 39.4-64.8 | | split, `--layer-split 24` | V100 takes 24 | 1269.2 t/s (25,504 ms) | 25.2 s | 57.2-95.9 | | split, `--layer-split 30` | V100 takes 18 | **1572.7 t/s** (20,581 ms) | 20.3 s | 53.8-89.8 | At K=30 the first card is the bottleneck (30 layers x ~0.69 s/layer = 20.7 s predicted, 20.6 s measured), so K~=29-30 is this pair's optimum and ~1600 t/s its ceiling. The V100's SM clock was sampled in every split arm (median 1380 of 1380 MHz), so the numbers are not a clock artifact. ## Why auto lands on the slow placement `MULTI_GPU.md` states auto "keeps the one whose caches would hold the most of the expert profile". That objective is blind to the **per-layer cost of the card the layers land on**, and on a heterogeneous pair the cache-coverage optimum and the time optimum diverge: - auto gave the V100 37 of 48 layers (14,598 slots, ~99.2 % of the routed mass covered); - but the V100 computes a layer ~1.34x slower than the 3080 (0.925 s vs 0.69 s per layer for a 32K pass, each measured alone on this box), so 37 layers there makes it the pipeline's bottleneck; - balanced 30/18, both stages run concurrently and the prompt time is set by the slower stage's share: 1573 t/s. The engine already estimates per-stage per-layer cost at startup for its own plan log (`CUDA0 68 SMs at 1.78 GHz -> 0.60 ms per layer`, `CUDA1 80 SMs at 1.38 GHz -> 0.66 ms per layer`), so a time-balanced auto would be `argmin_K max(K*t0, (48-K)*t1)` plus the hand-off instead of a coverage ranking. (Your own `MULTI_GPU.md` table shows the same, smaller, gap: auto K=22 at 2,037 t/s against "best split (K=26)" at 2,039 / 2,357 t/s on a 5080+3090.) ## Two things it is NOT (both measured, so nobody re-chases them) 1. **Not the second card's link width.** A split stage's PCIe expert share is derived from its own probe (`bw>=20 -> 0.55 | bw<4 -> 0.00 | else 0.55*bw/26`); our V100 stage probes 2.8 GB/s -> 0.00. Forcing the policy a wider slot would select changed nothing at K=11: `--pcie-frac 0.14` -> 549.4, `0.28` -> 549.2, `0.55` -> 549.4 t/s. With a balanced K each stage's cache covers ~100 % of its own layers' profile, so almost nothing crosses the link during prefill at all. 2. **Not the two-stage mechanism.** `--layer-split 11 --split-device 0` (both stages on the one fast card, sharing weights/session/cache) costs **-0.3 %** against that card alone (972.4 vs 975.0 t/s). ## Reproducing `--layer-split K` with `"gpu": [main, second]`, conversation-cache args removed (parking + split is rejected), a 32K-token cold prompt, `drop_caches` before each run, and the V100's SM clock sampled during the arm. The engine is otherwise pristine 0.1.35: a dual-arch build is needed for the sm_70 card, which we did by lowering the CMake compute-capability floor to 70 (upstream's below-7.5 community build option, #236, is the same idea). Any pair whose two cards differ in per-layer cost (a 24 GB + 8 GB mix, a card in a narrow slot, an older card) should show the same divergence; happy to re-measure a suggested placement on this machine. ## Related - **#448** (closed, fixed in 0.1.35): the small-second-card 512-token chunk cap — a *different* cause of slow split prompts, and it was our first suspect for this. It is not this: our slow arm (K=11) and our fast arm (K=30) run the same 0.1.35 and the same 512-cap-free code path, and the only difference is `K`. - **#305 / #236**: sm_70 / below-7.5 support path — this pair (RTX 3080 + V100) is an off-spec, heterogeneous combination, which is exactly where auto's coverage objective and real time diverge most. - **#490** (open) is a different heterogeneous idea (the MTP draft head on the second card) and does not overlap with this placement question.
Author
Owner

@meelonjisoo-commits commented on GitHub (Oct 2, 2026):

Follow-up measurements on the same machine (same engine 0.1.35 build, same method: cold prompt, drop_caches per arm, V100 SM clock sampled — median 1380/1380 MHz).

The K curve is unimodal and K=30 is its peak (32K cold prefill, t/s):

K K=24 K=26 K=28 K=30 K=34
cold 32K prefill 1269.2 1342.8 1472.3 1572.7 1428.6

Below the peak the second stage is the bottleneck, above it the first: at K=34 stage 0 owns 34 layers x ~0.69 s = 23.3 s predicted vs 22.7 s measured. Single card = 975.0 t/s.

The gap widens at depth (a ~120K-token prompt, the payload class this box actually reviews one-shot):

shape prompt time rate
one card (3080) 119,968 tokens 132,111 ms 908.1 t/s
split, --layer-split 30 119,968 tokens 76,005 ms 1578.4 t/s

+74 % at 120K (vs +61 % at 32K) — the single card's prefill rate falls slightly with depth while the split holds, so the placement effect is not a short-prompt artifact.

For completeness: a split still cannot hold a parked conversation (parking + --layer-split is rejected by design), so the aux-call re-read cost stays — 20.3 s at K=30 vs 0.40 s on one card. That makes the balanced split a batch shape for long one-shot reads, which is the case measured above.

<!-- gh-comment-id:5956172248 --> @meelonjisoo-commits commented on GitHub (Oct 2, 2026): Follow-up measurements on the same machine (same engine 0.1.35 build, same method: cold prompt, `drop_caches` per arm, V100 SM clock sampled — median 1380/1380 MHz). **The K curve is unimodal and K=30 is its peak** (32K cold prefill, t/s): | K | K=24 | K=26 | K=28 | **K=30** | K=34 | |---|---:|---:|---:|---:|---:| | cold 32K prefill | 1269.2 | 1342.8 | 1472.3 | **1572.7** | 1428.6 | Below the peak the second stage is the bottleneck, above it the first: at K=34 stage 0 owns 34 layers x ~0.69 s = 23.3 s predicted vs 22.7 s measured. Single card = 975.0 t/s. **The gap widens at depth** (a ~120K-token prompt, the payload class this box actually reviews one-shot): | shape | prompt | time | rate | |---|---|---:|---:| | one card (3080) | 119,968 tokens | 132,111 ms | 908.1 t/s | | split, `--layer-split 30` | 119,968 tokens | 76,005 ms | **1578.4 t/s** | **+74 %** at 120K (vs +61 % at 32K) — the single card's prefill rate falls slightly with depth while the split holds, so the placement effect is not a short-prompt artifact. For completeness: a split still cannot hold a parked conversation (parking + `--layer-split` is rejected by design), so the aux-call re-read cost stays — 20.3 s at K=30 vs 0.40 s on one card. That makes the balanced split a batch shape for long one-shot reads, which is the case measured above.
Author
Owner

@Niko1221 commented on GitHub (Oct 2, 2026):

Thanks for the careful sweep. Auto chose K=11 on purpose: its cost model weighs the decode window, and in your own table K=11 decodes faster (62-106 vs 54-90 tok/s) while prefilling slower. It adds the stages' times (as one decode window does), it doesn't take the slowest stage (as a pipelined prompt does), and its per-layer speed comes from SMs x clock, which doesn't see the V100's architecture. For prompt-heavy work, --layer-split 30 (or "layer_split": "30" in the config) is the right choice. A prompt-weighted auto mode is noted for later. Closing.

<!-- gh-comment-id:5956992352 --> @Niko1221 commented on GitHub (Oct 2, 2026): Thanks for the careful sweep. Auto chose K=11 on purpose: its cost model weighs the decode window, and in your own table K=11 decodes faster (62-106 vs 54-90 tok/s) while prefilling slower. It adds the stages' times (as one decode window does), it doesn't take the slowest stage (as a pipelined prompt does), and its per-layer speed comes from SMs x clock, which doesn't see the V100's architecture. For prompt-heavy work, `--layer-split 30` (or `"layer_split": "30"` in the config) is the right choice. A prompt-weighted auto mode is noted for later. Closing.
Author
Owner

@MarsLuay commented on GitHub (Oct 13, 2026):

Follow-up measurement from a different platform that matches the heterogeneous case in this issue: Windows, RTX 3080 Ti 12 GB + Tesla V100-PCIE-32GB, experimental CUDA 12, Strata 0.1.40, Qwen3.8 Flash Next IQ3_S (48 layers, 131K context, INT8 KV, MTP).

Two cold streamed ~10K-token prompts per arm measured:

  • RTX-only: 433.5 prompt tok/s, 28.4 decode tok/s, 23.3 s TTFT.
  • layer_split auto (auto selected K=18): 838.7 prompt tok/s, 69.1 decode tok/s, 12.1 s TTFT.
  • Manual K=28 + --trim-stage-weights: 1495.3 prompt tok/s, 69.3 decode tok/s, 6.8 s TTFT.
  • Manual K=29: 1531.4 prompt tok/s, 66.8 decode tok/s, 6.7 s TTFT.
  • Manual K=30: 1515.2 prompt tok/s, 62.4 decode tok/s, 6.7 s TTFT.
  • Manual K=31: 1535.7 prompt tok/s, 63.1 decode tok/s, 6.6 s TTFT.
  • Manual K=32: 1483.5 prompt tok/s, 58.3 decode tok/s, 6.9 s TTFT.

This confirms the issue's conclusion on Windows as well: auto was good for decode but manual placement was substantially better for prompt/interactive latency. The selected local configuration is K=28 with trimming and bounded conversation parking. Full table and methodology are in my related comment on #2052: https://github.com/Niko1221/Strata/issues/2052#issuecomment-6136129748

<!-- gh-comment-id:6136310568 --> @MarsLuay commented on GitHub (Oct 13, 2026): Follow-up measurement from a different platform that matches the heterogeneous case in this issue: Windows, RTX 3080 Ti 12 GB + Tesla V100-PCIE-32GB, experimental CUDA 12, Strata 0.1.40, Qwen3.8 Flash Next IQ3_S (48 layers, 131K context, INT8 KV, MTP). Two cold streamed ~10K-token prompts per arm measured: - RTX-only: 433.5 prompt tok/s, 28.4 decode tok/s, 23.3 s TTFT. - `layer_split auto` (auto selected K=18): 838.7 prompt tok/s, 69.1 decode tok/s, 12.1 s TTFT. - Manual K=28 + `--trim-stage-weights`: 1495.3 prompt tok/s, 69.3 decode tok/s, 6.8 s TTFT. - Manual K=29: 1531.4 prompt tok/s, 66.8 decode tok/s, 6.7 s TTFT. - Manual K=30: 1515.2 prompt tok/s, 62.4 decode tok/s, 6.7 s TTFT. - Manual K=31: 1535.7 prompt tok/s, 63.1 decode tok/s, 6.6 s TTFT. - Manual K=32: 1483.5 prompt tok/s, 58.3 decode tok/s, 6.9 s TTFT. This confirms the issue's conclusion on Windows as well: auto was good for decode but manual placement was substantially better for prompt/interactive latency. The selected local configuration is K=28 with trimming and bounded conversation parking. Full table and methodology are in my related comment on #2052: https://github.com/Niko1221/Strata/issues/2052#issuecomment-6136129748
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#237
No description provided.