|
ru en
|
|||
Recommendations for hosting RAM reduced consumptionContents1. General information The main resource on R01 hosting affecting website operation is the memory allocated for the processes on virtual web server. The allocated memory limit is set as per plan. To ensure hosted website stable operation, memory consumption shall be in the limits set by the plan. Hosting memory allocation graph is available in section "Web server" → "Resources usage" of the hosting control panel. The memory graph is updated every 5 minutes.
If memory graph (blue line) reaches and exceeds the limitations of the RAM allocated for this plan (orange line), there may be unstable operation, partial or full unavailability of websites, whereas the server does not have enough resources to process incoming requests and run scripts. 2. Memory reduced consumption options 2.1. Disable unused modules of Apache web server and PHP module extensions In hosting control panel you can manage configuration of your Apache web server and PHP module. Each enabled module will increase RAM consumption, so it is important to enable only those which are required for website operation. The list of website modules required for website operation can be clarified from the website developers or referred to in the appropriate CMS guidelines. The following Apache modules are enabled on hosting by default: auth_module, cgi, realip_module, rewrite_module, autoindex_module, env_module, expires_module. Check whether you have the following enabled Apache modules and disable them. Major PHP and MySQL operated websites do not require them. It can be done in section "Web server" → "Modules management" of the hosting control panel. To view the full list of modules it is required to click on block "Advanced" in the bottom of the page
Management of PHP module extensions is carried out in section "Web server" → "Modules management" of the hosting control panel as per instruction: We recommend first of all to check the following PHP module extensions, probably part of them is not required for your website operation:
If you are not sure, whether this or that module is required for website operation, their operation may be analyzed by disabling them one by one and checking correctness of websites operation. 2.2. Analyze website log files Hosting directory of each website your_domain/logs stores log files to address website. Please, check, which addresses were made to the website at the moments of high memory consumption. Website indexing by search engines, especially a number of them at a time, website visit increase causes higher memory consumption. Some search engines enable to reduce intensity of requests of their robots per time limit. The information about these settings is available in documentation for these search engines. 2.3. Check website scripts running with outside servers If your website receives data from outside servers, low speed or unavailability may affect your website operation. The lower speed of the outside server is, the more time processes consume in RAM Apache. 2.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. Those data which update rarely should be cached. We recommend to consult website developers as regards optimization of SQL requests. The quicker server executes database requests, the quicker web server receives all the required data, generates response to the client and releases the memory. To view the requests to the database occurred at addressing the website and time of their execution you may use PHPMyAdmin interface, tab "Processes". Optimization of requests to DB shall be brought to the following results:
All these data for each of these requests can be done through command EXPLAIN: We recommend to optimize website layout by reducing number of uploaded items. The less is the amount of requests to the server, the lower is the total processing time of requests and number of launched web server processes and, consequently, the lower is memory consumption. |
||||
Copyright © 2000-2024 Registrar R01 |
Information: info@r01.ru
Support: support@r01.ru Office: 1 Bolshoy Gnezdnikovsky Lane, building 2, Moscow (Tverskaya metro station, entrance No. 9, Voznesensky business center) |