Last Modified: 10.10.2012
Let's study the question of web server memory usage in more detail.
As we have mentioned above, most configurations, upon each new query, start an individual web server process with extra modules and PHP interpreter that takes 20-30 MB of memory and more.
10 started processes take 200-300 MB. At a 1 GB system, 100 processes bring to exhaustive swapping because all these processes together require 2-3 GB of memory.
As practice shows, low memory can be a key factor of instability at peak loads.
It also should be mentioned that in common configuration, a web server processes all requests for PHP pages, images, binary files, stylesheets and other site components.
A site page can contain tens or even hundreds of images. A web server can send or receive such files.
Now, bearing in mind the fact that a common web server process requires 20-30 MB, we assert that the PHP interpreter does not process static elements, but the memory is still used, and the process is busy serving requests. It turns out that a process takes 90% of time handling static documents only wasting system resources ineffectively.
The static content problem is very substantial. One of the most important tasks is to minimize the number of static queries processed by the web server.