Bug 73685 - RFE: Allow resource controls on systemd-run
Summary: RFE: Allow resource controls on systemd-run
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-16 07:07 UTC by Sandeep Srinivasa
Modified: 2014-03-11 01:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sandeep Srinivasa 2014-01-16 07:07:12 UTC
systemd-run is actually very nifty to run programs in a resource controlled mode. It is pretty much a better "isolate" (http://www.ucw.cz/moe/isolate.1.html).

The problem is that systemd-run does not allow programs to be run with resource controls. I am aware of the --slice parameter, but that is an umbrella resource control:  If I run 5 different programs simultaneously (with differing resource requirements), It does not let me allocate resource control on a per run basis. The other solution suggested to me on IRC was to issue a "systemctl set-property" after firing the systemd-run, which really does not serve the purpose.

I tried passing a .service file to systemd-run (which allows specification of resource controls within it), but it doesnt seem to execute it. In fact, I would argue that systemd-run should simply read in a .service file (which has all the --slice and --scope parameters built in), honor the resource controls and execute it. You can ignore the dependencies, etc. which are not required. All the commandline arguments would be unnecessary.
Comment 1 David Strauss 2014-01-16 23:49:14 UTC
What version of systemd are you running? Resource limit implementations vary widely between the popular releases currently in production.
Comment 2 Sandeep Srinivasa 2014-01-17 17:19:37 UTC
Fedora 20 (I'm new to fedora - coming from debian). Version 208 is what I'm pretty sure it is.
Comment 3 Lennart Poettering 2014-03-11 01:56:14 UTC
This is implemented now in git. See the systemd-run man page, regarding the "-p" switch (there's also an example at the end).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.