Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
Hi, I'm having the same kind of interrogation. Concerning me, I'm working on a project that's still in development, and I'm developing under Windows (MP2, ActivePerl 5.8.8 Build 816 , Apache 2.055) I'll have to make a choice for the production environment, and I'm not sure what to choose. I'll have to make tests. Of course, most people seem to use a LAMP environment, and most docs are Linux flavoured. Under Windows, when launching my Apache Server, there seems to be 4 starts in all (Start -> Restart -> Start -> Restart). I can see that with preloaded modules, that are loaded 4 times in all. Moreover, I'm not sure how efficient is the Winnt MPM, related to Perl. As you know, under Windows, the server is working in a threaded environment (one child process containing several threads). As there's just one child, the PerlChildInitHandler is quite useless, and it would be good to have a grasp at Thread starts (having something like a "PerlThreadInitHandler" or a "PerlInterpInitHandler" to be able to initialize Perl Interpreter specific stuff) But I'm quite confident I'll be able to use a Windows environment for my production server, things tseem to have improved a lot (even if I'll make comparisons anyway with a LAMP environment, in term of CPU usage, and memory sharing efficiency) - Original Message - From: "Foo Ji-Haw" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 26, 2006 8:21 AM Subject: How many people use the Windows combo of Apache2 + mod_perl2 ? Just want to do a quick poll here. Most of the comments I read here, come from people who use the Linux/ BSD platform. Is there anybody who actually deploy the Windows combo on a production server? For those who do, do you have any issues that are Windows-specific? For me for example, my gripe is that I cannot use ServerUtil::restart_count to determine the instance of the final startup of the service, due to the implementation nature of mp2
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
Foo Ji-Haw wrote: Just want to do a quick poll here. Most of the comments I read here, come from people who use the Linux/ BSD platform. Is there anybody who actually deploy the Windows combo on a production server? For those who do, do you have any issues that are Windows-specific? For me for example, my gripe is that I cannot use ServerUtil::restart_count to determine the instance of the final startup of the service, due to the implementation nature of mp2 Back in 2000, I _sadly_ used to deploy ActiveState Perl 6xx, PerlEx 2.1 with IIS 5.0. the code didn't get that advanced. My biggest gripe was the ppm repositories were far behind that of CPAN, or modules were only available in ActiveState Perl 8xx. That particular behavior (restart_count) trips a lot of people up even on BSD / Linux based platforms. Its been a while and Phillippe will probably correct me here, but I remember there be hard memory limit of 8GB with PerlEx. We had filed a bug report, but I don't think it was high enough priority for them to look at at the time. I wasn't really a big fan of setting things like Interpreter threads, tracing, and etc... in the Windows registry either. HTH -- Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "It takes a minute to have a crush on someone, an hour to like someone, and a day to love someone, but it takes a lifetime to forget someone..."
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
modules, that are loaded 4 times in all. You might we watching each Interpreter thread start, IIRC they start in sequence and not simultaneously. At any rate, thats a feature of the winnt mpm. Moreover, I'm not sure how efficient is the Winnt MPM, related to Perl. As you know, under Windows, the server is working in a threaded environment Perl + Threads ... hmmm I choose to run away in most cases :) "PerlInterpInitHandler" to be able to initialize Perl Interpreter specific stuff) You might actually be able to add something to the registry depending on how complex you want to get... But like I said before, 6 years ago now :) Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "It takes a minute to have a crush on someone, an hour to like someone, and a day to love someone, but it takes a lifetime to forget someone..."
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
IIRC, PerlEx was discontinued a few years ago, I think shortly after the Sophos acquisition. I've recently seen it quietly reappear in standard ActivePerl distributions, but not sure where (if anywhere) the great folks at ActiveState are going with it... Issac Philip M. Gollucci wrote: > Foo Ji-Haw wrote: >> Just want to do a quick poll here. >> >> Most of the comments I read here, come from people who use the Linux/ >> BSD platform. Is there anybody who actually deploy the Windows combo >> on a production server? For those who do, do you have any issues that >> are Windows-specific? >> >> For me for example, my gripe is that I cannot use >> ServerUtil::restart_count to determine the instance of the final >> startup of the service, due to the implementation nature of mp2 > > Back in 2000, I _sadly_ used to deploy ActiveState Perl 6xx, PerlEx > 2.1 with IIS 5.0. the code didn't get that advanced. My biggest > gripe was the ppm repositories were far behind that of CPAN, or > modules were only available in ActiveState Perl 8xx. > > That particular behavior (restart_count) trips a lot of people up even > on BSD / Linux based platforms. > > Its been a while and Phillippe will probably correct me here, but I > remember there be hard memory limit of 8GB with PerlEx. We had filed > a bug report, but I don't think it was high enough priority for them > to look at at the time. > > I wasn't really a big fan of setting things like Interpreter threads, > tracing, and etc... in the Windows registry either. > > HTH > >
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
A long time back (year 2000 I think) I tried ActivePerl 5.6 with PerlEx. It was terrible. We reverted to the Velocigen accelerator instead, and that was good. But I'm not sure where Velocigen is now. My gut feel for PerlEx now...better not try. Issac Goldstand wrote: IIRC, PerlEx was discontinued a few years ago, I think shortly after the Sophos acquisition. I've recently seen it quietly reappear in standard ActivePerl distributions, but not sure where (if anywhere) the great folks at ActiveState are going with it... Issac Philip M. Gollucci wrote: Foo Ji-Haw wrote: Just want to do a quick poll here. Most of the comments I read here, come from people who use the Linux/ BSD platform. Is there anybody who actually deploy the Windows combo on a production server? For those who do, do you have any issues that are Windows-specific? For me for example, my gripe is that I cannot use ServerUtil::restart_count to determine the instance of the final startup of the service, due to the implementation nature of mp2 Back in 2000, I _sadly_ used to deploy ActiveState Perl 6xx, PerlEx 2.1 with IIS 5.0. the code didn't get that advanced. My biggest gripe was the ppm repositories were far behind that of CPAN, or modules were only available in ActiveState Perl 8xx. That particular behavior (restart_count) trips a lot of people up even on BSD / Linux based platforms. Its been a while and Phillippe will probably correct me here, but I remember there be hard memory limit of 8GB with PerlEx. We had filed a bug report, but I don't think it was high enough priority for them to look at at the time. I wasn't really a big fan of setting things like Interpreter threads, tracing, and etc... in the Windows registry either. HTH
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
Hi, modules, that are loaded 4 times in all. You might we watching each Interpreter thread start, IIRC they start in sequence and not simultaneously. At any rate, thats a feature of the winnt mpm. Unless I'm missing a point, I'm not convinced by that. Indeed, I made further tests, and no matter how many Perl Interpreters I'm setting at start time, preloaded modules are loaded 4 times. To make that stand out, I created a very simple module: package MyLoadingModule; use Apache2::ServerUtil(); use ModPerl::Util(); open FILE, ">>", "MyModule.txt"; print FILE "Module Loaded: restart_count: ", Apache2::ServerUtil::restart_count(), " # Perl Interpreter:", ModPerl::Util::current_perl_id(), "\n"; close FILE; 1; which sole purpose is to show that it's being loaded, and to show the restart_count value. I'm preloading this module, using "PerlModule MyLoadingModule" in httpd.conf. And when starting the server, this shows in "MyModule.txt": Module Loaded: restart_count: 1 # Perl Interpreter:0x26ebbc Module Loaded: restart_count: 2 # Perl Interpreter:0x8901dc Module Loaded: restart_count: 1 # Perl Interpreter:0x26ec54 Module Loaded: restart_count: 2 # Perl Interpreter:0xe6e29c This clearly shows that the server is started 4 times. I suppose that the main parent process is start then restarted. And then, the child process is started and restarted? I'm not sure about the details, but this is what I'm guessing. One could notice that the Perl Interpreter aaddress is changing everytime. I really would like to understand how the WinNT MPM is working, how memory is shared, in order to make our coding more efficient. The problem is that most docs about memory management under MP is abou LAMP, and I'm not sure the same rules apply... Moreover, I'm not sure how efficient is the Winnt MPM, related to Perl. As you know, under Windows, the server is working in a threaded environment Perl + Threads ... hmmm I choose to run away in most cases :) "PerlInterpInitHandler" to be able to initialize Perl Interpreter specific stuff) You might actually be able to add something to the registry depending on how complex you want to get... But like I said before, 6 years ago now :) Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "It takes a minute to have a crush on someone, an hour to like someone, and a day to love someone, but it takes a lifetime to forget someone..."
Re: anyone with pgpool experience?
On Tue, 18 Apr 2006 08:17:47 +0200 Tom Schindl <[EMAIL PROTECTED]> wrote: > The better approach seems to me using mod_dbd which has the draw back > that it is only available on apache-2.2 at least for mysql it looks > like it's not rocket science to get it working. AFAIK this has not yet been DBIfied and the interface is not yet as rich as the one provided by DBI. One severe limitation is at the moment that you can have only one pool per apache. So having 3 db handles is not an option, at least if they access the db as different users. Of course a db interface provided by apache is a very promising approach. Sincerely, Joachim
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote: > I'm preloading this module, using "PerlModule MyLoadingModule" in > httpd.conf. Does that change if you load them via "use MyLoadingModule" in a startup.pl? > I really would like to understand how the WinNT MPM is working, how memory > is shared, in order to make our coding more efficient. > The problem is that most docs about memory management under MP is abou LAMP, > and I'm not sure the same rules apply... With Perl threads, no memory is shared. There is no advantage to preloading when using threads. It just makes the threads take longer to spawn. - Perrin
Re: anyone with pgpool experience?
Joachim Zobel wrote: > On Tue, 18 Apr 2006 08:17:47 +0200 > Tom Schindl <[EMAIL PROTECTED]> wrote: > > >>The better approach seems to me using mod_dbd which has the draw back >>that it is only available on apache-2.2 at least for mysql it looks >>like it's not rocket science to get it working. > > > AFAIK this has not yet been DBIfied and the interface is not yet as > rich as the one provided by DBI. > > One severe limitation is at the moment that you can have only one pool > per apache. So having 3 db handles is not an option, at least if they > access the db as different users. > > Of course a db interface provided by apache is a very promising > approach. > > Sincerely, > Joachim > > Hi, I don't think you need to DBIfy this. In my thinking you only use the framework to pool the connection. The connection pointer fetched is fed into DBD::MySQL, all this is happing on the C-level and you don't even know that mod_dbd/apr_dbd have been involved. In my thinking you only have to teach DBD::* to use mod_dbd/apr_dbd to fetch the database connection instead of opening one itself. Tom signature.asc Description: OpenPGP digital signature
Re: anyone with pgpool experience?
On 4/26/06 2:15 PM, "Tom Schindl" <[EMAIL PROTECTED]> wrote: > Joachim Zobel wrote: >> On Tue, 18 Apr 2006 08:17:47 +0200 >> Tom Schindl <[EMAIL PROTECTED]> wrote: >> >> >>> The better approach seems to me using mod_dbd which has the draw back >>> that it is only available on apache-2.2 at least for mysql it looks >>> like it's not rocket science to get it working. >> >> >> AFAIK this has not yet been DBIfied and the interface is not yet as >> rich as the one provided by DBI. >> >> One severe limitation is at the moment that you can have only one pool >> per apache. So having 3 db handles is not an option, at least if they >> access the db as different users. >> >> Of course a db interface provided by apache is a very promising >> approach. >> >> Sincerely, >> Joachim >> >> > > Hi, I don't think you need to DBIfy this. In my thinking you only use > the framework to pool the connection. The connection pointer fetched is > fed into DBD::MySQL, all this is happing on the C-level and you don't > even know that mod_dbd/apr_dbd have been involved. > > In my thinking you only have to teach DBD::* to use mod_dbd/apr_dbd to > fetch the database connection instead of opening one itself. Just to jump in here--what is the best source of DOCs for doing this? I haven't started playing with it yet, so I have not done my homework, but was just curious to hear what others have found to be most useful. Thanks, Sean
Re: anyone with pgpool experience?
On Wed, 2006-04-26 at 20:15 +0200, Tom Schindl wrote: > In my thinking you only have to teach DBD::* to use mod_dbd/apr_dbd to > fetch the database connection instead of opening one itself. These typically use the C libraries provided by database vendors. I doubt most of them support a feature like getting a socket somewhere else and treating it like it's a database connection they opened. It would at least mean doing custom C coding in every DBD you want to support, and may not even be possible with the vendor APIs. Making a DBD::mod_dbd is likely to be easier, IMO. Of course I've never written a DBD module myself, and the people who would really know are the ones on the DBI list. - Perrin
Finding Number Of Complete Downloads in access_log
I am looking for a way to find the number of successfully downloads for a particular file. I have noticed 2 issues :- 1. Even when the client cancels the download in between, log shows status code as 200. 2. For range downloads, multiple 206 enteries are logged and one 200 entry, even if the download is cancel in between. Could any one help in this. Thanks, Shailesh
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
Hi, I'm replying below. On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote: I'm preloading this module, using "PerlModule MyLoadingModule" in httpd.conf. Does that change if you load them via "use MyLoadingModule" in a startup.pl? I can't understand how it could change using a startup.pl file? After all, doing a PerlRequire startup.pl is just a way to incoporate code in the main flow, isn't it? Anyway, I gave it a try, and it gave exactly the same results: Module Loaded: restart_count: 1 # Perl Interpreter:0x26ebbc Module Loaded: restart_count: 2 # Perl Interpreter:0x150f29c Module Loaded: restart_count: 1 # Perl Interpreter:0x26ec54 Module Loaded: restart_count: 2 # Perl Interpreter:0x1ac6014 I really would like to understand how the WinNT MPM is working, how memory is shared, in order to make our coding more efficient. The problem is that most docs about memory management under MP is abou LAMP, and I'm not sure the same rules apply... With Perl threads, no memory is shared. There is no advantage to preloading when using threads. It just makes the threads take longer to spawn. I'm really sceptical (and probably lost) with what you're saying here. First of all, from the MP docs itself (http://perl.apache.org/docs/2.0/user/intro/overview.html#Threads_Support), I can read that: Rather than create a PerlInterperter per-thread by default, mod_perl creates a pool of interpreters. The pool mechanism helps cut down memory usage a great deal. As already mentioned, the syntax tree is shared between all cloned interpreters. And concerning me, I couldn't believe there's no difference between preloading components, and loading them at runtime, in term of memory consumption. So, I made extensive tests, creating a simple component (a PerlResponseHandler). I ma deocmparisons between preloading the handler, and loading it at runtime, and then, using 8 concurrent accesses (with 8 Perl Interpreters enabled by default), and I could see some difference in terms of memory consumption. I have got a lot of different results, but for example: When preloading my compoennts, and asking Apache to start 8 Perl Interpreters and then, making 8 concurtrent requests, this was taking 27968 kb of RAM for the main process and 29596 kb of RAM for the child process. On the other hand, without preloading the handler, and then, making 8 concurrent requests (=> handler loaded on the fly), this was taking 11740kb for the main process and 35252kb for the child process... I don't know how to exactly interpret that, but that shows there are some differences. I really would love to understand how sharing is working, and what's exactly shared (or perhaps have the confirmation that nothing is shared under winnt MPMs...?) I think that I should better try with LAMP as well, but to be honest, I have never tried to install Linux. Have you got any resources where I could read about how things are managed under Windows? - Perrin
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
- Original Message - From: "Lionel MARTIN" <[EMAIL PROTECTED]> To: "Perrin Harkins" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, April 26, 2006 4:10 PM Subject: Re: How many people use the Windows combo of Apache2 + mod_perl2 ? Hi, I'm replying below. On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote: I'm preloading this module, using "PerlModule MyLoadingModule" in httpd.conf. Does that change if you load them via "use MyLoadingModule" in a startup.pl? I can't understand how it could change using a startup.pl file? After all, doing a PerlRequire startup.pl is just a way to incoporate code in the main flow, isn't it? Anyway, I gave it a try, and it gave exactly the same results: Module Loaded: restart_count: 1 # Perl Interpreter:0x26ebbc Module Loaded: restart_count: 2 # Perl Interpreter:0x150f29c Module Loaded: restart_count: 1 # Perl Interpreter:0x26ec54 Module Loaded: restart_count: 2 # Perl Interpreter:0x1ac6014 I really would like to understand how the WinNT MPM is working, how memory is shared, in order to make our coding more efficient. The problem is that most docs about memory management under MP is abou LAMP, and I'm not sure the same rules apply... With Perl threads, no memory is shared. There is no advantage to preloading when using threads. It just makes the threads take longer to spawn. I'm really sceptical (and probably lost) with what you're saying here. First of all, from the MP docs itself (http://perl.apache.org/docs/2.0/user/intro/overview.html#Threads_Support), I can read that: Rather than create a PerlInterperter per-thread by default, mod_perl creates a pool of interpreters. The pool mechanism helps cut down memory usage a great deal. As already mentioned, the syntax tree is shared between all cloned interpreters. And concerning me, I couldn't believe there's no difference between preloading components, and loading them at runtime, in term of memory consumption. So, I made extensive tests, creating a simple component (a PerlResponseHandler). I ma deocmparisons between preloading the handler, and loading it at runtime, and then, using 8 concurrent accesses (with 8 Perl Interpreters enabled by default), and I could see some difference in terms of memory consumption. I have got a lot of different results, but for example: When preloading my compoennts, and asking Apache to start 8 Perl Interpreters and then, making 8 concurtrent requests, this was taking 27968 kb of RAM for the main process and 29596 kb of RAM for the child process. On the other hand, without preloading the handler, and then, making 8 concurrent requests (=> handler loaded on the fly), this was taking 11740kb for the main process and 35252kb for the child process... I don't know how to exactly interpret that, but that shows there are some differences. I really would love to understand how sharing is working, and what's exactly shared (or perhaps have the confirmation that nothing is shared under winnt MPMs...?) I think that I should better try with LAMP as well, but to be honest, I have never tried to install Linux. Have you got any resources where I could read about how things are managed under Windows? - Perrin
Re: How many people use the Windows combo of Apache2 + mod_perl2 ?
On Thu, 2006-04-27 at 00:10 +0200, Lionel MARTIN wrote: > I can't understand how it could change using a startup.pl file? After all, > doing a PerlRequire startup.pl is just a way to incoporate code in the main > flow, isn't it? Historically, we have sometimes had bugs with this that caused PerlModule to load code more than once, when use() would not. > Anyway, I gave it a try, and it gave exactly the same results Good. > I'm really sceptical (and probably lost) with what you're saying here. > First of all, from the MP docs itself > (http://perl.apache.org/docs/2.0/user/intro/overview.html#Threads_Support), > I can read that: > > > Rather than create a PerlInterperter per-thread by default, mod_perl creates > a pool of interpreters. The pool mechanism helps cut down memory usage a > great deal. As already mentioned, the syntax tree is shared between all > cloned interpreters. > Liz explains it better than I do: http://marc.theaimsgroup.com/?l=apache-modperl&m=107368048718086&w=2 > I really would love to understand how sharing is working, and what's exactly > shared (or perhaps have the confirmation that nothing is shared under winnt > MPMs...?) I don't know anything about copy-on-write on Win32, but it's mostly irrelevant once you start using Perl threads anyway. They don't get any advantage from copy-on-write. > I think that I should better try with LAMP as well, but to be honest, I have > never tried to install Linux. It's easy to install. The hard part is learning how to use a new OS with new tools. There is an awful lot of help available these days though. - Perrin
Re: Finding Number Of Complete Downloads in access_log
Shailesh Garg wrote: 1. Even when the client cancels the download in between, log shows status code as 200. 2. For range downloads, multiple 206 enteries are logged and one 200 entry, even if the download is cancel in between. You'd probably have better luck on the users \@/ httpd (dot) apache (dot) org list. -- Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "It takes a minute to have a crush on someone, an hour to like someone, and a day to love someone, but it takes a lifetime to forget someone..."