mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1147] [Bug] 在双路6530+1TB DRAM上启用NUMA支持时发生OOM #796
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#796
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 @alkalimc on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1147
Originally assigned to: @Atream on GitHub.
检查清单
问题描述
共有1TB内存,启用NUMA支持后会在DeepSeek权重加载到大约32层时导致OOM,不启用NUMA支持的时则正常占用约375GB内存
复现步骤
numactl显示该设备被配置为4个NUMA nodes,但在bios没有SNC设置选项时我不确定如何修正这一问题。
环境信息
我使用ThinkStation PX,该设备包含双路6530和16根共1TB的DDR5 4800MT内存,配合RTX4090开展测试。
@yeungtuzi commented on GitHub (Apr 16, 2025):
按照这个die shot和相关技术资料,每个6530处理器里面确实包括两个相对独立的tile,Each tile has 2 memory controllers supporting DDR5 DIMMs with up to 5600 MT/s speeds, three PCIe controllers (6 total), 2 UPI (4 total)
因此,双路系统在跑虚拟机或者云计算的情况下,设置为4 numa能让应用专注本地内存访问,提高总体性能。
建议您找一下BIOS跟上述任务相关的设置,看能否将其设置为单NUMA(使用内存交错)。
不知道开发组什么时候实现多numa只使用一份内存,也就是实现CPU的tensor parallel,这样能大幅降低跨tile访问内存的性能损失。
@alkalimc commented on GitHub (Apr 16, 2025):
能否手动指定某份权重副本运行在某几个numa节点上呢,如果可行的话则可以使这个框架在该环境下按预期运行
@yeungtuzi commented on GitHub (Apr 16, 2025):
可以使用numactl设置,不过这样的话CPU可能无法充分发挥
@Atream commented on GitHub (Apr 29, 2025):
开启NUMA会导致NUMA个数倍的内存占用,bios中可以修改相关设置,让每个socket对应一个NUMA,能减少内存占用
CPU上的TP可以避免成倍的内存消耗,但需要晚一段时间才能发布。