0

I have bought new linode (1GB).

On this page :https://www.linode.com/docs/websites/lamp/install-lamp-on-ubuntu-16-04

Linode says:

Below are the suggested values for a 1GB Linode:

File:/etc/apache2/mods-available/mpm_prefork.conf

<IfModule mpm_prefork_module>
        StartServers            2
        MinSpareServers         6
        MaxSpareServers         12
        MaxRequestWorkers       39
        MaxConnectionsPerChild  3000
</IfModule>

But I'll plan to upgrade 2GB OR 4GB machine. What should be above values for 2GB or 4GB machine and WHY?

OS: Ubuntu 16.04 LTS

hakkikonu
  • 109
  • 1
  • 1
  • 4
  • What is your average Apache process size? How much memory do you need for other applications, e.g. MySQL, etc.? – Colt May 14 '16 at 21:32

1 Answers1

0

Look at your average Apache process size to get usage x MB. Consider how much memory you want to keep available for other processes y MB and use this formula for prefork.

(Total RAM – yMB)/xMB = MaxRequestWorkers

NOTE: the "y" value will always be at least 500 MB just for Apache itself and the operating system, and may well need to be more depending on other applications.

As to the other values, the Apache documentation repeatedly advises against raising these values except "on very busy sites," of which by definition a site having only 2-4 GB total RAM will never be. The following will be good:

StartServers         2
MinSpareServers      5
MaxSpareServers     10

For additional reference, you can look at the Apache Documentation for performance tuning this issue.

Colt
  • 1,939
  • 6
  • 20
  • 25