Difference between revisions of "Cgroups"

From wikieduonline
Jump to navigation Jump to search
Line 17: Line 17:
 
==Basic Commands==  
 
==Basic Commands==  
 
*Create a group : <code>[[cgcreate]] -g memory:myGroup</code>  
 
*Create a group : <code>[[cgcreate]] -g memory:myGroup</code>  
 +
*<code>[[cgexec]] -g memory:myGroup YOUR_PROGRAM_TO_EXEC</code>
  
*<code>[[cgexec]] -g memory:myGroup YOUR_PROGRAM_TO_EXEC</code>
 
  
 
* You can use <code>[[cgget]]</code> to view the current limits, usage, & high watermarks of the group:
 
* You can use <code>[[cgget]]</code> to view the current limits, usage, & high watermarks of the group:

Revision as of 08:10, 29 May 2020

This article is a Draft. Help us to complete it.

Pacakges

cgroups functionality that was released in Linux Kernel version 2.6.24

Packages:


systemd-cgls
systemd-cgls memory
systemd-cgtop

Basic Commands

  • Create a group : cgcreate -g memory:myGroup
  • cgexec -g memory:myGroup YOUR_PROGRAM_TO_EXEC


  • You can use cgget to view the current limits, usage, & high watermarks of the group:
sudo cgget -g memory:/myGroup|grep bytes 
memory.kmem.tcp.usage_in_bytes: 0
memory.soft_limit_in_bytes: 9223372036854771712
memory.kmem.tcp.max_usage_in_bytes: 0
memory.max_usage_in_bytes: 0
memory.limit_in_bytes: 9223372036854771712
memory.kmem.max_usage_in_bytes: 0
memory.usage_in_bytes: 0
memory.kmem.limit_in_bytes: 9223372036854771712
memory.kmem.usage_in_bytes: 0
memory.kmem.tcp.limit_in_bytes: 9223372036854771712

I/O control, more accurate cgroup I/O control with blk-iocost[1]

Related terms

Activities

See also

  • https://kernelnewbies.org/Linux_5.4#More_accurate_cgroup_I.2FO_control_with_blk-iocost
  • https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html
  • Advertising: