[GH-ISSUE #1760] Regression: automatic GPU ordering in be8db787 reduces decode throughput ~15% on dual RTX 5070 Ti #701

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

Originally created by @L-proger on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1760

Possibly related to #1352.

The automatic GPU ordering introduced in be8db787c233acdde3e5887b652a87df23f0445a causes a reproducible decode performance regression on my dual RTX 5070 Ti setup.

Hardware

  • Windows 11
  • 2 × NVIDIA GeForce RTX 5070 Ti 16 GB
  • Same model, config and prompt used for all tests
  • IQ3_S model

Performance

Version / setting Decode speed
v0.1.40.4 ~91 tok/s
v0.1.41 / latest with automatic GPU ordering ~77 tok/s
latest + "gpu_order": "as_given" ~91 tok/s

So the automatic ordering causes roughly a 15% decode throughput regression on this machine, while opting out restores the previous performance completely.

Git bisect

I bisected between:

  • good: v0.1.40.4
  • bad: v0.1.41

Result:

be8db787c233acdde3e5887b652a87df23f0445a is the first 'bad' commit

serve: card order for an auto layer split, faster card last
(SMs x clock), gpu_order as_given opts out (#1352)

GPU scores and resulting order

Using Strata's own gpu_speed_scores() / ordered_gpus():

scores: {0: 173740000.0, 1: 171640000.0}

[strata] layer split: card order 1,0
(the faster card last; "gpu_order": "as_given" keeps 0,1, #1352)

auto order: [1, 0]
as_given: [0, 1]

For comparison, nvidia-smi reports the same maximum SM clock for both cards:

index, name, clocks.max.sm [MHz], pci.bus_id
0, NVIDIA GeForce RTX 5070 Ti, 3090 MHz, 00000000:01:00.0
1, NVIDIA GeForce RTX 5070 Ti, 3090 MHz, 00000000:03:00.0

The CUDA-derived scores differ only slightly, but that is enough for the new heuristic to reorder the cards from [0,1] to [1,0].

On this system, that reorder reduces decode throughput from ~91 tok/s to ~77 tok/s.

Workaround

Adding this to the model config restores the previous performance on the latest version:

"gpu_order": "as_given"

With that setting enabled, decode throughput returns to ~91 tok/s.

Notes

Because both GPUs are effectively the same model and the score difference is very small, it may be worth avoiding automatic reordering when scores are very close.

More generally, SM count × clock alone may not be enough to choose the optimal order, since actual performance can also depend on PCIe topology, display usage, device placement and the work assigned to the final pipeline stage.

Originally created by @L-proger on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1760 Possibly related to #1352. The automatic GPU ordering introduced in `be8db787c233acdde3e5887b652a87df23f0445a` causes a reproducible decode performance regression on my dual RTX 5070 Ti setup. ## Hardware - Windows 11 - 2 × NVIDIA GeForce RTX 5070 Ti 16 GB - Same model, config and prompt used for all tests - IQ3_S model ## Performance | Version / setting | Decode speed | |---|---:| | `v0.1.40.4` | ~91 tok/s | | `v0.1.41` / latest with automatic GPU ordering | ~77 tok/s | | latest + `"gpu_order": "as_given"` | ~91 tok/s | So the automatic ordering causes roughly a 15% decode throughput regression on this machine, while opting out restores the previous performance completely. ## Git bisect I bisected between: - good: `v0.1.40.4` - bad: `v0.1.41` Result: ```text be8db787c233acdde3e5887b652a87df23f0445a is the first 'bad' commit serve: card order for an auto layer split, faster card last (SMs x clock), gpu_order as_given opts out (#1352) ``` ## GPU scores and resulting order Using Strata's own `gpu_speed_scores()` / `ordered_gpus()`: ```text scores: {0: 173740000.0, 1: 171640000.0} [strata] layer split: card order 1,0 (the faster card last; "gpu_order": "as_given" keeps 0,1, #1352) auto order: [1, 0] as_given: [0, 1] ``` For comparison, `nvidia-smi` reports the same maximum SM clock for both cards: ```text index, name, clocks.max.sm [MHz], pci.bus_id 0, NVIDIA GeForce RTX 5070 Ti, 3090 MHz, 00000000:01:00.0 1, NVIDIA GeForce RTX 5070 Ti, 3090 MHz, 00000000:03:00.0 ``` The CUDA-derived scores differ only slightly, but that is enough for the new heuristic to reorder the cards from `[0,1]` to `[1,0]`. On this system, that reorder reduces decode throughput from ~91 tok/s to ~77 tok/s. ## Workaround Adding this to the model config restores the previous performance on the latest version: ```json "gpu_order": "as_given" ``` With that setting enabled, decode throughput returns to ~91 tok/s. ## Notes Because both GPUs are effectively the same model and the score difference is very small, it may be worth avoiding automatic reordering when scores are very close. More generally, `SM count × clock` alone may not be enough to choose the optimal order, since actual performance can also depend on PCIe topology, display usage, device placement and the work assigned to the final pipeline stage.
Author
Owner

@qni-live commented on GitHub (Oct 10, 2026):

Data point from Linux with two identical cards, in case it helps narrow this down.

2x NVIDIA RTX PRO 4500 Blackwell (32 GB, sm_120), Ubuntu, driver 595.91, v0.1.41 source build, Swift IQ3_XXS,
262,144 context, layer_split: "auto".

  • auto: Strata chose layer 24 as the split (CUDA0 0-23, CUDA1 24-47) and printed no re-ordering line.
  • auto + "gpu_order": "as_given": the same assignment.
  • Long decode (2,500 tokens, greedy): 173.3 and 174.2 tok/s; 128k prompt prefill 6,258 and 6,212 tok/s.

So with identical cards I do not see the 15 % drop reported here. The report above shows the two scores differing by
about 1 % (173.7M against 171.6M) and the order flipping; with two cards of exactly equal speed the heuristic did not
flip anything on this machine. One run each, no Windows.

Written with AI assistance (Claude); numbers reviewed by me.

<!-- gh-comment-id:6096093890 --> @qni-live commented on GitHub (Oct 10, 2026): Data point from Linux with two identical cards, in case it helps narrow this down. 2x NVIDIA RTX PRO 4500 Blackwell (32 GB, sm_120), Ubuntu, driver 595.91, v0.1.41 source build, Swift IQ3_XXS, 262,144 context, `layer_split: "auto"`. - `auto`: Strata chose layer 24 as the split (CUDA0 0-23, CUDA1 24-47) and printed no re-ordering line. - `auto` + `"gpu_order": "as_given"`: the same assignment. - Long decode (2,500 tokens, greedy): 173.3 and 174.2 tok/s; 128k prompt prefill 6,258 and 6,212 tok/s. So with identical cards I do not see the 15 % drop reported here. The report above shows the two scores differing by about 1 % (173.7M against 171.6M) and the order flipping; with two cards of exactly equal speed the heuristic did not flip anything on this machine. One run each, no Windows. *Written with AI assistance (Claude); numbers reviewed by me.*
Author
Owner

@L-proger commented on GitHub (Oct 10, 2026):

One additional detail that may be relevant:

The two GPUs are identical RTX 5070 Ti cards and both are connected as PCIe 5.0 x8, but they are not both headless.

CUDA0 drives two displays and currently has about 2.5 GB of VRAM used by Windows/WDDM, while CUDA1 is completely headless and shows 0 MiB VRAM usage when idle.

So in my setup:

CUDA0: 2 displays, ~2.5 GB VRAM used by Windows
CUDA1: headless, 0 MiB VRAM used

This may explain why changing the order from [0,1] to [1,0] has a much larger performance impact than the ~1% difference in the synthetic GPU speed score would suggest.

In particular, with [1,0], the display/WDDM GPU becomes the later pipeline GPU, which may affect available VRAM / expert cache placement / other last-stage allocations.

<!-- gh-comment-id:6099684994 --> @L-proger commented on GitHub (Oct 10, 2026): One additional detail that may be relevant: The two GPUs are identical RTX 5070 Ti cards and both are connected as PCIe 5.0 x8, but they are not both headless. `CUDA0` drives two displays and currently has about 2.5 GB of VRAM used by Windows/WDDM, while `CUDA1` is completely headless and shows 0 MiB VRAM usage when idle. So in my setup: ```text CUDA0: 2 displays, ~2.5 GB VRAM used by Windows CUDA1: headless, 0 MiB VRAM used ``` This may explain why changing the order from `[0,1]` to `[1,0]` has a much larger performance impact than the ~1% difference in the synthetic GPU speed score would suggest. In particular, with `[1,0]`, the display/WDDM GPU becomes the later pipeline GPU, which may affect available VRAM / expert cache placement / other last-stage allocations.
Author
Owner

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

Thank you for the bisect and the scores. The #1576 fix only kept the order when the faster card had less VRAM than the card the split ends on, so two 5070 Ti with equal VRAM were still swapped on a 1.2% difference of the clock reading. v0.1.42 also keeps the order you gave when the cards' scores are within 5% of each other (two cards of the same model), so your pair stays 0,1. A real difference (a 4070 Ti SUPER next to a 5060 Ti) still puts the faster card last. "gpu_order": "as_given" keeps working as the explicit choice.

<!-- gh-comment-id:6099751139 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thank you for the bisect and the scores. The #1576 fix only kept the order when the faster card had less VRAM than the card the split ends on, so two 5070 Ti with equal VRAM were still swapped on a 1.2% difference of the clock reading. v0.1.42 also keeps the order you gave when the cards' scores are within 5% of each other (two cards of the same model), so your pair stays 0,1. A real difference (a 4070 Ti SUPER next to a 5060 Ti) still puts the faster card last. "gpu_order": "as_given" keeps working as the explicit choice.
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#701
No description provided.