Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

How to limit the resource usage of a Hosting by means of a template

What is resource limitation in a Hosting template?

The resource limitations through a Hosting template allow one or more web hostings hosted on a server to have a defined limit on the use of resources that can be used.

This is achieved by setting limits on CPU usage, RAM memory and disk operations (IOPS), setting a maximum percentage of CPU a web host can use, limiting the maximum amount of RAM memory it can consume and controlling the maximum number of read and write disk operations it can perform (IOPS).

These limitations can prevent a Hosting from using a high percentage of resources, affecting the performance of other Hostings on the server.

These limitations can be applied through the Hosting templates.

info You can get more information about Hosting templates, as well as learn how to create and manage them, by following the instructions in the following manual: Create a Hosting service in your Cloud with a Template.

How to apply the resource limitation on a Hosting template

  1. From the main SWPanel Dashboard, click on the left side menu, select the dropdown “Tools”-> “Templates” --> “Hosting”, Select the template and click on “modify template”:

    enter image description here

  2. We go to the “Resource limitation” section, we will have 2 methods to apply the resource limitation.

    enter image description here

Method 1 - Assign a resource control template, we can select a “Resource Control Template”, which already comes with a preset configuration for resource limitation.

You can create or modify a Resource Control Template by following the instructions in the following manual: How to create a Resource Usage Control Template

Method 2 - Assign a manual limitation, we will be able to define manually the limitation of resources on the Hosting template.

In the Manual resource allocation, we can limit the maximum CPU, RAM and disk speed(IOPS) usage for the hosts of this template.

enter image description here

  1. Once the resource limitation is configured, go to the “Template Check” section and click on “Check compatibility now”, then click on “Modify Template” to apply the changes.

    enter image description here

success Done! With these limitations, you will ensure that the server resources are evenly distributed among the different hostings, preventing one of them from negatively affecting the performance of the others, thus improving the stability and overall performance of the server.