We optimize the performance of Apache server on Linux

How to optimize Apache performance depending on available RAM memory and server environment.

If the mpm_prefork_module is active in Apache, which can be detected with the command 

apachectl -M

It is possible configure the number of processes ( MaxRequestWorkers ) depending on the size of RAM that is available. At the same time it is possible to monitor the memory usage with the command

 top

The configuration is done in the file /etc/apache2/mods-available/mpm_prefork.conf and instructions how to calculate the correct values is on server https://www.linuxatemyram.com/