Re: [systemd-devel] Parent slices and resource control

2020-06-03 Thread Jérémy ROSEN
man pages are part of the systemd repository at github
so change it where you think it's the most appropriate and submit a
pull-request there

Thx for the help

Le mar. 2 juin 2020 à 17:49, Patrick Dimond  a écrit :

> On Mon, Jun 01, 2020 at 12:22:03PM +0200, Lennart Poettering wrote:
> > Consider this tree:
> >
> > -.slice
> > `- foo.slice
> > |  `- miau.service
> > `- bar.slice
> > |  `- bar-quux.slice
> > |  |  `- daemon.service
> > |  |  `- otherdaemon.service
> > |  `- bar-uuu.slice
> > | ` rumpel.service
> > `- zzz.slice
> >`- zzz-yyy.slice
> >   `- wuff.service
> >
> > And now you turn on memory accounting in daemon.service. This would
> > then propagate up the three, so you get memory accounting on all its
> > parents too: bar-quux.slice, bar.slice and -.slice. And you will get
> > it turned on forthe units immediately in throse, i.e. also in
> > otherdaemon.service, bar-uuu.slice, foo.slice, zzz.slice. However, it
> > will not be turned on in: miau.service, rumpel.service, zzz-yyy.slice
> > and wuff.service, since those are neither in the path to the root
> > slice nor immediately inside any of those slices.
> >
> > Makes sense?
> >
> > Lennart
> >
> > --
> > Lennart Poettering, Berlin
>
> Yes! The diagram really helped.
>
> I think including a diagram like that would be helpful for others too.
> I'm not sure where it should live or what the process is, but I'd be
> happy to put in the work to make that happen.
>
> Thanks,
> Pat
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>


-- 
[image: SMILE]  

20 rue des Jardins
92600 Asnières-sur-Seine
*Jérémy ROSEN*
Architecte technique

[image: email] jeremy.ro...@smile.fr
[image: phone]  +33 6 88 25 87 42
[image: url] http://www.smile.eu

[image: Twitter]  [image: Facebook]
 [image: LinkedIn]
 [image: Github]


[image: Découvrez l’univers Smile, rendez-vous sur smile.eu]

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Parent slices and resource control

2020-06-02 Thread Patrick Dimond
On Mon, Jun 01, 2020 at 12:22:03PM +0200, Lennart Poettering wrote:
> Consider this tree:
> 
> -.slice
> `- foo.slice
> |  `- miau.service
> `- bar.slice
> |  `- bar-quux.slice
> |  |  `- daemon.service
> |  |  `- otherdaemon.service
> |  `- bar-uuu.slice
> | ` rumpel.service
> `- zzz.slice
>`- zzz-yyy.slice
>   `- wuff.service
> 
> And now you turn on memory accounting in daemon.service. This would
> then propagate up the three, so you get memory accounting on all its
> parents too: bar-quux.slice, bar.slice and -.slice. And you will get
> it turned on forthe units immediately in throse, i.e. also in
> otherdaemon.service, bar-uuu.slice, foo.slice, zzz.slice. However, it
> will not be turned on in: miau.service, rumpel.service, zzz-yyy.slice
> and wuff.service, since those are neither in the path to the root
> slice nor immediately inside any of those slices.
> 
> Makes sense?
> 
> Lennart
> 
> --
> Lennart Poettering, Berlin

Yes! The diagram really helped. 

I think including a diagram like that would be helpful for others too.
I'm not sure where it should live or what the process is, but I'd be 
happy to put in the work to make that happen.

Thanks,
Pat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Parent slices and resource control

2020-06-01 Thread Lennart Poettering
On So, 31.05.20 14:36, Patrick Dimond (m...@ptrckd.com) wrote:

> 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?


Consider this tree:

-.slice
`- foo.slice
|  `- miau.service
`- bar.slice
|  `- bar-quux.slice
|  |  `- daemon.service
|  |  `- otherdaemon.service
|  `- bar-uuu.slice
| ` rumpel.service
`- zzz.slice
   `- zzz-yyy.slice
  `- wuff.service

And now you turn on memory accounting in daemon.service. This would
then propagate up the three, so you get memory accounting on all its
parents too: bar-quux.slice, bar.slice and -.slice. And you will get
it turned on forthe units immediately in throse, i.e. also in
otherdaemon.service, bar-uuu.slice, foo.slice, zzz.slice. However, it
will not be turned on in: miau.service, rumpel.service, zzz-yyy.slice
and wuff.service, since those are neither in the path to the root
slice nor immediately inside any of those slices.

Makes sense?

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Parent slices and resource control

2020-05-31 Thread Patrick Dimond
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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel