Re: Transitioning scripts relying on libcgroup-tools to the cgroup’s unified hierarchy (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > On 12/05/2020 15:06, virgo wrote:
> > 
> > ...
> > 
> >  Let’s say I want to compile `pandoc` with modifications of my own and
> > 
> > many non-
> > 
> >  default compiler options. At the same time, on the same machine, I still
> >  want
> >  to do other stuff. `cgexec` et al. helped a lot to cap the memory and CPU
> >  usage of tasks like that, without needing container and virtual machines
> >  setups. Nowadays, I am into `systemd-nspawn` because it requires minimal
> >  configuration from my end. It is still a hammer deployed to kill an ant.
> >  In pages like>
> >  
> >  `systemd.resource-control(5)`, one can read:
> >       See the New Control Group Interfaces[1] for an introduction on how
> >       to
> >  
> >  **make use of resource control APIs from programs.**
> >  
> >  Great! But I do not know how to make programs consuming those APIs. The
> >  tools
> >  talked about in this thread helped a lot and I am searching for
> >  replacement
> >  that would fit with my low-proficiency in Devops.
> 
> Well the easy way is not to use any programmatic APIs but just
> 
> use systemd-run instead, for example:
>    systemd-run --user --scope -p MemoryHigh=1M make
> 
> Will run make with the MemoryHigh property (documented on the
> man page you mentioned) set to a specified value.
Okay, I think that clear things up: the impediment I had was the `units` 
vocabulary found everywhere and my reluctance to create service files. What I 
take from your message is that fields that can be found inside a unit can also 
be passed on the CLI to systemd-run. I will try that.

Once again, thank you, and Lennart, and Petr, I never doubt people around 
these corners would have **the** solutions!
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux