[systemd-devel] machinectl and systemd-nspawn - Settting the CPUQuota from command line

Michal Koutný mkoutny at suse.com
Wed Jul 31 16:45:01 UTC 2024


Hello.

On Wed, Jul 31, 2024 at 10:43:52AM GMT, Joel GUITTET <jguittet.opensource at witekio.com> wrote:
> I used slice files in /etc/systemd/system/ to set some CPUQuota and MemoryMax options to some systemd-containers. Works fine.
> 
> Is it possible to define these options from machinectl / systemd-nspawn command line directly without using the slice file ?

You can try
	systemd-nspawn --property=foo=bar
That'd apply the limit on directly on the container's unit (not a whole
slice).

Does that help?

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240731/5ad55ca9/attachment.sig>


More information about the systemd-devel mailing list