CPU usage limit to systemd-nspawn container is not working

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

 



Hi Colin,
Yes missing . was just a typo. I tried override.conf in /etc/systemd/system/systemd-nspawn at appscont.service.d/, still I do not see any change in CPU utilization.
Container processes(sh and sha1sum)  are using 50% CPU irrespective of CPUQuota in  ExecStart=/usr/bin/systemd-nspawn --quiet --boot --link-journal=try-guest --machine=%i -n --property=CPUQuota=5% 
I tried CPUQuota=5% under service section in override.conf instead of ExecStart, still the CPU usage is 50%
And also I tried both in ExecStart as well as separate entry of CPUQuota=5% under service section after ExecStart, still the CPU usage is 50%
Attached the systemd-cgls output for machine.slice.


Regards
Mahipal 

    On Thursday, 19 July, 2018, 10:41:14 AM GMT-4, Colin Guthrie <gmane at colin.guthr.ie> wrote:  
 
 patlollamahipal at yahoo.co.in wrote on 18/07/18 21:04:
> *override.conf* is effective when it is placed in
> */etc/systemd/system/systemd-nspawn at service.d/*

I think you missed a . above:
/etc/systemd/system/systemd-nspawn at .service.d/*
> 
> If I have file
> *systemd-nspawn at appscont.service *in */etc/systemd/system.control/systemd-nspawn at appscont.service.d,
> *it is not effective, it's using the template file.

there is no system.control folder.

You should place a file called override.conf (or anything.conf) in a
folder: /etc/systemd/system/systemd-nspawn at appscont.service.d/ if you
want the overrides defined in the .conf file to only apply to that one
machine.

All the best and HTHs

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180719/a170f7c8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: machine.slice.JPG
Type: image/jpeg
Size: 85019 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180719/a170f7c8/attachment-0001.jpe>


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux