Re: mod_jk --enable-prefork
Hi Fred, mostly yes, but you could write modules, that break this assumption. An indication is mod_cgi, which exists as mod_cgi and mod_cgid. Another hint into this direction is, that httpd doesn't provide a clean way of exchanging MPMs after compilation. In general it is better to compile the module against the MPM you want to use unless you know the code of the module good enough to judge about its MPM independancy. Regards, Rainer fredk2 wrote: Many thanks for your reply. Is it always implied that if an apache module is deemed 'thread safe' it also implies that it will work in prefork environment maybe at the cost of raw performance ? Thanks again - Fred Rainer Jung-3 wrote: fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk --enable-prefork
Thanks, So in this case reading some of your past responses (and your source knowledge), we do not have to worry about threaded mod_jk misbehaving in a prefork apache - on linux and solaris that is :-) Rgds - Fred Rainer Jung-3 wrote: Hi Fred, mostly yes, but you could write modules, that break this assumption. An indication is mod_cgi, which exists as mod_cgi and mod_cgid. Another hint into this direction is, that httpd doesn't provide a clean way of exchanging MPMs after compilation. In general it is better to compile the module against the MPM you want to use unless you know the code of the module good enough to judge about its MPM independancy. Regards, Rainer fredk2 wrote: Many thanks for your reply. Is it always implied that if an apache module is deemed 'thread safe' it also implies that it will work in prefork environment maybe at the cost of raw performance ? Thanks again - Fred Rainer Jung-3 wrote: fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/mod_jk---enable-prefork-tf4417291.html#a12628071 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk --enable-prefork
Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) Many thanks - Fred -- View this message in context: http://www.nabble.com/mod_jk---enable-prefork-tf4417291.html#a12599440 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk --enable-prefork
fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk --enable-prefork
Many thanks for your reply. Is it always implied that if an apache module is deemed 'thread safe' it also implies that it will work in prefork environment maybe at the cost of raw performance ? Thanks again - Fred Rainer Jung-3 wrote: fredk2 wrote: Hi, The documentation for mod_jk (eg. version 1.2.25) about --enable-prefork says: In case you build mod_jk for a multi-threaded Apache httpd 2.0/2.2 MPM (Multi-Processing Module), some areas of mod_jk code need to be synchronized to make it thread-safe. Because configure can not easily detect, whether your are using a multi-threaded MPM, mod_jk by default is always build thread-safe for Apache httpd 2.0/2.2. If you are sure, that your MPM is not multi-threaded, you can use --enable-prefork to force the removal of the synchronization code (thus increasing performance a bit). For instance, the prefork MPM is not multi-threaded. For Apache httpd 1.3 this flag will be set automatically. If you specify apxs, doesn't it require a config_vars.mk which has a value pair MPM_NAME = prefork and thus configure could know that prefork was used? Alternatively assuming that apxs is in the same directory then 'httpd -V' could tell that Server MPM: Prefork You are right: apxs -q MPM_NAME would do the trick. I didn't find that one, thanks. On the other hand, we would still need to manage a list of MPMs (which MPM on which platform is single-threaded) and there is some danger, that people have more than one mpm installed (like on many linux distros) and compile against prefork, later use against worker. All in all I'm still in favor of building thread safe by default and only when explicitely requested removing the thread synchronization. The question I have: if the Apache httpd v2.2 is prefork and the mod_jk is compiled default threaded, are there any potential instabilities? (on Solaris and Linux) No, not that we aware of any. On both platforms, the default was building thread safe for a long time. We use pthread mutexes and no problems have been reported with those. Many thanks - Fred Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/mod_jk---enable-prefork-tf4417291.html#a12600955 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]