Ramshackles Posted April 19, 2022 Share Posted April 19, 2022 I've been having a slight nuisance with the Pterodactyl panel/daemon, every gameserver container it spins up doesn't show cpu/mem usage. The team behind Pterodactyl says it has something to do with using cgroup v1 and changing it to v2 should correct this issue. Is this possible and if so, are there any negative effects? Issue discussed on Pterodactyl github: https://github.com/pterodactyl/panel/issues/3999 Quote Link to comment
Ssayer Posted June 17, 2022 Share Posted June 17, 2022 I'd like to second this question. I've got the exact same problem with the exact same application. Anybody have any insight on how we might resolve this? Quote Link to comment
PurePariah Posted July 2, 2022 Share Posted July 2, 2022 Having the same issue and would love to know if this fix is possible and how to implement it. Quote Link to comment
ich777 Posted August 1, 2022 Share Posted August 1, 2022 No, that is not possible on Unraid or better speaking Slackware (at least to my knowledge it's not possible on Slackware and Unraid is based on Slackware). Usually you enable cgoup2 with "systemd.unified_cgroup_hierarchy=1" in the boot parameters but that won't work on Unraid/Slackware because it uses init cgroup2 is at least supported on Unraid/Slackware but you simply can't enable it (to check simply execute: "grep cgroup /proc/filesystems") However you can enable cgroup2 after you've booted Unraid but that will not work reliably because you can only mount the controllers in one hierarchy so there is not really much benefit from that, the stats also wont work and even worse the stats from the Docker page won't work either after doing this: Stop the Docker service Execute "mount -t cgroup2 none /sys/fs/cgroup" Start the Docker service again Run "docker info | grep -i cgroup" and you should see that it now uses v2 Also note that Docker needs to be at least on version 20.10+ for this but I would strongly recommend you to not try this on your main server! However if you really want to try I got a build where cgroup v2 is working but I haven't tested it extensively and can't tell if something isn't working... Fell free to contact me if someone got interested. Quote Link to comment
jeaboswell Posted August 1, 2022 Share Posted August 1, 2022 I had made the change to try it out, but discovered that neither Emby, nor Plex would start afterwards. Emby provided an error stating "unable to control /var/run/s6/services". I didn't see anything of note in the Plex logs. If anyone has any ideas as to why that may be happening, I'm all ears. For posterity, I'll just put this here for anyone else that may need to revert the change: Disable cgroup2 Stop the Docker service Execute `umount -t cgroup2 none` Start the Docker service Quote Link to comment
Ssayer Posted August 1, 2022 Share Posted August 1, 2022 Per Parkervcp's comments on Github, the issue is with Unraid's Docker version, not CGroup status. I just updated to 6.11.0-rc2 and can now see resource usage in Pterodactyl Panel, so I'm inclined to agree with that assessment. If you need resource usage to work immediately, upgrading to the RC is an option. Otherwise, you should be good to go when 6.11 is released. 1 Quote Link to comment
ich777 Posted August 1, 2022 Share Posted August 1, 2022 11 minutes ago, Ssayer said: Per Parkervcp's comments on Github, the issue is with Unraid's Docker version, not CGroup status. I just updated to 6.11.0-rc2 and can now see resource usage in Pterodactyl Panel, so I'm inclined to agree with that assessment. If you need resource usage to work immediately, upgrading to the RC is an option. Otherwise, you should be good to go when 6.11 is released. I would not believe everything, there is also more too it sometimes... Does this user even run Unraid? Docker officially supports cgroup2 since Docker v20.10 and this version was included in 6.10.0 and the release date was: 2022-05-07 26 minutes ago, jeaboswell said: I had made the change to try it out, but discovered that neither Emby, nor Plex would start afterwards. Emby provided an error stating "unable to control /var/run/s6/services". I didn't see anything of note in the Plex logs. If anyone has any ideas as to why that may be happening, I'm all ears. For posterity, I'll just put this here for anyone else that may need to revert the change: Yes, exactly, because the control groups are assigned to cgroup1 and you simply can't change the control groups when they are still in use, but as said you can run cgroup2 on Unraid as you can see here: of course everything else is running too like Emby and so on... As said above I haven't tested everything but as far as I can tell everything seems to be working fine. 27 minutes ago, jeaboswell said: Disable cgroup2 Stop the Docker service Execute `umount -t cgroup2 none` Start the Docker service This is also not the proper way to do it, I would always recommend rebooting when messing with the cgroups Quote Link to comment
Ssayer Posted August 1, 2022 Share Posted August 1, 2022 8 minutes ago, ich777 said: I would not believe everything, there is also more too it sometimes... Does this user even run Unraid? I'm inclined to give this particular user some weight, since he is one of Pterodactyl Panel's contributors. Further, since I've done nothing other than install the RC (which included a Docker version update) and container statistics now work, I think it's got decent merit. 8 minutes ago, ich777 said: Docker officially supports cgroup2 since Docker v20.10 and this version was included in 6.10.0 and the release date was: 2022-05-07 From reading the rest of the issue discussion posted in OP, it seems to be an issue with the particular version of Docker bundled in 6.10.3, and doesn't actually have anything to do with the availability of cgroup2. Not sure why this is a point of contention. I simply noted his recommendation and reported my findings. Quote Link to comment
ich777 Posted August 1, 2022 Share Posted August 1, 2022 29 minutes ago, Ssayer said: Further, since I've done nothing other than install the RC (which included a Docker version update) and container statistics now work, I think it's got decent merit. This is actually related to containerd… Anyways glad it is fixed for you with 6.11 Quote Link to comment
CGRFC1872 Posted August 1, 2022 Share Posted August 1, 2022 Thanks for all of the responses everyone. I will upgrade to 6.11 when it is released and hopefully this will resolve the issue Quote Link to comment
gvkhna Posted April 29, 2023 Share Posted April 29, 2023 My `docker info` shows I'm running cgroup 1. Also my `docker stats` has the 0% everything cpu. I've been trying to figure this out for a while but gave up as I would like to see cpu usage of containers. I believe this could be related, and it's a starting point to debug potential issues other's are having with this container as well here: I see in Unraids release notes about enabling cgroup 2 with a "syslinux append line." Can someone describe this procedure in more detail. I'm not as familiar with what exactly that means. Quote ## Version 6.11.0 2022-09-23 ### Improvements ... - Preliminary support for cgroup2. Pass 'unraidcgroup2' on syslinux append line to activate. Found: https://unraid-dl.sfo2.cdn.digitaloceanspaces.com/stable/unRAIDServer-6.11.1-x86_64.txt I'm on the latest Unraid version 6.11.5. Thank you. Quote Link to comment
ich777 Posted April 30, 2023 Share Posted April 30, 2023 11 hours ago, gvkhna said: Can someone describe this procedure in more detail. I'm not as familiar with what exactly that means. It‘s also described here: Quote Link to comment
gvkhna Posted May 4, 2023 Share Posted May 4, 2023 It looks like I'm having issues related to this and not being able to set a "hybrid" cgroup setup. This seems to be issues mostly related to Docker, something Podman doesn't exhibit. So I'm pretty annoyed. I set the following run flags on this container --cgroup-parent=docker.slice --cgroupns private --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run --tmpfs /run/lock --restart=always --log-opt max-size=1m --ulimit nofile=90000:90000 and no volume mount for /sys/fs/cgroup but am getting the following error: Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted It seems setting the systemd.unified_cgroup_hierarchy=0 is the solution but since this is not possible in unraid, it's unclear what to do. As well this kind of setup is getting extremely convoluted just to be able to run systemd in a container. So I'm starting to think again that's probably not worth the headache. @ich777 Do you have any idea of what to do here? I see you're following this type of issue on github for LXC as well? Quote Link to comment
ich777 Posted May 4, 2023 Share Posted May 4, 2023 1 minute ago, gvkhna said: @ich777 Do you have any idea of what to do here? I see you're following this type of issue on github for LXC as well? No, not anymore, the issue was solved by adding cgroupv2 to Unraid. 1 minute ago, gvkhna said: Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted Do you run the container with in provileged mode? But I don‘t think that this will help bor that this is a good idea. Sorry but I even don‘t know what this container is… Quote Link to comment
gvkhna Posted May 4, 2023 Share Posted May 4, 2023 I did that, that got me in the right direction. But this container would not start with that error. Container running in privileged yes. The container is the mullvadvpn container I liked in my last message: Quote Link to comment
ich777 Posted May 4, 2023 Share Posted May 4, 2023 6 minutes ago, gvkhna said: I did that, that got me in the right direction. But this container would not start with that error. Container running in privileged yes. The container is the mullvadvpn container I liked in my last message: I even don‘t know what this container is used for. You can try to install it in a LXC container and see if this is working. Quote Link to comment
gvkhna Posted May 4, 2023 Share Posted May 4, 2023 @ich777 I just got it working, you can see in the latest post on that topic. I had to set cgroupns host, and /sys/fs/cgroup RW, a little suspect but it is working so I'm not too bothered. Any issue you think to look out for? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.