Skip to content
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

Reduce memory usage during Rust compilation #205

Open
leoadonia opened this issue Oct 25, 2024 · 1 comment
Open

Reduce memory usage during Rust compilation #205

leoadonia opened this issue Oct 25, 2024 · 1 comment
Assignees

Comments

@leoadonia
Copy link
Collaborator

ld might be OOM killed during ten_manager compilation, the memory usage might be over 2Gi.

Possible actions:

@leoadonia
Copy link
Collaborator Author

临时解决方法, 增加 swap 大小:

  • 查看 swap file:

    swapon --show
  • 如果存在, 且不满足大小要求, 可以先关闭, 重新创建:

    swapoff /swapfile
  • 创建大小为 4G 的 swap:

    fallocate -l 4G /swapfile
    chmod 600 /swapfile
    
    # 格式化
    mkswap /swapfile
  • 启用:

    swapon /swapfile
  • 挂载

    在 /etc/fstab 中增加如下内容:

    /swapfile   none   swap   sw   0   0
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant