Update: Add example contrroller script for running under systemd using cgroups.
This provides an example cgroups setup.
I found that on systems with cgroups2, this is harder to figure out.
This turned out to be because of the existing setup used by many systemd systems.
This provides an example that I managed to get to work under some systems in some circumstances.
The biggest problems is that the subtree needs to be passed along and that tends to not be done by default.
The current user, if not root, usually lacks the privileges to do so.
The best case would be to use the cgroups generation when running as root to setup the appropriate user.
Then, use the program startup examples as the normal user.
This should show the cgroup situation.
I would not be surprised if the cgroup setup scripts has to be altered (not just the user and group name).