mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[GH-ISSUE #318] data_placement.py 中使用pyomo建模时的一个约束问题 #196
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#196
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 @Siannochan on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/318
问题复现
首先按照 README 中提供的参数,执行 data_placement.py 生成一个解:
再对这个解添加一个节点,尝试利用 RebalanceTrafficModel 生成一个新的解:
此时 check_solution 报错:
原因分析
在 chain_table_type="CR" 时 λ(也即 max_recovery_traffic_on_peer)被定义为 r / (v - 1),这与 BIBD 中的 λ = r * (k-1) / (v-1) 不同(为什么要这样定义?)。在 pyomo建立模型时,对于 peer_recovery_traffic 的计算相当于 λ 在 BIBD 中的定义,而其上下限约束则使用了 r / (v - 1) 这个定义,因此提供的约束条件会与预期不符。我不确定这是 bug 还是我错误理解,但我尝试修改了代码以使得约束与预期一致。如果确为 bug 我再提 PR。
修改约束
@wlxiong commented on GitHub (Jul 28, 2025):
最早的设计里, 在扩容时 (即增加nodes) 可以通过RebalanceTrafficModel计算迁移流量最小的新数据放置方案. 但是后来没有实现扩容现有集群这个功能, 所以RebalanceTrafficModel可以认为是被废弃了.
@Siannochan commented on GitHub (Jul 28, 2025):
好的。但如果我想实现扩容,也还是可以使用 RebalanceTrafficModel 生成新的 chain_table,并手动迁移相关数据对吧?
@Siannochan commented on GitHub (Jul 28, 2025):
而且事实上,上面这个问题不仅是扩容时会影响,正常创建一个新的放置方案,在有些参数情况下也会暴露问题,比如:
会报同样的错误,因为本质上是 DataPlacementModel 中 build_model() 里的约束问题,与 RebalanceTrafficModel 没有直接联系。