Skip to content

kali20gakki/msAgent / skills/host-cpu/msagent-perf-cpu-bind-tune

msagent-perf-cpu-bind-tune

Flagged

昇腾 NPU 多卡任务的 Host CPU 绑核方案求解器:覆盖 PyTorch 训练/离线推理与 vLLM-Ascend、SGLang 推理服务的 rank/worker/engine 分核,基于 NUMA 拓扑与 卡↔进程映射输出可执行、可回滚、可验证的绑核计划(taskset 前缀 / cpuset / OMP 环境变量),自动判定事前(env 片段)与事中(在线 sched_setaffinity)双形态。 触发:绑核方案、核怎么分、per-rank 绑核、NUMA 绑定方案、cpuset 划分、多卡分核、 CPU range 冲突、TTFT 或吞吐受 CPU 影响。 不用于:绑核没生效/绑核异常诊断(→ perf-cpu-config-audit);运行期是否落核 (→ perf-cpu-tracing);变慢根因归因(→ perf-cpu-perf-triage)。

resources/report.css

View on GitHub
:root{--bg:#f4f7fb;--panel:#fff;--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;
--blue:#2563eb;--blue-soft:#dbeafe;--green:#16a34a;--green-soft:#dcfce7;
--red:#dc2626;--red-soft:#fee2e2;--amber:#d97706;--amber-soft:#fef3c7;
--purple:#7c3aed;--purple-soft:#ede9fe;--teal:#0d9488;--teal-soft:#ccfbf1;
--orange:#ea580c;--orange-soft:#ffedd5;--gray:#64748b;--gray-soft:#f1f5f9}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
background:radial-gradient(1100px 520px at 8% -10%,#dbeafe 0,transparent 60%),radial-gradient(900px 480px at 100% 0,#ede9fe 0,transparent 55%),var(--bg);color:var(--ink);line-height:1.55}
.wrap{max-width:1280px;margin:0 auto;padding:26px 22px 50px}
.hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;background:linear-gradient(135deg,#0b1220,#132a5e 55%,#1d4ed8);color:#fff;border-radius:20px;padding:26px 30px;box-shadow:0 18px 45px rgba(30,64,175,.28)}
.eyebrow{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:#bfdbfe;font-weight:800}
h1{font-size:28px;margin:7px 0 6px}.sub{color:#cbd5e1;font-size:12px}
.concl{background:rgba(255,255,255,.95);color:var(--ink);border-radius:12px;padding:12px 15px;margin-top:11px;font-size:12.5px;line-height:1.6;max-width:880px;box-shadow:0 6px 18px rgba(2,6,23,.2)}
.concl .t{font-size:11px;font-weight:800;letter-spacing:.08em;color:#1d4ed8;margin-bottom:5px}
.concl ul{margin:0;padding-left:17px}.concl li{margin:3px 0}.concl b{color:#b91c1c}
.badges{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;max-width:330px}.badge{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);color:#e2e8f0;padding:5px 9px;border-radius:999px;font-size:11px;white-space:nowrap}.badge.good{background:rgba(22,163,74,.22);border-color:rgba(74,222,128,.42);color:#dcfce7}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}.kpi{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:12px 14px;box-shadow:0 8px 24px rgba(15,23,42,.06)}.kpi .v{font-size:23px;font-weight:800}.kpi .l{font-size:11px;color:var(--muted)}.kpi.hot .v{color:var(--red)}.kpi.ok .v{color:var(--green)}.kpi.warn .v{color:var(--amber)}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:20px 22px;box-shadow:0 8px 24px rgba(15,23,42,.06);margin-top:16px}
h2{font-size:16px;margin:0 0 3px;display:flex;gap:9px;align-items:center}h2 .no{display:inline-flex;width:25px;height:25px;border-radius:7px;background:var(--blue-soft);color:var(--blue);align-items:center;justify-content:center;font-size:11px;font-weight:800}
.hint{color:var(--muted);font-size:12px;margin:0 0 14px}
.nodes{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.node{border:1px solid var(--line);border-radius:11px;padding:10px;background:#fbfdff}.node .head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}.node .head strong{font-size:12px}.node .head span{font-size:10px;color:var(--muted)}
.meta{display:flex;flex-wrap:wrap;gap:7px 16px;margin:0 0 12px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfdff;font-size:11px;color:#334155}.meta .kv i{font-style:normal;color:var(--muted);font-weight:700;margin-right:6px}
.row{display:flex;gap:5px;align-items:center;margin:5px 0;flex-wrap:wrap}.row .k{width:42px;flex:0 0 42px;font-size:10px;color:var(--muted);font-weight:700}.chip{font-size:10px;padding:2px 6px;border-radius:5px;white-space:nowrap}.chip.cpu{background:var(--blue-soft);color:#1d4ed8}.chip.npu{background:var(--purple-soft);color:#6d28d9}.chip.nic{background:var(--teal-soft);color:#0f766e}.chip.storage{background:var(--orange-soft);color:#c2410c}.chip.unit{background:#e0e7ff;color:#3730a3}.muted{color:var(--muted);font-size:10px}
table{width:100%;border-collapse:collapse;font-size:11.5px}th{text-align:left;padding:7px 9px;background:#f8fafc;color:var(--muted);font-weight:800;border-bottom:1px solid var(--line)}td{padding:7px 9px;border-bottom:1px solid #eef2f7;vertical-align:top}tr:last-child td{border-bottom:none}tr.warn td{background:#fffaf0}
.tag{display:inline-block;padding:2px 7px;border-radius:999px;font-size:9.5px;font-weight:800}.tag.high{background:var(--red-soft);color:#b91c1c}.tag.medium{background:var(--amber-soft);color:#b45309}.tag.low{background:var(--gray-soft);color:#475569}.tag.info{background:var(--blue-soft);color:#1d4ed8}.tag.solve{background:var(--blue-soft);color:#1d4ed8}.tag.handoff{background:var(--amber-soft);color:#b45309}.tag.note{background:var(--gray-soft);color:#475569}.tag.view_limited{background:var(--gray-soft);color:#475569}
.strips{display:grid;grid-template-columns:1fr;gap:9px}.strip-block{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fbfdff}.strip-head{display:flex;justify-content:space-between;font-size:11px;margin-bottom:5px}.strip-head span{color:var(--muted)}.strip{display:grid;grid-template-columns:repeat(24,1fr);gap:3px}.core{height:18px;border-radius:3px;display:flex;align-items:center;justify-content:center;font-size:7.5px;color:#fff;cursor:default}.core.compute{background:#2563eb}.core.comm{background:#7c3aed}.core.io{background:#0d9488}.core.main{background:#4f46e5}.core.system{background:#d97706}.core.interference{background:#64748b}.core.idle{background:#e2e8f0;color:#94a3b8}
.legend{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 10px;font-size:10.5px;color:var(--muted)}.legend i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px}
.matrix{width:100%;border-collapse:separate;border-spacing:0;font-size:11px}.matrix th{background:#f8fafc;color:var(--muted);font-weight:800;border-bottom:1px solid var(--line);padding:6px 5px;text-align:center;font-size:10px;white-space:nowrap}.matrix th.dim{background:#f1f5f9;color:#475569}.matrix th.dev{text-align:left;position:sticky;left:0;background:#f8fafc;z-index:1}
.matrix td.cell{text-align:center;padding:5px 4px;border-bottom:1px solid #eef2f7;border-right:1px solid #f5f8fc;font-size:10px;white-space:nowrap}.cell.local{background:var(--green-soft);color:#166534;font-weight:800}.cell.remote{background:#f1f5f9;color:#94a3b8}.cell.unknown{color:#b45309;background:repeating-linear-gradient(45deg,#fffdf5,#fffdf5 4px,#fef3c7 4px,#fef3c7 8px);font-weight:700}.cell.self{background:#0f172a;color:#fff;font-weight:800}.cell.equi{background:var(--blue-soft);color:#1d4ed8;font-weight:800}
.dist{font-size:11px}.dist td.v{text-align:center;font-variant-numeric:tabular-nums}.dist td.v.diag{background:#0f172a;color:#fff;font-weight:800}.dist td.v.near{background:var(--green-soft);color:#166534}.dist td.v.far{background:var(--amber-soft);color:#92400e}
.unknownbox{border:1px dashed #fcd34d;border-radius:10px;padding:10px 12px;background:#fffdf5;font-size:11.5px;color:#78350f}.unknownbox b{color:#92400e}
pre{background:#0f172a;color:#e2e8f0;padding:12px 14px;border-radius:10px;font-size:10.5px;line-height:1.7;overflow:auto;margin:0;font-family:ui-monospace,Consolas,monospace}
.notes{font-size:11.5px;color:var(--muted);margin:10px 0 0;padding-left:18px}.notes li{margin:3px 0}
details.src{margin-top:12px;border-top:1px dashed var(--line);padding-top:8px;font-size:11.5px;color:var(--muted)}details.src summary{cursor:pointer;font-weight:700;color:#475569}details.src ul{margin:6px 0 0;padding-left:18px}details.src li{margin:2px 0}
.foot{text-align:center;color:#94a3b8;font-size:10.5px;margin-top:18px}
@media(max-width:1000px){.kpis{grid-template-columns:repeat(3,1fr)}.nodes{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.kpis{grid-template-columns:repeat(2,1fr)}.nodes{grid-template-columns:1fr}.hero{flex-direction:column;align-items:flex-start}}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall