mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #796] [Bug] USE_NUMA=1在2socket机器上不生效 / The USE_NUMA=1 setting does not take effect on a 2-socket machine. #577
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#577
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pkunight on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/796
Checklist
Describe the bug
我在一台云服务器(经过了虚拟化)内按照下列文档执行了Dual socket的操作(export USE_NUMA=1 and reinstall).
I followed the steps for a dual socket configuration according to the documentation on a cloud server (after virtualization).
https://kvcache-ai.github.io/ktransformers/en/DeepseekR1_V3_tutorial.html#dual-socket-version-64-cores
但是, 模型并没有按文档说明的那样被复制到两个numa node对应的内存上, 而是被平均分配到两个numa node.
However, the model was not copied to the memory corresponding to the two NUMA nodes as described in the documentation. Instead, it was evenly distributed across the two NUMA nodes.
在这个场景下, 大量的跨numa传输导致模型生成性能极差, 在65cpu核的情况下只有不到6tokens/s.
In this scenario, the large number of cross-NUMA transfers results in very poor model generation performance, with fewer than 6 tokens per second with 65 CPU cores.
如果采用
numactl -N 1 -m 1, 且采用32cpu核, 则可以获得和文档中一样的8.73tokens/s, 证明机器本身没有问题.If
numactl -N 1 -m 1is used with 32 CPU cores, the performance reaches 8.73 tokens per second, which is the same as described in the documentation, proving that the machine itself is not the issue.Reproduction
Environment
@ErvinXie commented on GitHub (Mar 5, 2025):
请确认是否有安装 libnuma
@pkunight commented on GitHub (Mar 5, 2025):
已确认确实是没安装libnuma-dev导致的, 在文档中并未提到. 感谢!
@ErvinXie commented on GitHub (Mar 5, 2025):
感谢你的反馈,我们会在文档中添加相关的说明。