<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/">
  <channel>
    <title>cgroups</title>
    <link>https://www.linuxjournal.com/</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>CGroup Interactions</title>
  <link>https://www.linuxjournal.com/content/cgroup-interactions</link>
  <description>  &lt;div data-history-node-id="1340595" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/zack-brown" lang="" about="https://www.linuxjournal.com/users/zack-brown" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Zack Brown&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
&lt;strong&gt;CGroups&lt;/strong&gt; are under constant development, partly because they form the core of
many commercial services these days. An amazing thing about this is that they
remain an unfinished project. Isolating and apportioning system elements is an
ongoing effort, with many pieces still to do. And because of security concerns,
it never may be possible to present a virtual system as a fully
independent system. There always may be compromises that have to be made.
&lt;/p&gt;

&lt;p&gt;
Recently, &lt;strong&gt;Andrey Ryabinin&lt;/strong&gt; tried to fix what he felt was a problem with how
CGroups dealt with low-memory situations. In the current kernel, low-memory
situations would cause Linux to recuperate memory from all CGroups equally. But
instead of being fair, this would penalize any CGroup that used memory
efficiently and reward those CGroups that allocated more memory than they
needed.
&lt;/p&gt;

&lt;p&gt;
Andrey's solution to this was to have Linux recuperate unused memory from
CGroups that had it, before recuperating any from those that were in heavy use.
This would seem to be even less fair than the original behavior, because only
certain CGroups would be targeted and not others.
&lt;/p&gt;

&lt;p&gt;
Andrey's idea garnered support from folks like &lt;strong&gt;Rik van Riel&lt;/strong&gt;. But not everyone
was so enthralled. &lt;strong&gt;Roman Gushchin&lt;/strong&gt;, for example, pointed out that the
distinction between active and unused memory was not as clear as Andrey made it
out to be. The two of them debated this issue quite a bit, because the whole
issue of fair treatment hangs in the balance. If Andrey's whole point is to
prevent CGroups from "gaming the system" to ensure more memory for themselves,
then the proper approach to low-memory conditions depends on being able to
identify clearly which CGroups should be targeted for reclamation and which
should be left alone.
&lt;/p&gt;

&lt;p&gt;
At the same time, the situation could be seen as a security concern, with an
absolute need to protect independent CGroups from each other. If so, something
like Andrey's patch would be necessary, and many more security-minded
developers would start to take an interest in getting the precise details
exactly right.
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: if you're mentioned above and want to post a response above the comment section, send a message with your response text to ljeditor@linuxjournal.com.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/cgroup-interactions" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 14 May 2019 12:00:00 +0000</pubDate>
    <dc:creator>Zack Brown</dc:creator>
    <guid isPermaLink="false">1340595 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Everything You Need to Know about Linux Containers, Part I: Linux Control Groups and Process Isolation</title>
  <link>https://www.linuxjournal.com/content/everything-you-need-know-about-linux-containers-part-i-linux-control-groups-and-process</link>
  <description>  &lt;div data-history-node-id="1339985" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/petros-koutoupis" lang="" about="https://www.linuxjournal.com/users/petros-koutoupis" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Petros Koutoupis&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;&lt;em&gt;
Everyone's heard the term, but what exactly are containers?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
The software enabling this
technology comes in many forms, with Docker as the most popular. The
recent rise in popularity of container technology within the data center is a direct result of its
portability and ability to isolate working environments, thus limiting
its impact and overall footprint to the underlying computing system.
To understand the technology completely, you first
need to understand the many pieces that make it all
possible.
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sidenote: people often ask about the difference between containers and virtual machines. Both have a specific purpose and place with very little overlap, and one doesn't obsolete the other. A container is meant to be a lightweight environment that you spin up to host one to a few isolated applications at bare-metal performance. You should opt for virtual machines when you want to host an entire operating system or ecosystem or maybe to run applications incompatible with the underlying environment.&lt;/em&gt;
&lt;/p&gt;

&lt;span class="h3-replacement"&gt;
Linux Control Groups&lt;/span&gt;

&lt;p&gt;
Truth be told, certain software applications in the wild
may need to be controlled or limited—at least for the sake of stability
and, to some degree, security. Far too often, a bug or just bad code can disrupt
an entire machine and potentially cripple an entire ecosystem. Fortunately,
a way exists to keep those same applications in check. Control groups
(cgroups) is a kernel feature that limits, accounts for and isolates the CPU,
memory, disk I/O and network's usage of one or more processes.
&lt;/p&gt;

&lt;p&gt;
Originally developed by Google, the cgroups technology eventually would find
its way to the Linux kernel mainline in version 2.6.24 (January 2008). A
redesign of this technology—that is, the addition of kernfs (to split some
of the sysfs logic)—would be merged into both the 3.15 and 3.16 kernels.
&lt;/p&gt;

&lt;p&gt;
The primary design goal for cgroups was to provide a unified interface to
manage processes or whole operating-system-level virtualization, including
Linux Containers, or LXC (a topic I plan to revisit in more detail in a
follow-up article). The cgroups framework provides the following:
&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
&lt;strong&gt;Resource limiting:&lt;/strong&gt;
a group can be configured not to exceed a specified memory limit or use more
than the desired amount of processors or be limited to specific peripheral
devices.
&lt;/li&gt;

&lt;li&gt;
&lt;strong&gt;Prioritization:&lt;/strong&gt;
one or more groups may be configured to utilize fewer or more CPUs or disk
I/O throughput.
&lt;/li&gt;

&lt;li&gt;
&lt;strong&gt;Accounting:&lt;/strong&gt;
a group's resource usage is monitored and measured.
&lt;/li&gt;

&lt;li&gt;
&lt;strong&gt;Control:&lt;/strong&gt;
groups of processes can be frozen or stopped and restarted.
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;
A cgroup can consist of one or more processes that are all bound to the same
set of limits. These groups also can be hierarchical, which means that a
subgroup inherits the limits administered to its parent group.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/everything-you-need-know-about-linux-containers-part-i-linux-control-groups-and-process" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 21 Aug 2018 12:15:15 +0000</pubDate>
    <dc:creator>Petros Koutoupis</dc:creator>
    <guid isPermaLink="false">1339985 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
