TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Linux sysadmin's introduction to cgroups

343 点作者 FedericoRazzoli超过 4 年前

10 条评论

WestCoastJustin超过 4 年前
This is getting a little long in the tooth but I created a few videos and did some tests around cgroups back in 2013-2014. Both these help explain the underpinnings of Docker and I guess Kubernetes now too. Turtles all the way up. I&#x27;m just mentioning this since these are still some of my most popular videos and still the core tech under the hood.<p>A personal note here too. cgroups were invented at Google in the early 2000&#x27;s. If you&#x27;re using search today, gmail, docs, maps, etc. You&#x27;re using cgroups. It sounds simple but this tech really powered a whole wave of innovation&#x2F;startups&#x2F;projects that almost everyone interacts with on a daily basis. Either through touching a Google service or interacting with anyone using Docker or Kubernetes (running on cgroups&#x2F;namespaces). Pretty impressive.<p>#14 - Introduction to Linux Control Groups (Cgroups)<p><a href="https:&#x2F;&#x2F;sysadmincasts.com&#x2F;episodes&#x2F;14-introduction-to-linux-control-groups-cgroups" rel="nofollow">https:&#x2F;&#x2F;sysadmincasts.com&#x2F;episodes&#x2F;14-introduction-to-linux-...</a><p>#24 - Introduction to Containers on Linux using LXC<p><a href="https:&#x2F;&#x2F;sysadmincasts.com&#x2F;episodes&#x2F;24-introduction-to-containers-on-linux-using-lxc" rel="nofollow">https:&#x2F;&#x2F;sysadmincasts.com&#x2F;episodes&#x2F;24-introduction-to-contai...</a>
评论 #25010062 未加载
评论 #25009191 未加载
评论 #25014122 未加载
评论 #25010997 未加载
评论 #25009947 未加载
评论 #25011033 未加载
评论 #25009169 未加载
jeffbee超过 4 年前
These things should strive for accuracy and this article is not accurate. The cgroups facility does not control &quot;the number of CPU shares per process.&quot; Although you can put such a thing into effect with control groups, it&#x27;s more accurate to say that a control group limits the resources of a set of tasks. Those tasks may be from one or several processes, and it&#x27;s also the case that a single process can divide its own tasks into several cgroups.
评论 #25009431 未加载
评论 #25009345 未加载
aschatten超过 4 年前
This is Part I from a series. Part II: <a href="https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-two" rel="nofollow">https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-two</a> Part III: <a href="https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-three" rel="nofollow">https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-three</a> Part IV: <a href="https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-four" rel="nofollow">https:&#x2F;&#x2F;www.redhat.com&#x2F;sysadmin&#x2F;cgroups-part-four</a>
评论 #25014528 未加载
flexops超过 4 年前
Found an interesting ongoing blogpost series that also tries to explain all the other low level kernel mechanism that make up Docker and other container technologies on Linux. They haven&#x27;t reach the topic of control groups though.<p><a href="https:&#x2F;&#x2F;www.schutzwerk.com&#x2F;en&#x2F;43&#x2F;posts&#x2F;linux_container_intro&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.schutzwerk.com&#x2F;en&#x2F;43&#x2F;posts&#x2F;linux_container_intro...</a>
评论 #25011042 未加载
grantseltzer超过 4 年前
I wrote a blog post on cgroups a couple years ago that&#x27;s still accurate and goes further into depth and gives workable examples of using them both inside and outside of containers: <a href="https:&#x2F;&#x2F;www.grant.pizza&#x2F;blog&#x2F;understanding-cgroups&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.grant.pizza&#x2F;blog&#x2F;understanding-cgroups&#x2F;</a>
musicale超过 4 年前
I like the cgroups approach because it seems to logically build on the established idea of process groups.<p>I also tend to think that processes in cgroups are a sweet spot of lightweight containerization that can do quite a bit.
ape4超过 4 年前
systemd uses cgroups so nearly every Linux box is using them.
dianhuji1超过 4 年前
so great info
meatspaceping超过 4 年前
Conspiracy theory. our kubernetes clusters as a service are not really running on VMs.
craigsmansion超过 4 年前
Ah yes, &quot;cgroups&quot;, according to notable no-nonsense kernel hacker Al Viro:<p>&quot;it&#x27;s not just badly written kernel&#x2F;cgroup.c - the interfaces on <i>both</i> sides (userland and the rest of kernel) are seriously misdesigned. As far as I&#x27;m concerned, configuring it out solves my problem nicely.&quot;<p>That was in 2011, so things might have improved. What remains however is that cgroups was added to the kernel, by Googlers, for easier maintenance, but with an implicit understanding that no sane person would actually make use of it to do something important.<p>... enter SystemD.
评论 #25017889 未加载
评论 #25010665 未加载