You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Philippe M. Chiasson" <go...@hbesoftware.com> on 2000/10/19 19:55:50 UTC

Why Does restart/gracefull makes httpd grow ?

Hi, I recently upgraded our servers to mod_perl 1.24.1 so I decided to
give DSO mod_perl a try.  And it now works perfectly, even with our perl
modules implementing core httpd configuration directives (Wich was broken
under DSO until 24.1)

So, I decided to start playing with restart/graceful too, thinking that DSO might solve
the problems of cleanly restarting a mod_perl server without loss of service...

Here is a bit of top while restarting my server a few times.... :

#INITIAL STARTUP
  PID USER     PRI  NI  SIZE SWAP  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
17940 nobody    10   0 27592    0  26M 27376 S       0  0.0  2.6   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17941 nobody    10   0 27592    0  26M 27376 S       0  0.0  2.6   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17942 nobody    10   0 27592    0  26M 27376 S       0  0.0  2.6   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17943 nobody    10   0 27592    0  26M 27376 S       0  0.0  2.6   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17944 nobody    10   0 27592    0  26M 27380 S       0  0.0  2.6   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17939 root      10   0 27516    0  26M 27312 S       0  0.0  2.6   0:01 /usr/local/apache/bin/httpd -Dhttpd_perl

#RESTART #1
17971 nobody     5   0 40116    0  39M 39888 S       0  0.0  3.8   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17972 nobody     7   0 40116    0  39M 39888 S       0  0.0  3.8   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17973 nobody     9   0 40116    0  39M 39888 S       0  0.0  3.8   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17974 nobody    10   0 40116    0  39M 39888 S       0  0.0  3.8   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17975 nobody    10   0 40116    0  39M 39888 S       0  0.0  3.8   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17961 root      10   0 40040    0  39M 39816 S       0  0.0  3.8   0:03 /usr/local/apache/bin/httpd -Dhttpd_perl

#RESTART #2
17980 nobody     6   0 52640    0  51M 52404 S       0  0.6  5.0   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17981 nobody    13   0 52640    0  51M 52404 S       0  0.2  5.0   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17982 nobody    16   0 52640    0  51M 52404 S       0  0.0  5.0   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17983 nobody    18   0 52640    0  51M 52404 S       0  0.0  5.0   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17984 nobody    19   0 52640    0  51M 52404 S       0  0.0  5.0   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17961 root      19   0 52560    0  51M 52332 S       0 41.1  5.0   0:05 /usr/local/apache/bin/httpd -Dhttpd_perl

[...]

#RESTART #5
18007 nobody     8   0 90204    0  88M 89976 S       0  7.1  8.7   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
18008 nobody     9   0 90204    0  88M 89976 S       0  0.0  8.7   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
18009 nobody    10   0 90204    0  88M 89976 S       0  2.3  8.7   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
18010 nobody    11   0 90204    0  88M 89976 S       0  4.7  8.7   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
18011 nobody    15   0 90204    0  88M 89976 S       0  0.0  8.7   0:00 /usr/local/apache/bin/httpd -Dhttpd_perl
17961 root      15   0 90128    0  88M 89908 S       0 57.2  8.6   0:11 /usr/local/apache/bin/httpd -Dhttpd_perl

And everything apparently behaves fine and keeps on working, but my main question is where is the 12Mb that adds to
each process on restart comes from ? What is hapenning ?

I know these issues have been brought before in the case of statically compiled-in mod_perl, but doesn't restarting the
server freeing libperl.so and re-loading it freshly ?

Any information would be more than welcome ...

## My version info is :
Redhat 6.2 running on a i386 Linux 2.2.17

Server version: Apache/1.3.14 (Unix)
Server built:   Oct 18 2000 14:00:36

perl5 (5.0 patchlevel 5 subversion 3)

mod_perl 1.24.1

/usr/local/apache/bin/httpd  -l
Compiled-in modules:
  http_core.c
  mod_so.c


-- 
+-----------------------------------------------+
| Philippe M. Chiasson  <go...@hbesoftware.com> |
| SmartWorker http://www.smartworker.org        |
|     IM : gozerhbe  ICQ : gozer/18279998       |
+-----------------------------------------------+
/*   * Hash table gook..   */ 
	-- Linux	2.4.0-test2
	/usr/src/linux/fs/buffer.c

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'

Re: Why Does restart/gracefull makes httpd grow ?

Posted by Paul Lindner <pl...@redhat.com>.
On Thu, Oct 19, 2000 at 01:55:50PM -0400, Philippe M. Chiasson wrote:
> Hi, I recently upgraded our servers to mod_perl 1.24.1 so I decided to
> give DSO mod_perl a try.  And it now works perfectly, even with our perl
> modules implementing core httpd configuration directives (Wich was broken
> under DSO until 24.1)
> 
> So, I decided to start playing with restart/graceful too, thinking that DSO might solve
> the problems of cleanly restarting a mod_perl server without loss of service...
> 
> Here is a bit of top while restarting my server a few times.... :

[....]

I've found that mod_so combined with Perl's dynamic loading causes this memory leakage.  

I ended up compiling apache without mod_so (i.e. all modules compiled in static, no DSO) and
I do not see this memory leakage at all.

> And everything apparently behaves fine and keeps on working, but my main question is where is the 12Mb that adds to
> each process on restart comes from ? What is hapenning ?
> 
> I know these issues have been brought before in the case of statically compiled-in mod_perl, but doesn't restarting the
> server freeing libperl.so and re-loading it freshly ?
> 
> Any information would be more than welcome ...
> 
> ## My version info is :
> Redhat 6.2 running on a i386 Linux 2.2.17
> 
> Server version: Apache/1.3.14 (Unix)
> Server built:   Oct 18 2000 14:00:36
> 
> perl5 (5.0 patchlevel 5 subversion 3)
> 
> mod_perl 1.24.1
> 
> /usr/local/apache/bin/httpd  -l
> Compiled-in modules:
>   http_core.c
>   mod_so.c
> 
> 
> -- 
> +-----------------------------------------------+
> | Philippe M. Chiasson  <go...@hbesoftware.com> |
> | SmartWorker http://www.smartworker.org        |
> |     IM : gozerhbe  ICQ : gozer/18279998       |
> +-----------------------------------------------+
> /*   * Hash table gook..   */ 
> 	-- Linux	2.4.0-test2
> 	/usr/src/linux/fs/buffer.c
> 
> perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'



-- 
Paul Lindner
plindner@redhat.com
Red Hat Inc.