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

posts/resource-limitation-using-cgroups/ #31

Open
utterances-bot opened this issue Nov 29, 2022 · 2 comments
Open

posts/resource-limitation-using-cgroups/ #31

utterances-bot opened this issue Nov 29, 2022 · 2 comments

Comments

@utterances-bot
Copy link

容器技术原理(三):使用 Cgroups 实现资源限制 | Shall We Code?

cgroups 是由 Linux 内核提供的一种特性,它能够限制、核算和隔离一组进程所使用的系统资源(如 CPU、内存、磁盘 I/O、网络等)。

https://www.waynerv.com/posts/resource-limitation-using-cgroups/

Copy link

博主好,请问下在容器内部,是不是还可以通过cgroup限制新启动进程的资源呢?

@waynerv
Copy link
Owner

waynerv commented Dec 5, 2022

博主好,请问下在容器内部,是不是还可以通过cgroup限制新启动进程的资源呢?

这个我没有实践过,但 cgroup 理论上是支持多个层级的。一般来讲容器里面放一个主进程就够了,所以这种做法可能不是很推荐。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants