vps_optimized: VPS-optimized Mode

The vps_optimized utility is used for switching Linux-based Plesk installations into the operation mode optimized for running in virtual environments. The mode switches off InnoDB engine in MySQL database server, and Apache web server modules that are not critical for hosting services. This makes Plesk use less memory than other control panels available on the market, which ensures better utilization of hardware resources and increased density of virtual environments per server.

The only disadvantages of using the optimized mode are as follows:

Note: The optimized mode can be switched on only on clean Plesk installations, which have not yet been configured. It cannot be switched on for the Plesk installations upgraded from earlier versions.

If you are running Plesk in a Virtuozzo container, then you do not need to use the vps_optimized utility. Only install the pp11.0.0-vps-optimized EZ template. The template will apply the necessary configuration.

If you use other virtualization solutions or running the Plesk software on dedicated servers, you can use the vps_optimized utility to switch Plesk to the optimized mode: 

plesk bin vps_optimized --turn-on

Commands
Command Parameter Description Example

--status

 

Shows whether Plesk is operating in the VPS-optimized mode.

To check Plesk operation mode:

plesk bin vps_optimized --status

--turn-on

 

Switches Plesk into the optimized mode.

If you want to select which of the optimization settings to apply, use the --turn-on command with the --aspect option, and specify one or several optimization aspects (described below).

To switch on the optimized mode:

plesk bin vps_optimized --turn-on

--turn-off

 

Disables the VPS optimized mode.

To switch on the optimized mode:

plesk bin vps_optimized --turn-off

--aspect

<string>

If used with the --turn-on option, specifies the optimization aspects.

  • mysql-innodb switches off InnoDB databases.
  • apache-modules-all switches off all Apache modules.
  • apache-modules-except-php switches off all Apache modules except those required for PHP scripting support.
  • apache-modules-except-scripting switches off all Apache modules except those that provide support for web scripting.

To switch off all Apache modules:

plesk bin vps_optimized --turn-on --aspect apache-modules-all

--help

 

Displays available commands and options.

To view the list of available commands and options:

plesk bin vps_optimized --help

If you need to switch Plesk back to the normal mode of operation, perform the following steps:

  1. Switch on the InnoDB engine.
    1. Open for editing the file /etc/my.cnf.
    2. Locate the lines containing entries skip-innodb and remove them, or comment them out.
    3. Save the file.
    4. Restart MySQL server.
  2. Switch on the required Apache modules.

    On Debian Linux, use the a2enmod utility to switch on all required modules. For example, if you want to switch on the PHP module, issue the following command:

    a2enmod php5

    On other distributions of Linux, edit the main Apache configuration file, which, in most Linux installations, is located in /etc/httpd/conf/.

    1. Open for editing the file /etc/httpd/conf/httpd.conf.
    2. Locate the lines LoadModule <module_name> corresponding to the modules that you want to switch on, and uncomment the lines.
    3. Save the file.
    4. Restart Apache.
  3. Switch Plesk back to normal operation mode by issuing the following SQL query:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "update misc set val='0' where param='vps_optimized_mode_status';"

  

Next in this section:

Apache Modules Switched Off in VPS-Optimized Mode

 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.