Views: 988 (Data available since 06.02.2017)
Web server performance means the amount of pages delivered per time unit. When we speak about performance of a specific website, it comes down to the page opening time (strictly speaking, dependence is not linear, because the server processes several queries in parallel, but it is the page opening time that can be optimized). Website performance depends on the following factors:
- Server resources;
- Server software settings;
- Software platform (SCU);
- Applied development on the platform.
Performance reduction can be experienced at one or more stages. Applied developments mentioned in this list are of great importance. A non-optimized code can bring to naught the advantages of any perfect platform and “hang up” any potent hardware.
Web Programming Specifics
One of the differences of web programming from Windows programming (single-user) is that in Windows, all computer resources belong to you for almost unlimited time. In web development you own a limited amount of memory and little time (normally no more than 30-90 seconds).
The main task of a website (in 99% of the cases) is to quickly return a requested page to the user and release resources for servicing other visitors. It is exactly for resolving this task that such tools as nginx, lighthttpd, caching, eAccelerator, and others exist. For the majority of websites with little traffic these tools available on almost any hosting or in almost any CMS are quite sufficient.
However, for the project with a higher traffic additional optimization may become necessary.
A complex and resource-intensive project is a project with 30,000 visits, 500,000 and more database elements, over 40 types of infoblocks, and more than 200 infoblocks proper. Key infoblocks contain 150-200 properties each.
What makes such projects work:
- Infoblocks, from which selections can be made using a standard API;
Aspects to be taken into account:
- Large amount of properties may cause problems or minor failures: problems with changing an element property from the administrative part, a filter by value may fail to perform.
- Working in the administrative part with such a big amount of data is somewhat inconvenient.
Infoblock design is the most important. Also, special attention should be paid to infoblock handlers and agents. API specifics must be learned and kept in mind. For example, select elements by IBLOCK_CODE or IBLOCK_TYPE is worse than by IBLOCK_ID.
Complex and extensive projects should be implemented on own servers. In this case, the use of 2 servers is recommended: one for the base and static data and one for cache, separately.
Project developers’ experience using Bitrix Framework shows that close to 1 million hits on a project is a real value, provided that MySQL is configured properly.
There is also a kind of a crossroad: database and reliable hard disc drive. If data are not cached, it is worse for the base and better for the disc. I.e. if a very high-capacity server is used for the database and it is configured properly, it can be a good alternative to file cache.
In order to reduce database load and make the work with system in Bitrix Framework
more convenient, different data are stored in the file system. Please refer to the lesson File structure
in order to find more information about files and the way they affect the performance.