CPU limits don't work on RaspberryPi2 #2361

Closed
om26er opened this Issue Sep 11, 2016 · 2 comments

Comments

Projects
None yet
3 participants

om26er commented Sep 11, 2016

Required information

  • Distribution: Ubuntu
  • Distribution version: 16.04.1
  • The output of "lxc info":
apiextensions:
- storage_zfs_remove_snapshots
- container_host_shutdown_timeout
- container_syscall_filtering
- auth_pki
- container_last_used_at
- etag
- patch
- usb_devices
- https_allowed_credentials
apistatus: stable
apiversion: "1.0"
auth: trusted
environment:
  addresses:
  - 10.193.98.1:8443
  - 192.168.1.99:8443
  architectures:
  - armv7l
  certificate: |
    -----BEGIN CERTIFICATE-----
    MIIFozCCA4ugAwIBAgIQSt+UTECFVR6gke9JL7ejuDANBgkqhkiG9w0BAQsFADA5
    MRwwGgYDVQQKExNsaW51eGNvbnRhaW5lcnMub3JnMRkwFwYDVQQDDBByb290QHJh
    c3BiZXJyeXBpMB4XDTE2MDkxMDExNDg0NFoXDTI2MDkwODExNDg0NFowOTEcMBoG
    A1UEChMTbGludXhjb250YWluZXJzLm9yZzEZMBcGA1UEAwwQcm9vdEByYXNwYmVy
    cnlwaTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALRqfByZjivLXFS7
    7IrMJECq0dMWkJZ05sLxRv3mcdp1+Z+btdmsp3TYvPEihWEkUFdHZDCkxBOE4Qmf
    HpyerxlXLyiTxXHh6Nii4k62H+Pcad+3I5Um8T+E+/FQEzIjFyLVqJhgmgOGU+IV
    CutnQe2W+jog7/LJuSSUWt4yVVs21mF/do/AOWG3vHSyuuIKDxYk3xMNt+OdbhqS
    Yag/+x90JbkdyXlRLIH5tRSeMLRCgr8A71kNALoKVFInwf11d8+ecNNGCOsmYjxE
    gq5B1liIs0rL+ysO4r85iBY1iUnBna+1fwPrHXajDoJNccEXOQieqxsE8unCwUBM
    lHjLDOvf1RmYAwIVJzLPy7f1IbX47OUyY4ly+zLc+W5ghAU8mf8S3/7RyXOimyvd
    MjM4AShb+ZS9Qwrw3uty12dHIoo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kI+ZJdYr/UXskk2axWziwDKZw
    EXhuivlNn2I2lEqIDhx5mIFXU+G4RLawT03EjGqmNxd+cowRsEPL+XHce7fu7m2a
    H3AaNQD4/o9hW9uXHTGUGuQhvGgaSC4CQfHiyGOLRCqT7PA+iPD03KkuWmoYhsSp
    +hyfPsvrpg==
    -----END CERTIFICATE-----
  certificatefingerprint: d53952c9a4ced2c1f3f9fa2154890d935cefac9366bedc850cbd04a3e6a5e674
  driver: lxc
  driverversion: 2.0.4
  kernel: Linux
  kernelarchitecture: armv7l
  kernelversion: 4.4.0-1021-raspi2
  server: lxd
  serverpid: 3155
  serverversion: "2.1"
  storage: dir
  storageversion: ""
config:
  core.https_address: 0.0.0.0:8443
  core.trust_password: true
public: false

Issue description

CPU limits config does not work on a RPi2. My all 4 cores are always exposed to my containers

Steps to reproduce

lxc config set xenial limits.cpu 1
lxc start xenial
lxc shell xenial
$ cat /proc/cpuinfo | grep ^
   processor    : 0
   processor    : 1
   processor    : 2
   processor    : 3

Information to attach

@om26er om26er changed the title from CPU limits don't work on RaspberryPi to CPU limits don't work on RaspberryPi2 Sep 11, 2016

rst0git commented Sep 11, 2016

Hi,
You have received the warning message in the log files:
"Couldn't find the CGroup CPUset controller, CPU pinning will be ignored"

#1554 --> Try to install apt-get install cgroups-lite

Also you can see in the source code here -> https://github.com/lxc/lxd/blob/master/lxd/daemon.go#L647
that this warning is resieved when the path "/sys/fs/cgroup/cpuset/" does not exist.

:) Hope this helps

Owner

stgraber commented Sep 11, 2016

The fact that you only received two warnings instead of one for every controller, suggests that your kernel just doesn't have support for the pids and cpuset controllers which is a bit weird given that the other Ubuntu 4.4 kernels sure do.

So I'd recommend you check /proc/mounts to make sure that all the other controllers are mounted (by systemd) and if that's the case, then file a bug against the Ubuntu rpi2 kernel to have them enable those two cgroup controllers.

@stgraber stgraber closed this Sep 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment