Skip to content

[r2cn] Decode Git Pack 时增加 foyer 缓存机制 #837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
genedna opened this issue Feb 9, 2025 · 6 comments
Open

[r2cn] Decode Git Pack 时增加 foyer 缓存机制 #837

genedna opened this issue Feb 9, 2025 · 6 comments
Assignees
Labels
enhancement New feature or request performance r2cn r2cn-30 rust Pull requests that update Rust code 已认领

Comments

@genedna
Copy link
Member

genedna commented Feb 9, 2025

[任务] Decode Git Pack 时增加 foyer 缓存机制

[任务分值] 30 分

[背景描述] 当前 Mono 收到 Git Push 的 Pack 文件时,会进行解析;如果 Pack 文件比较大的时候,譬如 Linux Kernel 会占用 40G 以上的内存。

[需求描述] 使用 foyer 作为缓存,控制解析超大 Pack 文件时的内存使用,避免程序 OOM

  1. Mono 中增加配置,确定使用的内存和硬盘缓存大小,提供一个百分比策略,对应硬盘和内存使用的比例;
  2. 使用 Linux Kernel 作为导入测试;
  3. 进行完整的测试,把设计方案、测试结果等编写一个文档提交到 docs 目录;

[代码标准]

  1. 所有 PR 提交必须签署 Signed-off-by 和 使用 GPG 签名,即提交代码时(使用 git commit 命令时)至少使用 -s -S 两个参数,参考 Contributing Guide
  2. 所有 PR 提交必须通过 GitHub Actions 自动化测试,提交 PR 后请关注 GitHub Actions 结果;
  3. 代码注释均需要使用英文;

[PR 提交地址] 提交到 mega 仓库的 main 分支 `` 目录;

[开发指导]

  1. 认领任务参考 r2cn 开源实习计划 - 任务认领与确认;

[导师及邮箱] 请申请此题目的同学使用邮件联系导师,或加入到 R2CN Discord 后在 #p-meta 频道和导师交流。

  1. Quanyi Ma [email protected]
  2. Tianxing Ye [email protected]

[备注]

  1. 认领实习任务的同学,必须完成测试任务和注册流程,请参考: r2cn 开源实习计划 - 测试任务r2cn 开源实习计划 - 学生注册与审核
@genedna genedna added the r2cn-30 label Feb 9, 2025
Copy link

r2cn-bot bot commented Feb 9, 2025

任务创建成功。

@genedna genedna added this to r2cn and Mega Feb 9, 2025
@genedna genedna moved this to Backlog in r2cn Feb 9, 2025
@genedna genedna moved this to Backlog in Mega Feb 9, 2025
@genedna genedna added enhancement New feature or request rust Pull requests that update Rust code performance r2cn 未认领 labels Feb 10, 2025
@hanbings
Copy link
Contributor

/request-assign

Copy link

r2cn-bot bot commented Feb 13, 2025

认领成功,等待导师审核,请及时联系导师进行审核。

@genedna
Copy link
Member Author

genedna commented Feb 13, 2025

/intern-approve

@r2cn-bot r2cn-bot bot added the 已认领 label Feb 13, 2025
Copy link

r2cn-bot bot commented Feb 13, 2025

认领审核成功,已将该任务分配给学生。

@genedna genedna removed the 未认领 label Feb 13, 2025
@genedna genedna moved this from Backlog to In progress in Mega Feb 15, 2025
@genedna genedna moved this from Backlog to In progress in r2cn Feb 15, 2025
@hanbings
Copy link
Contributor

完成任务需要改动的代码文件较多,因此拆分为三部分分为三个 PR 完成:

  1. 添加配置文件的支持 Add cache-related configuration items for the introduction of foyer. #858
  2. 引入 foyer,更新现有代码支持 foyer 的混合缓存方案
  3. 设计方案、测试代码、性能测试报告与文档更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance r2cn r2cn-30 rust Pull requests that update Rust code 已认领
Projects
Status: In progress
Status: In progress
Development

No branches or pull requests

2 participants