Skip to main content
deleted 39 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

I am using systemd-nspawn(systemd version 237) in Yocto's embedded Linux environment.

This is the content of /etc/systemd/system/systemd-nspawn\@.service.d/override.conf file

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 is not effective if anyone knows please help. Thank You.

I am using systemd-nspawn(systemd version 237) in Yocto's embedded Linux environment.

This is the content of /etc/systemd/system/systemd-nspawn\@.service.d/override.conf file

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 is not effective if anyone knows please help. Thank You.

I am using systemd-nspawn(systemd version 237) in Yocto's embedded Linux environment.

This is the content of /etc/systemd/system/systemd-nspawn\@.service.d/override.conf file

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 is not effective

formatting
Source Link
Siva
  • 9.3k
  • 9
  • 60
  • 88

I am using systemd-nspawn(systemd version 237) in Yocto's embedded linuxLinux environment.

This is the content of /etc/systemd/system/[email protected]/override.conf/etc/systemd/system/systemd-nspawn\@.service.d/override.conf file

ExecStart=/usr/bin/systemd-nspawn --quiet --boot --link-journal=try-guest --machine=%i -n --property=CPUQuota=10%

ExecStart=/usr/bin/systemd-nspawn --quiet --boot --link-journal=try-guest --machine=%i -n --property=CPUQuota=10% 

I am trying to load the cpuCPU 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 CPUQuotaCPU quota is not effective, if anyone knows please help. Thank You.

I am using systemd-nspawn(systemd version 237) in Yocto's embedded linux environment.

This is the content of /etc/systemd/system/[email protected]/override.conf file

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 CPUQuota is not effective, if anyone knows please help. Thank You.

I am using systemd-nspawn(systemd version 237) in Yocto's embedded Linux environment.

This is the content of /etc/systemd/system/systemd-nspawn\@.service.d/override.conf file

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 is not effective if anyone knows please help. Thank You.

Source Link
enthu
  • 71
  • 1
  • 4

CPU usage limit to systemd-nspawn container is not working

I am using systemd-nspawn(systemd version 237) in Yocto's embedded linux environment.

This is the content of /etc/systemd/system/[email protected]/override.conf file

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 CPUQuota is not effective, if anyone knows please help. Thank You.