CSET-SET(1)

πŸ’– CSET-SET(1) β€” the cset-set era πŸ’–

okay bestie, gather round, because this is the manual page for cset-set from the cset family (yes, the CSET-SET(1) girlies know) and she's here to help you manage sets of cpus. no cap, it's genuinely useful. let's go 🫢


✨ NAME ✨

cset-set β€” manage sets of cpus πŸ’…


🌸 SYNOPSIS 🌸

cset [cset options] set [set options] [args]
cset set --help
cset set
cset set --recurse
cset set --list myset
cset set myset
cset set --recurse --list myset
cset set --cpu 2-5 --mem 0 --set newset
cset set --cpu 2-5 newset
cset set --cpu 1,2,5-7 another_set
cset set --destroy newset
cset set --destroy /mygroup_sets/my_set

like, that's the whole vibe right there ⭐


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” prints the list of options for this command. your lil cheat sheet, literally.
  • -l, --list β€” list the named cpuset(s); if -r is used, will list recursively. so -l alone = just that one set, -l -r = the whole tree, main character energy 🌈
  • -c CPUSPEC, --cpu=CPUSPEC β€” create or modify cpuset in the specified cpuset with the CPUSPEC specification. this is the one that decides which CPUs are in the group 🧚
  • -m MEMSPEC, --mem=MEMSPEC β€” specify which memory nodes to assign to the created or modified cpuset. memory node lore fr fr.
  • -d, --destroy β€” destroy specified cpuset. πŸ’€ gone, reduced to atoms. (more on where the tasks go down in DESCRIPTION, don't panic)
  • -s CPUSET, --set=CPUSET β€” specify cpuset name to be acted on. this is your "who are we talking about" flag 🎯
  • -r, --recurse β€” do recursive listing, for use with --list. pairs with -l like a bestie duo πŸ’œ
  • -v, --verbose β€” prints more detailed output, for the set command, using this flag will not chop listing to fit in 80 columns. so if your terminal is wide and you want the whole tea, use this πŸ‘‘
  • --cpu_exclusive β€” mark this cpuset as owning its CPUs exclusively. only this set gets to claim them, periodt.
  • --mem_exclusive β€” mark this cpuset as owning its MEMs exclusively. same energy but for memory nodes ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

This command is used to create, modify, and destroy cpusets. Cpusets form a tree-like structure rooted at the root cpuset which always includes all system CPUs and all system memory nodes. like a family tree but for CPUs and it's giving very organized 🌳

A cpuset is an organizational unit that defines a group of CPUs and a group of memory nodes where a process or thread (i.e. task) is allowed to run on. For non-NUMA machines, the memory node is always 0 (zero) and cannot be set to anything else. For NUMA machines, the memory node can be set to a similar specification as the CPU definition and will tie those memory nodes to that cpuset. You will usually want the memory nodes that belong to the CPUs defined to be in the same cpuset. iykyk πŸ“

A cpuset can have exclusive right to the CPUs defined in it. This means that only this cpuset can own these CPUs. Similarly, a cpuset can have exclusive right to the memory nodes defined in it. This means that only this cpuset can own these memory nodes. no sharing, no borrowing, no "can i have a turn" πŸ™ˆ

Cpusets can be specified by name or by path; however, care should be taken when specifying by name if the name is not unique. This tool will generally not let you do destructive things to non-unique cpuset names. thank u cset, protective king 🫢

Cpusets are uniquely specified by path. The path starts at where the cpusets filesystem is mounted so you generally do not have to know where that is. For example, so specify a cpuset that is called "two" which is a subset of "one" which in turn is a subset of the root cpuset, use the path "/one/two" regardless of where the cpusets filesystem is mounted. cute, no mount-path homework required πŸ’–

When specifying CPUs, a so-called CPUSPEC is used. The CPUSPEC will accept a comma-separated list of CPUs and inclusive range specifications. For example, --cpu=1,3,5-7 will assign CPU1, CPU3, CPU5, CPU6, and CPU7 to the specified cpuset. slay, that's five CPUs bestie ⭐

Note that cpusets follow certain rules. For example, children can only include CPUs that the parents already have. If you do not follow those rules, the kernel cpuset subsystem will not let you create that cpuset. For example, if you create a cpuset that contains CPU3, and then attempt to create a child of that cpuset with a CPU other than 3, you will get an error, and the cpuset will not be active. The error is somewhat cryptic in that it is usually a "Permission denied" error.

⚠️ okay so this part is important: that "Permission denied" message is not you being bad at permissions. it's the kernel going "girl, that CPU isn't your parent's." it's cryptic and it's not your fault, but the cpuset will not be active.

Memory nodes are specified with a MEMSPEC in a similar way to the CPUSPEC. For example, --mem=1,3-6 will assign MEM1, MEM3, MEM4, MEM5, and MEM6 to the specified cpuset. same recipe, different pantry 🌸

Note that if you attempt to create or modify a cpuset with a memory node specification that is not valid, you may get a cryptic error message, "No space left on device", and the modification will not be allowed.

⚠️ and yeah, "No space left on device" here does not mean your disk is full. it's the cryptic way the memory node spec being invalid shows up. modification = not allowed. periodt.

When you destroy a cpuset, then the tasks running in that set are moved to the parent of that cpuset. If this is not what you want, then manually move those tasks to the cpuset of your choice with the cset proc command (see cset proc --help for more information). so like, destruction is not a task-apocalypse, they just go live with the parent 🏠

🌈 EXAMPLES 🌈

Create a cpuset with the default memory specification:

# cset set --cpu=2,4,6-8 --set=new_set

This command creates a cpuset called "new_set" located off the root cpuset which holds CPUS 2,4,6,7,8 and node 0 (interleaved) memory. Note that --set is optional, and you can just specify the name for the new cpuset after all arguments.

Create a cpuset that specifies both CPUs and memory nodes:

# cset set --cpu=3 --mem=3 /rad/set_one

Note that this command uses the full path method to specify the name of the new cpuset "/rad/set_one". It also names the new cpuset implicitly (i.e. no --set option, although you can use that if you want to). If the "set_one" name is unique, you can subsequently refer to is just by that. Memory node 3 is assigned to this cpuset as well as CPU 3.

The above commands will create the new cpusets, or if they already exist, they will modify them to the new specifications. so it's create-or-update, the ✨idempotent✨ dream πŸ’…


πŸ“œ LICENSE πŸ“œ

Cpuset is licensed under the GNU GPL V2 only. that's "only", bestie, no later versions, read the label πŸ‘‘


Copyright (c) 2008-2011 Novell Inc.


πŸ–ŠοΈ AUTHOR πŸ–ŠοΈ

Written by Alex Tsariounov <tsariounov@gmail.com>.


πŸ‘€ SEE ALSO πŸ‘€


πŸ–ŠοΈ AUTHOR πŸ–ŠοΈ

Alex Tsariounov <tsariounov@gmail.com>

  • Author.

and that's the whole page bestie!! this was cset-set(1), version 1.5.8, dated March 2016 β€” go forth and partition those CPUs with main character energy πŸ‘‘πŸ’–πŸ¦‹