You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jonathan Vanasco <jv...@mastersofbranding.com> on 2005/07/22 17:46:12 UTC
Two Server Setup Strategy Question
I'd like to use the 2+ server setup strategy:
Vanilla Apache
bound to port 80
proxypass to mod_perl server on different ports
I got that running on Linux using 2 sourcetrees as in the modperlbook
I just got a new server with FreeBSD 5.4-RELEASE on it, and am new to
all the ports
I *think* I can just do this:
install apache2/mp2 w/everything as a dso
make 2 configuration files:
1 just has mp2 (mp2)
1 has deflate + rewrite (vanilla)
have the system start up 2 apaches, 1 using each config file
Does that make sense?
It that an awful way to do it?
It there a better way?
I've always installed mp2 as a dso - should i not?
Re: Two Server Setup Strategy Question
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-07-27 at 15:53 -0400, Rodger Castle wrote:
> Ah, I see. We should be doing it in chunks and not all at once. Will
> adjust to fit and see how that goes. That makes sense. Thank you.
There's lots more good information about this here:
http://modperlbook.org/html/ch13_01.html
- Perrin
Re: Two Server Setup Strategy Question
Posted by Rodger Castle <ro...@castlehollow.com>.
On Wed, Jul 27, 2005 at 03:27:36PM -0400, Perrin Harkins wrote:
> On Wed, 2005-07-27 at 14:15 -0400, Rodger Castle wrote:
> > You know, I've been experiencing incremental growth my mod_perl2 httpd
> > processes, but these are during operation.
>
> That's normal. As your processes handle requests they will use more
> memory and grow. Note that these are not memory leaks, since the memory
> is actually being used by perl, not lost.
>
> > Is there some trick about returning memory to the pool after a
> > handler?
>
> No. Processes don't really return memory on most OSes. That's why the
> optimization tips emphasize not taking too much memory in the first
> place, e.g. not slurping huge files into RAM.
Ah, I see. We should be doing it in chunks and not all at once. Will adjust to fit and see how that goes. That makes sense. Thank you.
Rodger
Re: Two Server Setup Strategy Question
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-07-27 at 14:15 -0400, Rodger Castle wrote:
> You know, I've been experiencing incremental growth my mod_perl2 httpd
> processes, but these are during operation.
That's normal. As your processes handle requests they will use more
memory and grow. Note that these are not memory leaks, since the memory
is actually being used by perl, not lost.
> Is there some trick about returning memory to the pool after a
> handler?
No. Processes don't really return memory on most OSes. That's why the
optimization tips emphasize not taking too much memory in the first
place, e.g. not slurping huge files into RAM.
- Perrin
Re: Two Server Setup Strategy Question
Posted by Rodger Castle <ro...@castlehollow.com>.
On Wed, Jul 27, 2005 at 11:01:56AM -0700, Philippe M. Chiasson wrote:
> Jonathan Vanasco wrote:
..
> are trying to do.
>
> > I've always installed mp2 as a dso - should i not?
>
> It's perfectly fine to do so. As a warning, though, there are known issues
> with mod_perl DSO and FreeBSD's default Perl configuration with usemymalloc
> you might want to read about [1].
>
> But all in all, you should be just fine.
>
> 1. http://marc.theaimsgroup.com/?l=apache-modperl&m=112187550627933&w=2
You know, I've been experiencing incremental growth my mod_perl2 httpd processes, but these are during operation. An 'apachectl restart' won't do anything for it, but a full shutdown and start will take them back to normal. All modules are preloaded in a startup script in httpd.conf. Is there some trick about returning memory to the pool after a handler? Some of these handlers deal with rather large data structures.
Rodger
Re: Two Server Setup Strategy Question
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Jonathan Vanasco wrote:
> I'd like to use the 2+ server setup strategy:
>
> Vanilla Apache
> bound to port 80
> proxypass to mod_perl server on different ports
>
> I got that running on Linux using 2 sourcetrees as in the modperlbook
>
> I just got a new server with FreeBSD 5.4-RELEASE on it, and am new to
> all the ports
>
> I *think* I can just do this:
> install apache2/mp2 w/everything as a dso
> make 2 configuration files:
> 1 just has mp2 (mp2)
> 1 has deflate + rewrite (vanilla)
> have the system start up 2 apaches, 1 using each config file
>
> Does that make sense?
Yes it does.
> It that an awful way to do it?
No, it's actually quite good, as you'll most likely benefit from
even more shared memory usages is the 2 different servers load some
of the same DSO modules (mod_mime for instance)
> It there a better way?
There is always a different way, but better will depend on what you
are trying to do.
> I've always installed mp2 as a dso - should i not?
It's perfectly fine to do so. As a warning, though, there are known issues
with mod_perl DSO and FreeBSD's default Perl configuration with usemymalloc
you might want to read about [1].
But all in all, you should be just fine.
1. http://marc.theaimsgroup.com/?l=apache-modperl&m=112187550627933&w=2
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5