Improve MAMP local performance and reduce RAM usage

apacheMAMPPerformance

You might have too many httpd processes running on your system during development.

Screenshot of httpd processes haven taken over the machine.

2015 03 03 03 12 40 PM

 

Objective: Reduce the amount of spare httpd servers that apache will maintain in memory.

Purpose: Since this is for local development purposes it’s not likely that the number of users will exceed 256 clients.

Overview:

These are the internal default configuration for Apache sets its configuration. This section will not exist in your httpd.conf file unless you already created it prior.

<IfModule prefork.c>

StartServers 4
MinSpareServers 3
MaxSpareServers 10
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 10000

</IfModule>

 

Insert/replace the following in httpd.conf – File->Edit Template->Apache->httpd.conf

<IfModule prefork.c>

StartServers       2

MinSpareServers    1

MaxSpareServers   2

ServerLimit      256

MaxClients       256

MaxRequestsPerChild  10000

</IfModule>

 

This will reduce the amount of spare httpd processes in memory and reduce the amounts of threads used by the processor. This will improve your overall system performance, reduce energy and battery usage as well.

Leave a Reply