Reputation: 631
I am trying to tune my AWS apache server. I have looked in:
$: httpd/conf/httpd.conf
And I cannot find this section to edit:
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 25
ServerLimit 128
MaxClients 128
MaxRequestsPerChild 0
</IfModule>
Where will I find the above settings if they are not in: httpd/conf/httpd.conf
Upvotes: 2
Views: 2314
Reputation: 337
The Apache main configuration file on Amazon Linux:
/etc/httpd/conf/httpd.conf
Other configuration loaded files:
- conf.modules.d/*.conf
- conf.d/*.conf
I could not find section, then i´ve added to the main file and solve my problem.
Upvotes: 0
Reputation: 1638
Be sure the prefork module is enabled ( Unless you disabled it, it's enabled by default ).
The section you're looking for is in the prefork configuration file, which is in this case, in the enabled modules directory:
/etc/apache2/mods-enabled/mpm_prefork.conf
Upvotes: 3
Reputation: 829
There are multiple factors which impact apache performance.
- Tune JVM
- Log rotation policy
- Tune linux kernal parameters
- Tune apache MPM
I assumed you have done first 3 steps and want to understand about 4th.
Step 4. check which MPM your are using with command:
[root@mohitm ~]# apachectl -V|grep "Server MPM:"
Server MPM: prefork
[root@mohitm ~]#
To locate the httpd config file
$ /usr/sbin/apache2 -V | grep SERVER_CONFIG_FILE
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
#
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 16
MinSpareServers 10
MaxSpareServers 20
ServerLimit 5024
MaxClients 5024
MaxRequestsPerChild 10000
</IfModule>
#
Upvotes: 0
Reputation: 4539
It depends on how apache was compiled. If apache was compiled with mod_event instead of prefork that section might not exist in the apache httpd.conf file. On redhat/centos distros the default location for httpd.conf file is in /etc/httpd/conf. On debian/ubuntru distros you will find httpd.conf in /etc/apache2
Upvotes: 0