How to figure out how much RAM each prefork thread requires for maximum Wordpress performance on an EC2 small instance
Posted
by
two7s_clash
on Server Fault
See other posts from Server Fault
or by two7s_clash
Published on 2012-03-28T04:31:12Z
Indexed on
2012/03/28
5:33 UTC
Read the original article
Hit count: 671
Just read Making WordPress Stable on EC2-Micro
In the "Tuning Apache" section, I can't quite figure out how he comes up with his numbers for his prefork config.
He explains how to get the numbers for an average process, which I get. But then:
Or roughly 53MB per process...In this case, ten threads should be safe. This means that if we receive more than ten simultaneous requests, the other requests will be queued until a worker thread is available. In order to maximize performance, we will also configure the system to have this number of threads available all of the time.
From 53MB per process, with 613MB of RAM, he somehow gets this config, which I don't get:
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 10
MaxClients 10
MaxRequestsPerChild 4000
</IfModule>
How exactly does he get this from 53MB per process, with 613MB limit?
Bonus question
From the below, on a small instance (1.7 GB memory), what would good settings be?
bitnami@ip-10-203-39-166:~$ ps xav |grep httpd
1411 ? Ss 0:00 2 0 114928 15436 0.8 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1415 ? S 0:06 10 0 125860 55900 3.1 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1426 ? S 0:08 19 0 127000 62996 3.5 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1446 ? S 0:05 48 0 131932 72792 4.1 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1513 ? S 0:05 7 0 125672 54840 3.1 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1516 ? S 0:02 2 0 125228 48680 2.7 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1517 ? S 0:06 2 0 127004 55796 3.1 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1518 ? S 0:03 1 0 127196 54208 3.0 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
1531 ? R 0:04 0 0 127500 54236 3.0 /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
© Server Fault or respective owner