Re: [OT] Apache httpd prefork versus worker MPM
On 19.07.2009 20:46, James Abley wrote: James Abley wrote: This assumes that mod_jk is thread-safe and doesn't suffer from the known problems with non-thread-safe modules in worker MPM. Can anyone confirm that's true? Answering my own question; from the docs, it looks like mod_jk is built by default to be thread-safe, and you need to switch that off using the --enable-prefork option at build time. [1] [1] http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html#configure%20arguments Don't know, whether this is still relevant after a couple of weeks: yes, the above is true, at least since a couple of versions of mod_jk. Previously it tried to detect the MPM during build, but that was broken for some platforms like AIX, so we thought it's safer to assume a threaded environment by default, also allowing to switch between the MPMs without recompilation of mod_jk. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Apache httpd prefork versus worker MPM
mgainty wrote: the inherent problem with multi-threaded model vs prefork n processes http://blog.zakame.net/tips/apache2-worker-lowmem http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_24192924.html rule seems to be more than 1 CPU go with worker 1 CPU go with MPM once you set your path on Worker all modules and all binaries under Apache have to be multi-threaded YMMV Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 17 Jul 2009 21:17:51 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: [OT] Apache httpd prefork versus worker MPM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I've been working with Apache httpd and Tomcat together with mod_jk for about 10 years, and I've always been using the prefork MPM. I'm setting up a new development server with Debian Lenny and apt-get prefers to install the worker MPM. I can definitely install the prefork MPM if I want, but I figured I'd take this opportunity to ask about the worker MPM. Has anyone had any configuration problems when using the worker MPM? Any performance problems? The worker MPM is advertised as high-performance and I was wondering if it would be a PITA to use or anything like that. If the worker MPM really is higher performance, I'd prefer to use that, but only if there are no big gotchas that anyone can think of. I'd appreciate some feedback from folks that have used both the prefork and worker MPMs at one point, and might be able to comment on their different experiences. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkphIr8ACgkQ9CaO5/Lv0PCM8gCePSdyOk5U1rt5yndOsrta/E+B yuQAnjmhsTZn6s9Fg0Z8x3QgJRh9ejw7 =Fmnd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows Live™ SkyDrive™: Store, access, and share your photos. See how. http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009 My reading of it, which someone else on this list might be able to confirm, is that using mod_jk with worker MPM can potentially give lower memory usage on the machine. e.g. with IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 /IfModule That will potentially create 256 httpd processes, each consuming 10MB or so. Alternatively, IfModule worker.c StartServers 2 MaxClients 250 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule That will potentially create 10 httpd processes, each capable of handling 25 requests. Assume that each process needs 30MB (I don't think it would, but I haven't measured it recently). The reduced memory requirement for this configuration might be a very attractive option for some environments. This assumes that mod_jk is thread-safe and doesn't suffer from the known problems with non-thread-safe modules in worker MPM. Can anyone confirm that's true? Cheers, James -- View this message in context: http://www.nabble.com/-OT--Apache-httpd-prefork-versus-worker-MPM-tp24543852p24559610.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Apache httpd prefork versus worker MPM
James Abley wrote: mgainty wrote: the inherent problem with multi-threaded model vs prefork n processes http://blog.zakame.net/tips/apache2-worker-lowmem http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_24192924.html rule seems to be more than 1 CPU go with worker 1 CPU go with MPM once you set your path on Worker all modules and all binaries under Apache have to be multi-threaded YMMV Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 17 Jul 2009 21:17:51 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: [OT] Apache httpd prefork versus worker MPM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I've been working with Apache httpd and Tomcat together with mod_jk for about 10 years, and I've always been using the prefork MPM. I'm setting up a new development server with Debian Lenny and apt-get prefers to install the worker MPM. I can definitely install the prefork MPM if I want, but I figured I'd take this opportunity to ask about the worker MPM. Has anyone had any configuration problems when using the worker MPM? Any performance problems? The worker MPM is advertised as high-performance and I was wondering if it would be a PITA to use or anything like that. If the worker MPM really is higher performance, I'd prefer to use that, but only if there are no big gotchas that anyone can think of. I'd appreciate some feedback from folks that have used both the prefork and worker MPMs at one point, and might be able to comment on their different experiences. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkphIr8ACgkQ9CaO5/Lv0PCM8gCePSdyOk5U1rt5yndOsrta/E+B yuQAnjmhsTZn6s9Fg0Z8x3QgJRh9ejw7 =Fmnd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows Live™ SkyDrive™: Store, access, and share your photos. See how. http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009 My reading of it, which someone else on this list might be able to confirm, is that using mod_jk with worker MPM can potentially give lower memory usage on the machine. e.g. with IfModule prefork.c StartServers 8 MinSpareServers5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 /IfModule That will potentially create 256 httpd processes, each consuming 10MB or so. Alternatively, IfModule worker.c StartServers 2 MaxClients 250 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule That will potentially create 10 httpd processes, each capable of handling 25 requests. Assume that each process needs 30MB (I don't think it would, but I haven't measured it recently). The reduced memory requirement for this configuration might be a very attractive option for some environments. This assumes that mod_jk is thread-safe and doesn't suffer from the known problems with non-thread-safe modules in worker MPM. Can anyone confirm that's true? Cheers, James Answering my own question; from the docs, it looks like mod_jk is built by default to be thread-safe, and you need to switch that off using the --enable-prefork option at build time. [1] [1] http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html#configure%20arguments -- View this message in context: http://www.nabble.com/-OT--Apache-httpd-prefork-versus-worker-MPM-tp24543852p24559768.html Sent from the Tomcat - User mailing list archive at Nabble.com.
Re: [OT] Apache httpd prefork versus worker MPM
Christopher Schultz wrote: ... Hi Chris. My 0.02 €. I have been using both the prefork and worker versions of Apache 2.2, along with mod_jk. As far as I can tell, there is no problem in that respect with mod_jk. However, the threaded (worker) version may give you problems if, somewhere maybe deep down, there is a piece of software running under Apache, that is not thread-safe. It very much depends thus on what you really use at the Apache side. I have only had a couple of problems in the past because I am also running mod_perl under Apache, and some older perl modules sometimes make use of some older C libraries which are (or were) not thread-safe. I have not had any trouble with any of the standard Apache modules. I seem to remember that there might be (or might have been) some issues when using SSL. But I'm not quite sure how long ago that was, and if it is still an issue currently under Debian Lenny. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Apache httpd prefork versus worker MPM
the inherent problem with multi-threaded model vs prefork n processes http://blog.zakame.net/tips/apache2-worker-lowmem http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_24192924.html rule seems to be more than 1 CPU go with worker 1 CPU go with MPM once you set your path on Worker all modules and all binaries under Apache have to be multi-threaded YMMV Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 17 Jul 2009 21:17:51 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: [OT] Apache httpd prefork versus worker MPM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I've been working with Apache httpd and Tomcat together with mod_jk for about 10 years, and I've always been using the prefork MPM. I'm setting up a new development server with Debian Lenny and apt-get prefers to install the worker MPM. I can definitely install the prefork MPM if I want, but I figured I'd take this opportunity to ask about the worker MPM. Has anyone had any configuration problems when using the worker MPM? Any performance problems? The worker MPM is advertised as high-performance and I was wondering if it would be a PITA to use or anything like that. If the worker MPM really is higher performance, I'd prefer to use that, but only if there are no big gotchas that anyone can think of. I'd appreciate some feedback from folks that have used both the prefork and worker MPMs at one point, and might be able to comment on their different experiences. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkphIr8ACgkQ9CaO5/Lv0PCM8gCePSdyOk5U1rt5yndOsrta/E+B yuQAnjmhsTZn6s9Fg0Z8x3QgJRh9ejw7 =Fmnd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Windows Live™ SkyDrive™: Store, access, and share your photos. See how. http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009