Difference between revisions of "Cgcreate"

From wikieduonline
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<code>cgcreate</code> command is included in the <code>[[cgroup-tools]]</code> packages https://linux.die.net/man/1/cgcreate
 
<code>cgcreate</code> command is included in the <code>[[cgroup-tools]]</code> packages https://linux.die.net/man/1/cgcreate
  
 
+
[[Memory]]
 
  cgcreate -g memory:myGroup
 
  cgcreate -g memory:myGroup
 
  echo 500M > /sys/fs/cgroup/memory/myGroup/memory.limit_in_bytes
 
  echo 500M > /sys/fs/cgroup/memory/myGroup/memory.limit_in_bytes
Line 7: Line 7:
 
  [[cgexec]] -g memory:myGroup PROGRAM_TO_EXECUTE
 
  [[cgexec]] -g memory:myGroup PROGRAM_TO_EXECUTE
  
 +
[[CPU]]
 +
cgcreate -g cpu:/cpulimit
  
 
{| class="wikitable"
 
{| class="wikitable"

Revision as of 06:10, 22 May 2020

cgcreate command is included in the cgroup-tools packages https://linux.die.net/man/1/cgcreate

Memory

cgcreate -g memory:myGroup
echo 500M > /sys/fs/cgroup/memory/myGroup/memory.limit_in_bytes
echo 5G > /sys/fs/cgroup/memory/myGroup/memory.memsw.limit_in_bytes
cgexec -g memory:myGroup PROGRAM_TO_EXECUTE

CPU

cgcreate -g cpu:/cpulimit
Controller Can be controlled by user Options
cpu Yes (Requires delegation) CPUAccounting, CPUWeight, CPUQuota, AllowedCPUs, AllowedMemoryNodes
io Yes (Requires delegation) IOWeight, IOReadBandwidthMax, IOWriteBandwidthMax, IODeviceLatencyTargetSec
memory Yes MemoryLow, MemoryHigh, MemoryMax, MemorySwapMax
pids Yes TasksMax
rdma No ?
eBPF No IPAddressDeny, DeviceAllow, DevicePolicy


Related commands

See also

Advertising: