Hi all,
Lately I am researching on options to apply proper resource management for users and services on Virtualmin + CentOS setup (the same applies on Ubuntu too). What I mean by resource management is to be able to limit and prioritize the services and users in such a system. For example not allowing heavy usage of one service to block other, or for one user/website to block all the others.
There are few things that can be done now with Virtualmin + CentOS:
-
Lower the priority of the backups by setting nice and ionice values fot the scheduled jobs in the Webmin advanced settings
-
Create priority for pam_limits by creating /etc/security/limits.d/80-priority.conf and put something like that:
* soft priority 3
postfix soft priority 4
apache soft priority 1
mysql soft priority 1
root soft priority 0
- We can edit the wrapper scripts to set up individual nice values for the php-cgi processes by putting
exec nice -n 3 /usr/bin/php-cgi
Setting up nice will also set-up ionice (i/o is usually bigger bottleneck than cpu)
Another general option is to use cgroups which is available in CentOS 6. It is generally recommended to use cgroups as being more advanced and having more options. Though the setup of cgroups will be more complex. Probably the long term way to go is cgroups.
So:
- Did anybody tried to apply any resource management?
- Did you tried to apply cgroups?
- Shall we work together in order to find a proper resource management for Virtualmin. Right now it is a drawback from cPanel + CloudLinux which offer relatively good resource management
Georgi