I have been searching for a while for information about how services are assigned to slices - it seems to be a very elusive subject, or maybe I'm not asking the right questions. I've come across How does systemd put sshd processes in slices?, which asks a similar question, but doesn't get an answer.
So, to be more concrete: Say, I want to control how much memory mysqld can grab. I know that there is a service file: mysql.service
, and there are slice files, like system.slice
etc. With systemd-cgls
I can see mysql.service
is listed under system.slice
, but if I wanted to create a new slice, say db.slice
, and put the mysql service into that one, how would I do that? Or if that is not the right way, how about system-db.slice
?