Score:0

Why are processors seemingly so active on an Ubuntu 20.04 Server with no appreciable services running in an LXC container?

bd flag

On a minimal Ubuntu 20.04 server that's just been set up (and with some services disabled), I'm finding that htop is conveying that there's more processor activity going on than what I figure should be happening and I'm not sure if (in this unprivileged LXC container) it's picking up activity from other peer virtual machines and containers or if Ubuntu is just behaving very badly.

Here's a short screencast to illustrate: screen capture

I have 16 cores (out of 24 on the server) assigned to this LXC ct.

htop is at version 2.2.0.

config file contents:

lxc.cgroup.relative = 0
lxc.cgroup.dir.monitor = lxc.monitor/101
lxc.cgroup.dir.container = lxc/101
lxc.cgroup.dir.container.inner = ns
lxc.arch = amd64
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.include = /usr/share/lxc/config/ubuntu.userns.conf
lxc.seccomp.profile = /var/lib/lxc/101/rules.seccomp
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.mount.auto = sys:mixed
lxc.monitor.unshare = 1
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
lxc.tty.max = 2
lxc.environment = TERM=linux
lxc.uts.name = HOSTNAME
lxc.cgroup2.memory.max = 25769803776
lxc.cgroup2.memory.swap.max = 17179869184
lxc.rootfs.path = /var/lib/lxc/101/rootfs
lxc.net.0.type = veth
lxc.net.0.veth.pair = veth101i0
lxc.net.0.hwaddr = 14:5A:59:1A:BA:25
lxc.net.0.name = eth0
lxc.net.0.script.up = /usr/share/lxc/lxcnetaddbr
lxc.cgroup2.cpuset.cpus = 0-1,3,5,7,9-11,13,15-19,21-22
James S. avatar
de flag
Do you have sixteen cores assigned to your container? What version of htop are you running? post your container config?
bd flag
@JamesS. modified question as requested.
James S. avatar
de flag
You're running a *16*core container with *24G*RAM? out of curiosity, what are you running in that beast?
bd flag
Just testing it out, but probably PostgreSQL.
James S. avatar
de flag
:D savage. Is your container a *full* 20.04 environment, with shells and services and whatnot, or is it stripped bare as one would expect in say, a Docker image?
bd flag
It is the default that comes from the LXC image from Proxmox which in turn comes from https://images.linuxcontainers.org/. So yeah, it's a minimal install as you can see, but I just enabled SSHd on it and can do anything - including run a GUI if I wanted to.
James S. avatar
de flag
I mean, if you're looking at htop already, what does it show you when you F6 and sort by CPU%?
bd flag
@JamesS. that's the view I'm giving there in my short screencast... :)
James S. avatar
de flag
LOL sure enough, sorry. Anyhow, I'm not sure I can help much - this is a very weird container. I'm much more used to many, *MANY* very tiny ones (<25MB) doing *exactly one thing* while this seems to be a full-fledged OS environment, with services and schedulers
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.