Memory cgroup
Files
memory.usage_in_bytes
memory.limit_in_bytes
memory.memsw.usage_in_bytes
memory.memsw.limit_in_bytes
Bytes Are Easy
Slide 18
Slide 18 text
CPU usage?
cpuacct cgroup
/sys/fs/cgroup/cpuacct/docker/:id
Slide 19
Slide 19 text
Cpuaccnt cgroup
Files
cpuacct.usage
cpuacct.usage_percpu
→ number of nanoseconds allocated to the
container since its start
Slide 20
Slide 20 text
Nanoseconds?
Let's calculate!
Slide 21
Slide 21 text
How to get a CPU percentage?
/proc/stat
User nice system idle iowait irq softirq
7277 51882 500481 6104557 72847 217 168631
Sum of values = CPU usage since
system boot (in 1/100th second)
Slide 22
Slide 22 text
Delta of container usage
= 0-100%
————————————————————
Delta of system usage
How to get a CPU percentage?
Slide 23
Slide 23 text
What are the IO?
blkio cgroup
/sys/fs/cgroup/blkio/docker/:id
→ Bytes read/write by device
Slide 24
Slide 24 text
blkio cgroup
File
blkio.io_service_bytes
Slide 25
Slide 25 text
Namespaces
Networking
Slide 26
Slide 26 text
Not a control group
unfortunately…
Network namespace
Slide 27
Slide 27 text
Network namespace
Monitoring agent in the
namespace
setns() Linux system call