damentz / liquorix-package

Liquorix Debian Package
https://liquorix.net
GNU General Public License v2.0
288 stars 23 forks source link

Not working with docker #34

Closed kzxt closed 4 years ago

kzxt commented 4 years ago
level=warning msg="Your kernel does not support cgroup blkio throttle.read_iops_device"
level=warning msg="Your kernel does not support cgroup blkio throttle.write_iops_device"

OCI runtime create failed: container_linux.go:349: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:415: setting cgroup config for procHooks process caused \\\"process_linux.go:415: setting cgroup config for procHooks process caused \\\\\\\"failed to write \\\\\\\\\\\\\\\"-1\\\\\\\\\\\\\\\" to \\\\\\\\\\\\\\\"/sys/fs/cgroup/cpu/docker/e319117259cec746f6778414007a2cc73eb2b88a9b9149d846733af17c511af4/cpu.cfs_quota_us\\\\\\\\\\\\\\\": open /sys/fs/cgroup/cpu/dockere319117259cec746f6778414007a2cc73eb2b88a9b9149d846733af17c511af4/cpu.cfs_quota_us: permission denied\\\\\\\"\\\"\": unknown ",

It only happens on liquorix.

Configurations:

Ubuntu 20.04 docker 19.03.11 containerd.io 1.2.13 runc 1.0.0-rc10

I'm trying to run a daemon-based game server panel called pterodactyl.io

damentz commented 4 years ago

Hi @kzxt, Liquorix uses MuQSS as its proces scheduler, which doesn't have support or stubs for CPU quotas. You'll need to run pterodactyl in a VM with a kernel that has quota support to get pterodactyl running.

And considering the number of daemons and systems configuration required, I personally wouldn't recommend running Pterodactyl on your desktop if you use it for anything else: https://pterodactyl.io/community/installation-guides/panel/ubuntu2004.html

kzxt commented 4 years ago

Hi @kzxt, Liquorix uses MuQSS as its proces scheduler, which doesn't have support or stubs for CPU quotas. You'll need to run pterodactyl in a VM with a kernel that has quota support to get pterodactyl running.

And considering the number of daemons and systems configuration required, I personally wouldn't recommend running Pterodactyl on your desktop if you use it for anything else: https://pterodactyl.io/community/installation-guides/panel/ubuntu2004.html

Hi @damentz , I'm running on ubuntu server, and that have a separate server for both the panel and daemon (which is only running the docker). The issue is with the daemon side that requires CFS.

Will there be a likelihood of CFS support returning or maybe in a seperate kernel release?

damentz commented 4 years ago

Unfortunately, I'll only return to CFS if there's a way to tune it similar to MuQSS. But it's more likely that if MuQSS becomes unmaintained, I'll seek alternatives like BMQ (https://gitlab.com/alfredchen/linux-prjc).

If you want an experience similar to Liquorix but with a more stock configuration, Jan maintains the official Zen Kernel builds, but they're only officially available for Arch Linux. It's the kernel source that Liquorix is based on, but sticks to Arch's configuration as closely as possible, and it runs CFS.

Now here's the more important thing, I think it's worth your time to ask the Pterodactyl developers to add support for disabling CPU quota support entirely, that's the only thing holding MuQSS based kernels back. You can get the same behavior as CPU quotas by changing your run scripts or init scripts to adjust the daemon nice level. Because containers are just running applications on the same kernel, nice levels still work.

If you need an example, this technique already used in my build scripts for Liquorix: https://github.com/damentz/liquorix-package/blob/7a2ef503a7d2c39e8e7aa636593949ec79853d83/scripts/debian/container_build-binary.sh#L78 https://github.com/damentz/liquorix-package/blob/7a2ef503a7d2c39e8e7aa636593949ec79853d83/scripts/debian/env.sh#L46

HOWEVER! The irony of setting CPU quotas and nice levels for game servers is that you don't ever want to do that. As soon as your game server hits a hardware limit (CPU headroom, memory), the experience in the game will suffer. It's better to focus on hardware provisioning rather than configuring artificial limits or priority levels.

With that said, you can pitch that disabling CPU quota support is important only because once a limit is hit, it's time to upgrade your hardware anyways. Quotas just kick the can down the road and make the users of your game servers suffer in the meantime.

That's of course just my opinion, maybe there is a good argument for CPU quotas on game servers, like clamping down on run-a-way applications, but I personally don't see it. I would personally handle those misbehaving applications case by case rather than put an arbitrary CPU limit on the application before I know I need it.