Score:1

mpm-prefork apache increasing MaxRequestWorkers not affecting my RAM to much

fr flag

I read about the Apache mpm-prefork configuration and I tried to tune the MaxRequestWorkers parameter. My settings before the change were as follows:

<IfModule mpm_prefork_module>
        StartServers            10
        MinSpareServers           10
        MaxSpareServers          64
        ServerLimit           512
        MaxRequestWorkers         500
        MaxConnectionsPerChild   0 
 </IfModule>

Then, because of increasing the concurrent users in my app, I decided to increase the MaxRequestWorkers from 500 to 670 and also ServerLimit from 512 to 700. Fortunately, the problem of slow connection was solved using these changes. But considering the reports from Apache2buddy, the average process memory is 16MB which means apache potentially needs at least 670*16 ~= 10GB of RAM. While my server has only 4GB of RAM. Now, using htop the usage of RAM is about 2.3GB and 400MB swap (from 1GB available)

  1. Why apache does not use more memory actually?
  2. What is the best config in my case? (using about 600 process count)
  3. Does my config has some bad consequences?

So what

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.