Home Linux How To Optimise Apache Server Performance On CentOS 7

How To Optimise Apache Server Performance On CentOS 7

apache web server

How To Optimise Apache Server Performance On CentOS 7

Apache web server widely used for website hosting and to make better the performance of Apache server, follow the few points mentioned below. let’s see, how to optimise Apache server performance.

Check Out : Install Varnish Cache To Speed Up Apache Performance

1. Configure MPM Prefork

One of the poor performance of Apache web server is having trouble in load the web page and then MPM module can help you to enhance performance.

By default, mpm_prefork_module is enabled in Apache.

If mod_deflate enabled, it will display mpm_prefork_module (shared).

There’re some setting for configuration of MPM in httpd.conf.

<IFModule prefork.c>

StartServers 5

MinSpareServers 5

MaxSpareServers 10

MaxClients 200

MaxRequestPerChild 4000


you can change above values according to your server requirement.

2. KeepAlive

This sets if server allows more than one request per connection. If you’re getting request from hundreds of thousands of ip’s at once. So, you should make it “on”. By default, this is disabled.

KeepAlive on

Check Out : Disable HTTP TRACE or TRACK Request In Httpd (Apache)

3. MaxKeepAliveRequest

This tells us the maximum number of request to server on a TCP connection. If it’s set to 0, unlimited number of request will be allowed.

Keep this value high for Apache performance. The recommended value of MaxKeepAliveRequest is 500.

MaxKeepAliveRequest 500

4. KeepAliveTime Out

This is a parameter that defines the number of seconds before closing a connections that means the maximum number of seconds Apache will wait to new request before closing the connection.

KeepAliveTimeOut 5

Check Out : How To Hide Apache Web Server Name

5. DNS lookups

if you enable the hostname lookup in httpd.conf file, So it can slow down the Apache performance because Apache will perform the DNS lookups to server the request.

By default, it’s not enabled.

HostnameLookups off

You’re done.

Leave a Reply

Notify of