Controlling RAM And CPU Usage

(version 2.09 and higher)

 

To prevent overconsumption of your server's resources by users' cgi scripts, you can use Resource Limit Controls. It allows you to control the usage of the CPU, memory and server processes on the box with the web server.

* RLimit Controls use directives of Apache 1.2.X modules and, therefore, are not applicable for Windows hosting.


Enable RLimit in Plans

To apply RLimit to user scripts under a certain plan, go to the Other section of the Plan Edit Wizard Step 1. It lists the following resources:

  • RLimitCPU - restrict the strain of CPU usage.
  • RLimitMEM - restrict the memory used by processes run on the server.
  • RLimitNPROC - restrict the number of the processes run simultaneously.

Configure RLimit Values

In most cases the default values are the best to prevent overconsumption of system resources on the one hand and allow correct performance of cgi scripts on the other.

To set custom values for these resources, select Plans in the INFO menu. Then, click the resources link next to the plan you would like to edit. On the page that appears, find:
RLimitCPU
The Min parameter sets the soft resource limit for all processes and the Max parameter sets the maximum resource limit. CPU resource limits are expressed in seconds per process.
RLimitMEM
The Min parameter sets the soft resource limit for all processes and the Max parameter sets the maximum resource limit. Memory resource limits are expressed in bytes per process.
RLimitNPROC
The Min parameter sets the soft resource limit for all processes and the Max parameter sets the maximum resource limit. Process limits control the number of processes per user.

Warning: Don't change any parameters other than Min and Max.

Important: Enabled RLimitMEM may affect the performance of certain CGI scripts and may result in FrontPage, Miva, and AWStats failures. Users may get the "premature end of script headers" message. As a rule of thumb, you should disable RLimitMEM if your customers use FrontPage, Miva, and AWStats, because these products use a lot of RAM.

For more information please refer to apache documentation.

The above changes will be applied only to accounts created thereafter. If you need to apply these changes to a specific existing account, enter this account's control panel, go to the Web Options page, and click Apply Changes.


Limiting Resource Use For Individual Accounts

Tip: To switch RLimitMEM OFF for one account in a plan where RLimitMEM is ON, do the following:

  1. switch RLimitMEM OFF for the whole plan,
  2. enter this accounts' control panel,
  3. go to the Web Options page,
  4. click Apply Changes,
  5. go back to your admin control panel,
  6. switch RLimitMEM back ON for the whole plan.

The reverse procedure can be used to switch RLimitMEM ON for one account in a plan where RLimitMEM is OFF.



Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map