Limiting CPU and Memory per virtual server

3 posts / 0 new
Last post
#1 Sat, 10/13/2012 - 09:35
cognosco

Limiting CPU and Memory per virtual server

On my VPS I would like to limit the CPU% and Memory of a certain virtual server. The site which is hosted at that virtual server has on some peak moments a very high load, which results in 100% CPU on both cores and high memory usage. This makes the sites hosted on other virtual servers slow or even inaccessible.

I found the following settings page in virtual min:

Processes and Limits
For domainname.tld:80 Processes and Limits for domainname.tld:80 Maximum request body size Default bytes Maximum XML request body size Default bytes CPU resource limit Default Soft limit Soft limit Hard limit Memory resource limit Default Soft limit Soft limit Hard limit Process limit Default Soft limit Soft limit Hard limit

I already tried values like 70 or 80 in CPU resource limit, soft and hard. But when I do click apply and I do test the site with intense, it still goes to 100% CPU in top on both cores. Memory limit does not work either.

How can I properly limit the resource usage of this site/domainname?

Thank you in advance.

Sun, 10/14/2012 - 21:27
andreychek

Howdy,

There's a Resource Limits option within Virtualmin Pro... if you're using Virtualmin GPL, you can still set that up manually.

What you can do is edit /etc/security/limits.conf, and setup limits in there... in particular, the "nofile", "rss", and "cpu" options may be of interest.

-Eric

Sat, 05/25/2013 - 11:38
albes

@cognosco how you can see that the site use both cpu and ram at 100%?

Topic locked