We see performance differences between the host and the containers (which are more slow).
Using htop
or iotop
does not show overloaded server.
In attempt to understand better the difference, we compiled the same cpython interpreter on the host and the container.
Time
output:
# host
real 2m53,592s
user 2m42,104s
sys 0m
# container
real 5m 13.93s
user 4m 40.42s
sys 0m 33.55s
Another thread shows a problem with a configred cpu limit. However, it’s not configured here:
# lxc config show container_name
architecture: x86_64
config:
image.architecture: amd64
image.description: Alpine edge amd64 (20200915_13:00)
image.os: Alpine
image.release: edge
image.serial: "20200915_13:00"
image.type: squashfs
volatile.base_image: b698b9241f4345a9d88a4e08a3719222765ced773b006358fb353fde60420b71
volatile.eth0.host_name: veth4d4d482e
volatile.eth0.hwaddr: 00:16:3e:34:c4:1f
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
volatile.uuid: 3b8c04c8-b897-435f-a71c-ef8e9ce846b5
devices:
root:
path: /
pool: tank
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""
The processors were more or less idle (checked in htop) before the compilation.
They are 8 ‘Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz’.
The lxc and lxd version are 4.18.
Known differences:
- The host runs Debian buster (currently oldstable) and the container runs AlpineLinux.
- The host uses an ext4 partition and the container uses a ZFS storage (named ‘tank’).
How could we understand where the difference comes or how to fix it?