Hi all, I am facing facing performance issues with our web servers which is working for concurrent 250 requests properly and then stops responding when the requests are more than 250 . The current configuration parameters are as follows : apachectl -version Server version: Apache/2.0.52 Server built: Jan 30 2007 09:56:16 Kernel : 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux Server Hardware : MAIN MEMORY (i) Memory Size 4 GB Dual-Core Intel 5160 processors. httpd.conf Timeout 300 KeepAlive On MaxKeepAliveRequests 1000 KeepAliveTimeout 150 ## Server-Pool Size Regulation (MPM specific) # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # ServerLimit: maximum value for MaxClients for the lifetime of the server # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 251 MaxClients 251 MaxRequestsPerChild 4000 </IfModule> # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> I want to know about the difference between worker MPM and Prefork MPM , how to find out which one will be used by my apache server and the recommended one for highly loaded server.If some one provide me the link that best explains above two comparison also be very use full. Can any one guide me tuning to be done for the maximum utilization of the Resources and better performance of the Servers. Regards, lingu
Am 20.01.2009 um 19:39 schrieb linux-crazy:> Hi all, > > I am facing facing performance issues with our web servers which is > working for concurrent 250 requests properly and then stops > responding when the requests are more than 250 . > > The current configuration parameters are as follows :Only use prefork MPM (worker is for Win32, AFAIK). If you set ServerLimit to 251, that's the limit. Set ServerLimit and MaxClients to the same value. (Larger than 250) OK? And take a couple of minutes to study the apache documentation. It's actually quite good and tranlated into many languages... BUT: what your server is being able to handle also depends on what you actually serve (PHP/JSP/Servelets/Perl/whatever! This is usually not a problem that is easily described and solved in two sentences. Rainer
linux-crazy wrote:> Hi all, > > I am facing facing performance issues with our web servers which is > working for concurrent 250 requests properly and then stops > responding when the requests are more than 250 .Increase your MaxClients configuration, also enable if you haven't already the server-status module and monitor the server via http://<your server name>/server-status it will show how many workers are busy and what they are doing. As for which to use, prefork is the old forked method of doing things, the other uses threads. Depending on what kind of application your running on top of apache, if it is not thread safe(at some point many PHP modules were not thread safe), you may want to use prefork. Otherwise you can use the threading model. If your not sure I'd say stick to prefork to be safe until you can determine for sure that threading is safe. nate
linux-crazy wrote:> I want to know about the difference between worker MPM and > Prefork MPM , how to find out which one will be used by my apache > server and the recommended one for highly loaded server.If some one > provide me the link that best explains above two comparison also be > very use full. > > > Can any one guide me tuning to be done for the maximum utilization > of the Resources and better performance of the Servers. >Most list members would likely advise sticking with the prefork configuration. Without knowing what kind of applications you are running on your webserver, I wouldn't suggest changing it. Merely increasing the number of workers might make performance worse. Use ps or top to figure out how much each apache worker is using. Then decide how much ram you want to dedicate on your server to Apache, without going into swap. (Over-allocating and then paging out memory will only make performance much worse.) For example, if I have 2G or ram, and I want 1.5 for apache workers, my average apache worker size (resident memory) is 65MB, then I have room for 23 workers. (1024 * 1.5 ) / 65. (There are more accurate ways to calculate this usage, like taking shared memory into account.) Upgrading the ram in your web server is a pretty fast interim solution. Consider your application performance, too. The longer a request in your application takes, the more workers are in use on your web server, taking up more memory. If you have long-running queries in your database, take care of those first. Good luck Jed
On Wed, 21 Jan 2009 00:09:38 +0530 linux-crazy <hicheerup at gmail.com> wrote:> Hi all, > > I am facing facing performance issues with our web servers which is > working for concurrent 250 requests properly and then stops > responding when the requests are more than 250 . > > ... > > Can any one guide me tuning to be done for the maximum utilization > of the Resources and better performance of the Servers.Also take a look at apache alternatives like lighttpd and nginx. In certain cases they do miracles. -- Jure Pe?ar http://jure.pecar.org/ http://f5j.eu
Linux-crazy wrote on Wed, 21 Jan 2009 00:09:38 +0530:> KeepAliveTimeout 150My god, reduce this to 10 or 5.> ServerLimit 251 > MaxClients 251There's your limit. However, you should check with your hardware if upping it is really desirable. With 4 GB I think you won't be able to handle much more anyway. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
> > > KeepAliveTimeout 150 > >reduce this to 10 or 5. > > > Kai > > -- > Kai Sch?tzl, Berlin, GermanyKai, what do you think about the "general Timeout it is set to 300 ive never much thought about it, yet should we be consider and possible reduce that one too? - rh