I have/had problems wth limits.memory
setting. (see below). There was a previous thread that had similar issues. Once I completely removed the parameter limits.cpu.allowance
it seems that memory setting gets applied properly.
(OT: p2v script works great: Migrated a old trusty
- works fantastic.)
BTW, in future would it be nice if you can enable % limits for CPU? This way if the infrastructure is upgraded or downgraded by user (or by lxc remote copying) automagically every container will get more or less resources and it will not be needed to retune based on the available CPU or other resources.
Even better would be if lxd can be setup to allocate, for example 25% total system resources to some container. The 'individual settings in https://github.com/lxc/lxd/blob/master/doc/containers.md ’ would be auto calculated by LXD internally and therefore the user will not have to tune-knobs everytime resources are needed or released.
Thanks for the fantastic work!
DBUG[05-04|13:13:46]
{
"architecture": "x86_64",
"config": {
"image.architecture": "amd64",
"image.description": "ubuntu 16.04 LTS amd64 (release) (20180427)",
"image.label": "release",
"image.os": "ubuntu",
"image.release": "xenial",
"image.serial": "20180427",
"image.version": "16.04",
"volatile.base_image": "353b1a2c367ec983fd9d1532171618cd967e96d77a06f6b6e024c39ec010e8d7",
"volatile.eth0.hwaddr": "00:16:3e:c7:76:c0",
"volatile.idmap.base": "0",
"volatile.idmap.next": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536}]",
"volatile.last_state.idmap": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536}]",
"volatile.last_state.power": "RUNNING"
},
"devices": {},
"ephemeral": false,
"profiles": [
"default"
],
"stateful": false,
"description": "",
"created_at": "2018-05-02T16:17:56Z",
"expanded_config": {
"environment.http_proxy": "",
"image.architecture": "amd64",
"image.description": "ubuntu 16.04 LTS amd64 (release) (20180427)",
"image.label": "release",
"image.os": "ubuntu",
"image.release": "xenial",
"image.serial": "20180427",
"image.version": "16.04",
"limits.cpu": "2",
"limits.cpu.allowance": "90%!"(MISSING),
"limits.memory": "2048MB",
"limits.memory.enforce": "soft",
"user.network_mode": "",
"volatile.base_image": "353b1a2c367ec983fd9d1532171618cd967e96d77a06f6b6e024c39ec010e8d7",
"volatile.eth0.hwaddr": "00:16:3e:c7:76:c0",
"volatile.idmap.base": "0",
"volatile.idmap.next": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536}]",
"volatile.last_state.idmap": "[{\"Isuid\":true,\"Isgid\":false,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536},{\"Isuid\":false,\"Isgid\":true,\"Hostid\":165536,\"Nsid\":0,\"Maprange\":65536}]",
"volatile.last_state.power": "RUNNING"
},
"expanded_devices": {
"eth0": {
"name": "eth0",
"nictype": "bridged",
"parent": "lxdbr0",
"type": "nic"
},
"root": {
"path": "/",
"pool": "default",
"type": "disk"
}
},
"name": "xenia",
"status": "Running",
"status_code": 103,
"last_used_at": "2018-05-04T10:27:37.427830847Z"