linux - difference between cgroups and namespaces -


i started learning docker , seems of heavy lifting done linux kernel, using namespaces , cgroups.

a few things finding confusing :

  1. what difference between namespace , cgroup ? different uses cases address ?

  2. what has docker implemented on top these gain popularity ?

  3. i know internals of these features , how implemented.

the proper links 2 notions have been fixed in pr 14307:

under hood, docker built on following components:

the cgroups , namespaces capabilities of linux kernel

with:

  • cgroup: control groups provide mechanism aggregating/partitioning sets of tasks, , future children, hierarchical groups specialized behaviour.
  • namespace: wraps global system resource in abstraction makes appear processes within namespace have own isolated instance of global resource.

in short:

  • cgroups = limits how can use;
  • namespaces = limits can see (and therefore use)

see more @ "anatomy of container: namespaces, cgroups & filesystem magic" jérôme petazzoni.

cgroups involve resource metering , limiting:

  • memory
  • cpu
  • block i/o
  • network

namespaces provide processes own view of system

multiple namespaces:


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -