[systemd-devel] Parent slices and resource control

Patrick Dimond me at ptrckd.com
Sun May 31 21:36:36 UTC 2020


Hi,
I was reading the documentation for systemd.resource-control and came
across this sentence under accounting settings.

"Note that turning on memory accounting for one unit will also 
implicitly turn it on for all units contained in the same slice 
and for all its parent slices and the units contained therein."

What exactly is a parent slice? 

>From systemd.slice
"Slices are organized hierarchically in a tree. The name of the slice
encodes the location in the tree. The name consists of a dash-separated
series of names, which describes the path to the slice from the root
slice. The root slice is named -.slice. Example: foo-bar.slice is a
slice that is located within foo.slice, which in turn is located in the
root slice -.slice."

Does turning on accounting in one slice or service end up turning it on
for everything? Does every slice exist under the root slice?

Thanks for helping me improve my understanding,
Pat


More information about the systemd-devel mailing list