cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
ok i will try to add cgroup2 support can you give me the linux distribution you are using ?
this version is not yet supported by hestiacp, please check the minimum requirement in the doc
Version 1.9 brings Ubuntu 24.04 support, so it seems relevant to test on it it and fix anything that isn’t working.
I tried to install it on Ubuntu 24 but encountered some issues. Anyway, support for cgroup v2 has been added. Please check the repository and help with testing. If you find any issues, kindly open an issue on GitHub in the relevant repository. I will try to resolve all issues before submitting a pull request to the main project.
Don’t forget about Debian 12 support)
It should normally work, but feel free to install it on Debian and check. If there are any issues, open one on GitHub, and I will try to resolve it.
Good script.
I tested it for a long time on a test server.
Now I have implemented it on two production servers. Everything is great!
Dear developers - integrate this mechanism into the panel!
(Debian 12 / HestiaCP 1.9 beta1)
It would be good to limit the consumption resources for mysql. Make one general limitation, namely the consumption of the processor
I have installed the 1.9.0-beta1 version but can’t see the CPU/RAM options in the package. Can someone help me enable the options?
Navigate to:
Server settings > Configure > Plugins > Limit System Resources > Yes > Save
You should now get option here:
Create / Edit package > System Resources
As per my understanding the resource limitation only works on user’s ssh sessions. Do you have any time limits or plans for this to work on php-fpm and other things?
I suppose that with the apache stack you will be able to limit the CPU since it runs under a different user.
No we run both under php-fpm so it will not work…
@eris - sorry didn’t get you. I am using nginx + apache stack, and every php-fpm process runs under individually under the username. So it is theoretically possible to limit CPU right for the php-fpm process + user?
Not with the current setup…
Hello everyone. The question about limiting resources for php-fpm and other is still relevant. Please tell me, are there any ideas how to do it?
At the moment PHP-FPM doesn’t support natively …
There are 3 options
- Wait for proper cgroups v2 library support in php… Wait for
- Build our own FPM system
- or run php-fpm under each user specifically…
We had some communications about it:
Did all this research already. So feel free to ask me for the possible options. Honestly the shoving processes in cgroups script is atm the most easy and feasible solution, but we should make forked php-fpm processes a bit more longer lived (10minutes) to avoid having to do this too much. The implementation in php-fpm itself will have to wait for the cgroups c library to include v2 (release 3.0) and being included in the packages. This might still take some time. Else we will have to write our own cgroup adapters in php-fpm.
I thought it would be best to integrate cgroup at the panel level rather than a separate script. The script that was previously given on this forum works for me and limits resources. But it is very inconvenient. When creating a user, you need to constantly restart it. So it is better to do everything inside the panel mechanisms.