CPU usage limit to systemd-nspawn container is not working

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

 



 Hi All,I am using systemd-nspawn(systemd version 237) to create a container in Yocto's embedded Linux environment on Cortex-A53

Content of the file


/etc/systemd/system/systemd-nspawn\@.service.d/override.conf

is[Service]ExecStart=ExecStart=/usr/bin/systemd-nspawn --quiet --boot --link-journal=try-guest --machine=%i -n --property=CPUQuota=10%I am trying to load the CPU with 

sha1sum /dev/zero &


or 


for i in 1 2 3 4; do while : ; do : ; done & done


 inside the container but the top command on host shows that always they are at 50% CPU usage altogether(4 sh processes and one sha1sum process, if only sha1sum process is started, it alone uses 50% if not 10% each)
I am unable to understand if there is any other setting where this 50% limitation is coming from? And why CPU quota passed to systemd-nspawn is not effective?I also tried with /etc/systemd/system/systemd-nspawn at .service.d/cpu.conf, still the same result but if I pass MemoryMax=50M, process gets killed if i try to use more than 50M in total inside the container.If anyone knows please help. Thank You.
Regards
Mahipal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180718/b95822c7/attachment.html>


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

  Powered by Linux