I searched a lot, very tired. But it seems you haven’t read my question carefully? Maybe, Virtualmin does not support CPU and RAM limits in Account Plans. I tried with Plesk and it uses Cgroups to limit CPU Usage (% CPU) and RAM for Hosting Plans!
And that post tells you exactly where they are and what to do if you don’t see them.
You need to be a master admin
Your OS type should be set correctly as linux on Webmin config (cat /etc/webmin/config | grep os_type)
There should be a file on your system called /etc/security/limits.conf, meaning the package libpam-modules must be installed
You must be able to edit a domain and a domain must have a correspondent unix user (can be checked in a domains configs under /etc/webmin/virtual-server/domains by finding the domain config file and checking for unix=1 option).
Hi, In that topic, rikukale not have “Edit Resources Limits” menu, so Virtualmin Staff tell him how to do to have this menu. But I had “Edit Resources Limits” menu under “Administration Options” menu. But when I go to “Edit Resources Limits” it not have CPU Core limits, it only have CPU “Number of processes”. I want to tell about limit CPU Cores/CPU Percent Usages and RAM per Account Plans.
We use pam_limits (limits.conf) for these features, which do not have that sort of capability. cgroups can do it (sort of, though it also doesn’t think of CPU limits the way humans do), but we don’t yet have that support in Virtualmin. It’s on the todo list, but for now, there are a few ways you can have applied equally to all users, or based on a secondary group.
If you want all domains to have the same limits the templates example at the bottom of this would be pretty quick to implement:
If they need to be different and selected at creation time or when moving from one account plan to another, it’d take either a little bit of scripting in a Server Templates post-update script, or just adding a secondary group (in Administrative user->Add domain owners to secondary group) and then setting up a group for each size, would work, I think. Since Account Plans can select the Server Template to use, this could make it all handled via choosing an Account Plan.
At least, I think setting it up with one group per “size” would work. I haven’t tried and the docs aren’t clear if every user in the group shares the same group limit or if they each get their own pool of resources. I need to read up some more, as I think we’d like to try to get it supported by Virtualmin 8, now that all of our supported distros have systemd (which, realistically, is required for cgroups support…theoretically one could use cgroups without it, but it’d be complicated to DIY a solution, I think).