<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why do you need many apache children ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Mon, 22 Mar 2010 10:27:14 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rubén Ortiz &#187; Apache. MaxClients y más&#8230;</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-298299</link>
		<dc:creator>Rubén Ortiz &#187; Apache. MaxClients y más&#8230;</dc:creator>
		<pubDate>Tue, 13 May 2008 08:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-298299</guid>
		<description>[...] http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/" rel="nofollow">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-244165</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 17 Feb 2008 21:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-244165</guid>
		<description>Moreover I have one question on optimal concurrent mysql connection in active state.

If all the queries required in each php script on a web site are optimized best, which is the optimal concurrent mysql connections in busy state?

If single query is optimized well, it takes only 0.005 seconds or so.

If so 100 concurrent mysql connections per second can handle 20000 queries per second.

Front end queries does not include complex group by or extra file sorting at all.

Of course, the optimal concurrent mysql connections may be dependent on the available RAM and speed of disks.

I just want to know overall number to predict when we should separate master db server into several ones.</description>
		<content:encoded><![CDATA[<p>Moreover I have one question on optimal concurrent mysql connection in active state.</p>
<p>If all the queries required in each php script on a web site are optimized best, which is the optimal concurrent mysql connections in busy state?</p>
<p>If single query is optimized well, it takes only 0.005 seconds or so.</p>
<p>If so 100 concurrent mysql connections per second can handle 20000 queries per second.</p>
<p>Front end queries does not include complex group by or extra file sorting at all.</p>
<p>Of course, the optimal concurrent mysql connections may be dependent on the available RAM and speed of disks.</p>
<p>I just want to know overall number to predict when we should separate master db server into several ones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-244159</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 17 Feb 2008 21:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-244159</guid>
		<description>Thanks very much peter.

I found the problem of slow down of our site with small load of db server, web server thanks to this article.

Timeout setting in httpd.conf do great harm to so many mysql connections in sleep state for so long time(wait_timeout).

Original timeout was set to default (300 seconds).  Some terribly slow http connection consumes timeout limit to get served from our web server, so there are many child processes even if actual traffic is not overloaded.

So mysql connection opened in slow HTTP connection reaches to wait_timeout and MySQL aborts those mysql connections.

There were about 200 Aborted_Clients per hour in mysql error log.

After changing Timeout directive in httpd.conf, all seems to be ok.

Mysql connections in sleep state only are available for short duration and there are no aboted_clients in mysql error log.

Opening site is so fast.

I have some relationship with chief architect of naver (no1. korean search portal).

Naver guru explained to me that the main bottleneck of web server only serving php scripts is CPU not RAM.

Modern best dual CPUs can handle at most 200 concurrent apache child processes, so Naver prepare to add new php dedicated web server when concurrent apache connection reaches to 100 at peak time.

Their daily page views handled by single php web server is 2 million or so.

So I think 100 concurrent apache child processes in well arranged server architecture( separation role to multiple servers like separation static file server, db server with highly optimized query and schema ) may be more optimal.

Anyway, thanks for your great articles.

I am always taking benefit from your articles.

I had no experiece at web developement 1 year ago, however, I am struggling to make scalable and stable large web site( no. 1 social networking site in China).  In China, it is really hard to find guru on mysql, optimization because there are so many web sites cheating traffic.

Many Chinese web sites does not have real traffic, only cheating alexa traffic and do evil.
So there are small guru on optimization, scalability..</description>
		<content:encoded><![CDATA[<p>Thanks very much peter.</p>
<p>I found the problem of slow down of our site with small load of db server, web server thanks to this article.</p>
<p>Timeout setting in httpd.conf do great harm to so many mysql connections in sleep state for so long time(wait_timeout).</p>
<p>Original timeout was set to default (300 seconds).  Some terribly slow http connection consumes timeout limit to get served from our web server, so there are many child processes even if actual traffic is not overloaded.</p>
<p>So mysql connection opened in slow HTTP connection reaches to wait_timeout and MySQL aborts those mysql connections.</p>
<p>There were about 200 Aborted_Clients per hour in mysql error log.</p>
<p>After changing Timeout directive in httpd.conf, all seems to be ok.</p>
<p>Mysql connections in sleep state only are available for short duration and there are no aboted_clients in mysql error log.</p>
<p>Opening site is so fast.</p>
<p>I have some relationship with chief architect of naver (no1. korean search portal).</p>
<p>Naver guru explained to me that the main bottleneck of web server only serving php scripts is CPU not RAM.</p>
<p>Modern best dual CPUs can handle at most 200 concurrent apache child processes, so Naver prepare to add new php dedicated web server when concurrent apache connection reaches to 100 at peak time.</p>
<p>Their daily page views handled by single php web server is 2 million or so.</p>
<p>So I think 100 concurrent apache child processes in well arranged server architecture( separation role to multiple servers like separation static file server, db server with highly optimized query and schema ) may be more optimal.</p>
<p>Anyway, thanks for your great articles.</p>
<p>I am always taking benefit from your articles.</p>
<p>I had no experiece at web developement 1 year ago, however, I am struggling to make scalable and stable large web site( no. 1 social networking site in China).  In China, it is really hard to find guru on mysql, optimization because there are so many web sites cheating traffic.</p>
<p>Many Chinese web sites does not have real traffic, only cheating alexa traffic and do evil.<br />
So there are small guru on optimization, scalability..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-232645</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 22 Jan 2008 11:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-232645</guid>
		<description>Oh absolutely. Apache tuning is another angle.</description>
		<content:encoded><![CDATA[<p>Oh absolutely. Apache tuning is another angle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Apache</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-232627</link>
		<dc:creator>Apache</dc:creator>
		<pubDate>Tue, 22 Jan 2008 10:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-232627</guid>
		<description>How about apache tuning? Disabling modules that are not needed. Nice tips thought!</description>
		<content:encoded><![CDATA[<p>How about apache tuning? Disabling modules that are not needed. Nice tips thought!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peufeu</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-108344</link>
		<dc:creator>Peufeu</dc:creator>
		<pubDate>Sat, 14 Apr 2007 20:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-108344</guid>
		<description>&gt; spoon feeding

This is extra worse when you read the PHP docs and believe you&#039;re better without output buffering. Then you start a transaction, emit some HTML, and the PHP page stays there waiting for the client to receive the data and sitting on its transaction locks.</description>
		<content:encoded><![CDATA[<p>&gt; spoon feeding</p>
<p>This is extra worse when you read the PHP docs and believe you&#8217;re better without output buffering. Then you start a transaction, emit some HTML, and the PHP page stays there waiting for the client to receive the data and sitting on its transaction locks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Apache</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-82637</link>
		<dc:creator>Apache</dc:creator>
		<pubDate>Wed, 14 Mar 2007 18:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-82637</guid>
		<description>I&#039;ve wrote an article about this a while ago...
http://www.devside.net/articles/apache-performance-tuning

The top on my list, is RAM, using the right MPM, configuring the MPM for your situation, setting KeepAlive to 2 seconds, and separating servers for static and dynamic content by either using Tux or Lighttpd.

Usually, the biggest issue is the default MPM settings, which are almost always set too high. You want the server to utilize all available resources, and not crash the system or make it unresponsive.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve wrote an article about this a while ago&#8230;<br />
<a href="http://www.devside.net/articles/apache-performance-tuning" rel="nofollow">http://www.devside.net/articles/apache-performance-tuning</a></p>
<p>The top on my list, is RAM, using the right MPM, configuring the MPM for your situation, setting KeepAlive to 2 seconds, and separating servers for static and dynamic content by either using Tux or Lighttpd.</p>
<p>Usually, the biggest issue is the default MPM settings, which are almost always set too high. You want the server to utilize all available resources, and not crash the system or make it unresponsive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Performance Blog &#187; Content delivery system design mistakes</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-49314</link>
		<dc:creator>MySQL Performance Blog &#187; Content delivery system design mistakes</dc:creator>
		<pubDate>Sun, 11 Feb 2007 11:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-49314</guid>
		<description>[...] Keep Alive  In my previous post I wrote you often do not need keep alive for dynamic pages (there are also exceptions) but you really should have Keep Alive enabled while serving images. It especially hurts not to have one if 30 thumbnails are loaded per page if you do not have one. [...]</description>
		<content:encoded><![CDATA[<p>[...] Keep Alive  In my previous post I wrote you often do not need keep alive for dynamic pages (there are also exceptions) but you really should have Keep Alive enabled while serving images. It especially hurts not to have one if 30 thumbnails are loaded per page if you do not have one. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-47401</link>
		<dc:creator>Alexey</dc:creator>
		<pubDate>Thu, 08 Feb 2007 20:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-47401</guid>
		<description>mpm-event is targeted for Win32 arch. On *nix there&#039;s no big difference between threads and processes. All pages that remain unchanged after fork() don&#039;t consume memory anyway, main memory consumtion comes from allocations on stack and heap.
it&#039;s pretty easy to test - launch 10 children of mod_php-enabled apache, then launch 255 children, and compare overall memory usage.

using light frontend for serving static content and buffering dynamic content is a must for a big project. otherwise your server is getting too vulnerable to simple attacks - just open 255 connections, send first line of the request (to overcome accept filters), and saturate all slots. light frontends have no trouble keeping tens of thousands connections open.</description>
		<content:encoded><![CDATA[<p>mpm-event is targeted for Win32 arch. On *nix there&#8217;s no big difference between threads and processes. All pages that remain unchanged after fork() don&#8217;t consume memory anyway, main memory consumtion comes from allocations on stack and heap.<br />
it&#8217;s pretty easy to test &#8211; launch 10 children of mod_php-enabled apache, then launch 255 children, and compare overall memory usage.</p>
<p>using light frontend for serving static content and buffering dynamic content is a must for a big project. otherwise your server is getting too vulnerable to simple attacks &#8211; just open 255 connections, send first line of the request (to overcome accept filters), and saturate all slots. light frontends have no trouble keeping tens of thousands connections open.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/comment-page-1/#comment-44937</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 06 Feb 2007 11:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/02/05/why-do-you-need-many-apache-children/#comment-44937</guid>
		<description>Maciek,

I already wrote about it in the article I mention at the start of this article.  Yes quite frequently simply putting something in front is great idea.   I use lighttpd in many cases  - it works well and extremely easy to configure as proxy.     

There are some things I do not like in lighttpd running in such mode.  The main problem it buffers data fully before sending it back, meaning  if you happen to have 1GB file downloaded it will allocate 1GB of RAM for the purpose.  The other one is not using keep-alive for talking to the server which means a bit lower performance and it also means you can run out of local sockets in case of very high load.</description>
		<content:encoded><![CDATA[<p>Maciek,</p>
<p>I already wrote about it in the article I mention at the start of this article.  Yes quite frequently simply putting something in front is great idea.   I use lighttpd in many cases  &#8211; it works well and extremely easy to configure as proxy.     </p>
<p>There are some things I do not like in lighttpd running in such mode.  The main problem it buffers data fully before sending it back, meaning  if you happen to have 1GB file downloaded it will allocate 1GB of RAM for the purpose.  The other one is not using keep-alive for talking to the server which means a bit lower performance and it also means you can run out of local sockets in case of very high load.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
