Using Hosting Resources

Hosting Resource Usage Statistics
Causes of Increased Resource Consumption
Ways to Reduce Resource Consumption:

  1. Disabling unused Apache web server modules and PHP module extensions
  2. Analyzing website log files
  3. Checking how website scripts interact with third-party servers
  4. Analyzing website scripts and MySQL database queries
  5. Analyzing website layout
  6. Checking the website for malicious code


 

Hosting Resource Usage Statistics

Each virtual hosting service at Rucenter tracks the usage of the following resources:

  1. RAM — the amount of memory allocated for running software on the hosting, set in megabytes according to the hosting plan.
  2. CPU time — the time in seconds that the server’s processor spends executing a task, such as a website script. A CPU time limit of 50% in the hosting plan means that within a 1-minute period, a script can fully utilize one CPU core for 30 seconds. A limit of 200% means that within a 1-minute period, it is allowed to fully use two CPU cores, i.e., 120 seconds of CPU time.
  3. Number of disk operations — the number of input/output operations performed by the storage system per minute.
  4. HDD read — the speed of reading data from the server’s disk, in megabytes per minute.
  5. HDD write — the speed of writing data to the server’s disk, in megabytes per minute.

Information about resource usage is available in the Resources (Ресурсы) — Statistics (Статистика) section of the hosting control panel.

Clicking a chart takes you to detailed information on the usage of a specific resource.



When you hover the cursor over a chart point, you will see the resource usage at that particular moment in time.


 

Causes of Increased Resource Consumption

If the limits set by your hosting plan are exceeded, a notification is sent to the email address specified in the agreement, advising you to analyze the situation and take measures to reduce the hosting load.

The main causes of increased resource consumption are:

  1. Using a resource-intensive CMS, such as 1C-Bitrix. Choose hosting optimized for CMS platforms.
  2. High website traffic. In this case, we recommend switching to a high-performance virtual hosting plan or a VDS.
  3. Unoptimized website scripts — scripts whose execution algorithms are inefficient. Examples: recalculating data that is already known, using inefficient calculation methods, unnecessary loops, etc.
  4. Unoptimized MySQL database queries. Problems can arise from incorrectly created indexes, selecting excessively large datasets, deep query nesting, etc.
  5. Search engine crawler activity. Crawlers can slow down a website if there are too many of them performing simultaneous scans to update their search index. 
  6. Malicious code on the website. Server load may be caused by malicious scripts running on the hosting.


 

Ways to Reduce Resource Consumption
 


1. Disable unused modules of Apache web server and PHP module extensions

In the hosting control panel, you can manage the configuration of your Apache web server and PHP module.

Each enabled module increases RAM consumption, so it’s important to enable only those necessary for your website to function. You can confirm the list of required modules with your website developer or in the documentation for your CMS.

Examples of hosting configuration for some popular CMS platforms are published in the CMS section.

By default, the following Apache modules are enabled on the hosting: auth_module, cgi, realip_module, rewrite_module, autoindex_module, env_module, expires_module

Check whether you have the following Apache modules enabled and disable them — for most PHP and MySQL websites, they are not required. You can do this in Web Server Management (Управление веб-сервером) — PHP Module Management (Управление модулем PHP) in the hosting control panel. To view the list of modules, click the Manage Extensions link.

  • FastCGI — required if you manually install software on the hosting that works as a FastCGI server.
  • gzip_module — required if you configure gzip compression. In addition to enabling the module, compression must be configured in the .htaccess file. Disable the module if you are not using this functionality.
  • mime_magic_module — allows the web server to determine file MIME types; for most websites, the standard mime_module is sufficient.
  • Perl (mod_perl) — required for Perl scripts written specifically for mod_perl. Most Perl scripts are run via the CGI module (see the article Perl and CGI Programs — Usage Notes).
  • proxy_module — required if you plan to configure request proxying with the Apache web server.
  • bandwidth_module, usertrack_module, speling_module, limitipconn_module — these modules consume little memory but are not needed for most websites, so they can be disabled.

Managing PHP module extensions is done in Web Server Management (Управление веб-сервером) — PHP Module Management (Управление модулем PHP) in the hosting control panel, as described in the Selecting PHP Version and Extensions guide.

We recommend reviewing the following PHP extensions — some of them may not be necessary for your websites:

  • Eaccelerator, APC — cache data in RAM and therefore require large amounts of memory. On virtual hosting, there is not enough RAM for these modules to work effectively.
  • mysql, mysqli, pdo_mysql — modules for working with MySQL databases; usually, a site needs only one of them. Disable unused ones.
  • imagick, gd — image processing modules; if the site can work with the gd library, it’s better to use it as it consumes much less memory.
  • imap — enables working with mail servers via the IMAP protocol; most sites do not require this function.
  • dba, sqlite, pgsql, pdo_sqlite, pdo_pgsql — modules for working with the corresponding DBMS. Most sites use MySQL, so these can be disabled.

If you’re unsure whether a module is required for your website, you can test its necessity by disabling it one at a time and checking that your site continues to work correctly.
 

2. Analyze website log files

On the hosting server, log files are stored in the /var/log/ directory:

  • /var/log/your_domain.access.log — access log for the site.
  • /var/log/your_domain.error.log — error log.

You can view them by connecting to the hosting via SSH. You can also download log files using the file manager in the control panel. By reviewing them, you can see what requests were made to the site during periods of high memory consumption.

Search engine indexing (especially by multiple bots simultaneously) or sudden traffic spikes — all of these cause increased memory usage. Some search engines enable to reduce intensity of requests of their robots per time limit. Information on these settings can be found in the documentation of the respective search engines.


3. Check website scripts running with outside servers

If your website receives data from outside servers, low speed or unavailablity may affect your website operation. The lower speed of the outside server, the longer processes run in RAM Apache.


 

4. Analyze website scripts operation and requests to MySQL database

Scripts optimization shall be targeted to minimization of RAM and time consumed for script running. Cache data that changes infrequently.

We recommend consulting your website developers regarding SQL query optimization. The faster the database server executes queries, the faster the web server can get the necessary data, generate a response to the client, and free up memory.

To view the database queries executed when the website is accessed and their execution times, you can use the Processes (Процессы) tab in the PHPMyAdmin interface.

Database query optimization should achieve the following:

  • All queries use indexes for data selection.
  • Use of temporary files and filesort operations is minimized.
     

You can obtain all of this information for each query using the EXPLAIN command, as described in the MySQL documentation.
 

5. Review your site’s layout

We recommend optimizing the site layout by reducing the number of loaded elements. The fewer requests made to the server, the shorter the total request processing time and the fewer web server processes launched — resulting in lower memory consumption.
 

6. Check your website for malicious code

Most websites built on popular CMS platforms have certain security vulnerabilities. Developers regularly release updates to address these vulnerabilities, but preventing hacks is not always possible. This is mainly because hacking often occurs through third-party plugins or modified themes.

Scan your hosting account for malicious code using our antivirus tool.
 

Всё ещё остались вопросы?