[PR #359] [MERGED] DeepSeek: leave two cores free beside the CPU lane (decode 42 -> 68.5 tok/s here) #487

Closed
opened 2026-10-29 21:25:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/359
Author: @OscarSheng
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @mw00

Base: main ← Head: ds4-lane-free-cores


📝 Commits (1)

  • 4e6d807 DeepSeek: leave two cores free beside the CPU lane

📊 Changes

1 file changed (+10 additions, -0 deletions)

View changed files

📝 src/ds4/ds4_model.cu (+10 -0)

📄 Description

What it changes: pools_for keeps MAYA_DS4_LANE_FREE cores (default 2; 0 = as before) out of the first pool,
beside the service thread's, unless --cpu-threads is given.

Why: with a worker on every other core spinning between a token's layers (for 20 ms after its last job), the thread
that launches the decode's kernels waited for a core. The lane's start-up timing measures the pool alone, so it did not
see this.

What it leaves alone: --cpu-threads (an explicit count wins); the lane's kernels.

Measured (same setup as the "1 ms timer resolution" PR, with that PR on):

decode, round 1 / 2
MAYA_DS4_LANE_FREE=0 (as before: 19 workers on 20 cores) 42.4 / 41.6 tok/s
default (2 free: 17 workers) 68.6 / 68.5

Prompts unchanged. Worker counts on v1.1.19 (600 tokens): 19 -> 28.3, 18 -> 47.2, 17 -> 55.5, 11 -> 53.4, 7 -> 52.1.

Open: measured on one CPU (20 cores, no SMT) under Windows only. If you prefer, it can default to 0 off Windows until
someone measures Linux.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/359 **Author:** [@OscarSheng](https://github.com/OscarSheng) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `ds4-lane-free-cores` --- ### 📝 Commits (1) - [`4e6d807`](https://github.com/mw00/project-maya/commit/4e6d807f91645dae7dfd5c293a5a135006eb71cc) DeepSeek: leave two cores free beside the CPU lane ### 📊 Changes **1 file changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/ds4/ds4_model.cu` (+10 -0) </details> ### 📄 Description What it changes: `pools_for` keeps `MAYA_DS4_LANE_FREE` cores (default 2; 0 = as before) out of the first pool, beside the service thread's, unless `--cpu-threads` is given. Why: with a worker on every other core spinning between a token's layers (for 20 ms after its last job), the thread that launches the decode's kernels waited for a core. The lane's start-up timing measures the pool alone, so it did not see this. What it leaves alone: `--cpu-threads` (an explicit count wins); the lane's kernels. Measured (same setup as the "1 ms timer resolution" PR, with that PR on): | | decode, round 1 / 2 | |---|---:| | `MAYA_DS4_LANE_FREE=0` (as before: 19 workers on 20 cores) | 42.4 / 41.6 tok/s | | default (2 free: 17 workers) | **68.6 / 68.5** | Prompts unchanged. Worker counts on v1.1.19 (600 tokens): 19 -> 28.3, 18 -> 47.2, 17 -> 55.5, 11 -> 53.4, 7 -> 52.1. Open: measured on one CPU (20 cores, no SMT) under Windows only. If you prefer, it can default to 0 off Windows until someone measures Linux. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:25:57 +07:00
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#487
No description provided.