Skip to content

Instantly share code, notes, and snippets.

@ethercflow
Last active January 18, 2019 07:21
Show Gist options
  • Select an option

  • Save ethercflow/1e1805d4c28cd9480bd4261bc235088c to your computer and use it in GitHub Desktop.

Select an option

Save ethercflow/1e1805d4c28cd9480bd4261bc235088c to your computer and use it in GitHub Desktop.
cgroup_resource_mgmt_v1
# 1. create a sub group
create -t <tuid>:<tgid> -g cpuset:<gname>
# 2. get nodes and cores of each node
numactl --hardware
# 3. bind one node's cpu to the sub group
cgset -r cpuset.cpus='n1c1, n1c2,...' <gname>
# 4. can limit mem node too (opt)
cgset -r cpuset.mems='0' <gname>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment