Module management
Initial module setup
- Log in to the ispmanager panel with an administrator-level account or above.
- Go to the Modules section.
- Next to the limiting module, click
. - Fill in the fields:
- Apache mode:
- Install LS and LFS without changing the server configuration
Change the configuration to MPM Prefork + FastCGI and install LS and LFS
Changing the web server configuration may cause website malfunctions. We recommend that you change the configuration only on a server with no websites.
- Enable the lsphp module after installation — install the lsphp module for Apache
- Apache mode:
- Save the changes.
After saving, the Apache mode can be changed in the Software configuration section, and the lsphp option can be changed in the global settings.
After setup:
- lsphp module for Apache will be installed if this option was enabled. Users will be unable to access PHP in LSAPI mode
- When Prefork + FastCGI mode is selected, all user sites will automatically switch to FastCGI mode
- Isolation will be disabled for all users
Limiting for all users will be enabled with default values
Default values- CPU — 100%
- RAM — 2048 MB
- Swap file — 1020 MB
- Maximum number of running processes (NPROC) — 50
To change the default values, set global isolation and limiting settings.
Limiting and isolation parameters
Limiting and isolation parameters can be configured at two levels:
- Global settings apply to all users with default settings selected. If the global settings are changed, the new values automatically apply to all such users
- User settings allow to override global settings for a specific user
To configure the settings:
- Log in to the ispmanager panel with an administrator-level account or above.
- Go to the Global LS/LFS values section.
- Set options:
Enable the lsphp module — install the lsphp module for Apache.
If lsphp was not installed during the initial module setup, enable LSAPI mode for the required PHP versions in the Software configuration section.
- Enable LimitedFS isolation
- Specify the limit values by selecting Set from the drop-down list, or select Unlimited and save the changes.
- Log in to the ispmanager panel with an administrator-level account or above.
- Go to the Users section.
- Select the user and click
on the toolbar. - Set options:
- Enable LimitedFS isolation
- PHP in LSAPI mode — the field is available in the Access section if lsphp was set in the module settings or global settings
- For each limit, select from the drop-down list:
- Unlimited
- By default — global values will be used
- Set — to specify your own values
- Save the changes.
The recommended limit values are presented below.
CPU — 100%–200%. 100% corresponds to one core, 200% to two, 25% to a quarter of one core.
DetailsWhen the limit is reached, processor usage is transferred to processes from other users. This switching consumes processor time. Setting the limit below 100% can lead to excessive switching between processes and increased processor load.
CPU allocation errors don't cause website performance issues; they simply slow it down. Therefore, the choice of limit depends on the desired website speed.
RAM and SWAP file - 1 GB for each limit.
DetailsUnlike the CPU limit, reaching the memory limit can lead to website crashes, as it causes errors processing website requests. Therefore, setting the correct RAM and SWAP file limits is more critical for the stable operation of websites.
Individual settings for each user will depend on the following factors:
- Number of sites — the more sites you have, the more memory you need to run them
- PHP modes:
- FastCGI, PHP-FPM — require more memory because the PHP process runs for a long time and processes many requests
- CGI — requires less memory because the PHP process is terminated each time a request is processed
- Web server settings — the more processes a web server creates for each domain and the longer their lifespan, the more memory it needs
Maximum number of running processes (NPROC) — 50-100.
DetailsUnlike the CPU limit, reaching the process limit can lead to website crashes, as it causes errors processing website requests. Therefore, choosing the right process limit is more critical for the stable operation of websites.
Individual settings for each user will depend on the following factors:
- Number of sites — the more sites there are, the more processes are needed to run them
- PHP modes:
- FastCGI, PHP-FPM — if the PHP process runs for a long time and processes many requests, more processes are required
- CGI — if the PHP process terminates each time a request is processed, fewer processes are required
- Web server settings — the more processes a web server creates for each domain and the longer their lifespan, the more processes are needed
The values provided are general guidelines. For more precise selection, we recommend the following:
- Analyze statistics — if a user consistently experiences more than 700 resource allocation errors per minute, they may need to set a higher limit
- Viewing snapshots of user processes will help you understand which processes are creating a high load and whether it can be optimized
Over time, as the user creates more and more new websites, it may be necessary to increase the limit values.