Loading ...
Sorry, an error occurred while loading the content.
 

Preloading modules and Perl 5.6.1 vs 5.8.0

Expand Messages
  • e-mol Development Team
    Message 1 of 7 , Sep 3, 2003
      I have two servers running Apache 1.3.27 and mod_perl 1.27 both severs are
      running identical httpd.conf and startup.pl configurations. One is running
      Perl 5.8.0 the other is running 5.6.1. When I do the preloading of modules on
      the 5.6.1 system all seems well and shared memory goes up while unshared
      memory goes down. On the 5.8.0 only the unshared memory goes up, similar to
      if I did no preloading and just hit the pages that would cause the modules to
      get loaded.

      I am looking for ideas on why this may be. Does preloading not like new
      versions of perl? Am I being a bonehead? Thank you in advance for any
      assistance.

      Aaron Thul
      e-mol Development Team
      http://www.e-mol.com/?layout=emol103

      _______________________________________________________
      Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com





      --
      Reporting bugs: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
    • Stas Bekman
      ... Compare their build options? perl-5.6.1 -V 5.6.1 perl-5.8.0 -V 5.8.0 diff -u 5.6.1 5.8.0
      Message 2 of 7 , Sep 3, 2003
        e-mol Development Team wrote:
        > I have two servers running Apache 1.3.27 and mod_perl 1.27 both severs are
        > running identical httpd.conf and startup.pl configurations. One is running
        > Perl 5.8.0 the other is running 5.6.1. When I do the preloading of modules on
        > the 5.6.1 system all seems well and shared memory goes up while unshared
        > memory goes down. On the 5.8.0 only the unshared memory goes up, similar to
        > if I did no preloading and just hit the pages that would cause the modules to
        > get loaded.
        >
        > I am looking for ideas on why this may be. Does preloading not like new
        > versions of perl? Am I being a bonehead? Thank you in advance for any
        > assistance.

        Compare their build options?

        perl-5.6.1 -V > 5.6.1
        perl-5.8.0 -V > 5.8.0
        diff -u 5.6.1 5.8.0

        __________________________________________________________________
        Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
        http://stason.org/ mod_perl Guide ---> http://perl.apache.org
        mailto:stas@... http://use.perl.org http://apacheweek.com
        http://modperlbook.org http://apache.org http://ticketmaster.com



        --
        Reporting bugs: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
      • Stas Bekman
        [make sure to keep the replies on the list. Thank you!] ... The two builds are quite different, I have pointed out below at least a few major differences. ...
        Message 3 of 7 , Sep 3, 2003
          [make sure to keep the replies on the list. Thank you!]

          e-mol Development Team wrote:
          >>diff -u 5.6.1.txt 5.8.0.txt

          The two builds are quite different, I have pointed out below at least a few
          major differences.

          > [root@new src]# diff -u 5.6.1.txt 5.8.0.txt
          > --- 5.6.1.txt 2003-09-03 14:07:02.000000000 -0400
          > +++ 5.8.0.txt 2003-09-03 14:04:21.000000000 -0400
          > @@ -1,40 +1,58 @@
          > -Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
          > +Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
          > Platform:
          > - osname=linux, osvers=2.4.2-2, archname=i686-linux
          > + osname=linux, osvers=2.4.20-2.48smp, archname=i386-linux-thread-multi

          > + uname='linux str'
          > + config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g
          > -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
          > Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
          > -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0
          > -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid
          > -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm
          > -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly
          > -Dpager=/usr/bin/less -isr'

          I'm not quite following, why 5.6.1 was built with -Dusethreads -Duseithreads
          but below it says: usethreads=undef use5005threads=undef useithreads=undef
          usemultiplicity=undef

          > hint=recommended, useposix=true, d_sigaction=define
          > - usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
          > - useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
          > - use64bitint=undef use64bitall=undef uselongdouble=undef
          > + usethreads=define use5005threads=undef' useithreads=define usemultiplicity=
          > + useperlio= d_sfio=undef uselargefiles=define usesocks=undef
          > + use64bitint=undef use64bitall=un uselongdouble=
          > + usemymalloc=, bincompat5005=undef

          OK, so try building 5.8.0 with -Uusethreads (unless you are going to use ithreads)

          > Compiler:
          > - cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include
          > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
          > - optimize='-O2',
          > - cppflags='-fno-strict-aliasing -I/usr/local/include'
          > - ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2
          > release)', gccosandvers=''
          > - intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
          > + cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
          > -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
          > -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',

          Hmm, where did you get these perl from? did you build them yourself? Why
          -DDEBUGGING is enabled? You certaintly don't want this to be enabled in
          production. You have it in both perls.

          > + optimize='',
          > + cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
          > -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
          > + ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0 3.2.2-1)',
          > gccosandvers=''
          > +gccversion='3.2.2 200302'
          > + intsize=e, longsize= , ptrsize=p, doublesize=8, byteorder=1234
          > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
          > - ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
          > lseeksize=8
          > - alignbytes=4, usemymalloc=n, prototype=define
          > + ivtype='long'
          > +k', ivsize=4'
          > +ivtype='long'
          > +known_ext, nvtype='double'
          > +o_nonbl', nvsize=, Off_t='', lseeksize=8
          > + alignbytes=4, prototype=define
          > Linker and Libraries:
          > - ld='cc', ldflags =' -L/usr/local/lib'
          > + ld='gcc'
          > +l', ldflags =' -L/usr/local/lib'
          > +ldf'
          > libpth=/usr/local/lib /lib /usr/lib
          > - libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
          > - perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
          > - libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
          > + libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
          > + perllibs=
          > + libc=/lib/libc-2.3.1.so, so=so, useshrplib=true, libperl=libper

          Your 5.6.1 is built as a static perl, whereas 5.8.0 as a dynamic.

          > + gnulibc_version='2.3.1'
          > Dynamic Linking:
          > - dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
          > - cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
          > + dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic
          > -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
          > + cccdlflags='-fPIC'
          > +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s
          > Unicode/Normalize XS/A'


          __________________________________________________________________
          Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
          http://stason.org/ mod_perl Guide ---> http://perl.apache.org
          mailto:stas@... http://use.perl.org http://apacheweek.com
          http://modperlbook.org http://apache.org http://ticketmaster.com



          --
          Reporting bugs: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
        • e-mol Development Team
          Message 4 of 7 , Sep 4, 2003
            >e-mol Development Team wrote:
            >>>diff -u 5.6.1.txt 5.8.0.txt
            >
            >The two builds are quite different, I have pointed out below at least a few
            >major differences.
            >
            >> [root@new src]# diff -u 5.6.1.txt 5.8.0.txt
            >> --- 5.6.1.txt 2003-09-03 14:07:02.000000000 -0400
            >> +++ 5.8.0.txt 2003-09-03 14:04:21.000000000 -0400
            >> @@ -1,40 +1,58 @@
            >> -Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
            >> +Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
            >> Platform:
            >> - osname=linux, osvers=2.4.2-2, archname=i686-linux
            >> + osname=linux, osvers=2.4.20-2.48smp, archname=i386-linux-thread-multi
            >
            >> + uname='linux str'
            >> + config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -g
            >> -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat,
            >> Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux
            >> -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0
            >> -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid
            >> -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm
            >> -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly
            >> -Dpager=/usr/bin/less -isr'
            >
            >I'm not quite following, why 5.6.1 was built with -Dusethreads -Duseithreads
            >but below it says: usethreads=undef use5005threads=undef useithreads=undef
            >usemultiplicity=undef

            When you run configure it makes config.sh that has many lines set to 'undef' I
            am not sure if this is at all related.

            >
            >> hint=recommended, useposix=true, d_sigaction�fine
            >> - usethreads=undef use5005threads=undef useithreads=undef
            usemultiplicity=undef
            >> - useperlio=undef d_sfio=undef uselargefiles�fine usesocks=undef
            >> - use64bitint=undef use64bitall=undef uselongdouble=undef
            >> + usethreads�fine use5005threads=undef' useithreads�fine
            usemultiplicity> + useperlio= d_sfio=undef uselargefiles�fine usesocks=undef
            >> + use64bitint=undef use64bitall=un uselongdouble> + usemymalloc=,
            bincompat5005=undef
            >
            >OK, so try building 5.8.0 with -Uusethreads (unless you are going to use
            ithreads)

            This is going to be the next thing I try. I am 99.9% sure we do not need
            ithreads.

            >
            >> Compiler:
            >> - cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include
            >> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITSd',
            >> - optimize='-O2',
            >> - cppflags='-fno-strict-aliasing -I/usr/local/include'
            >> - ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2
            >> release)', gccosandvers=''
            >> - intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder34
            >> + cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
            >> -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
            >> -D_FILE_OFFSET_BITSd -I/usr/include/gdbm',
            >
            >Hmm, where did you get these perl from? did you build them yourself? Why
            >-DDEBUGGING is enabled? You certaintly don't want this to be enabled in
            >production. You have it in both perls.

            Both these perls where build from source downloaded from perl.org. I have no
            idea why -DDEBUGGING is enabled but I agree we do not need it.

            >
            >> + optimize='',
            >> + cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
            >> -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
            >> + ccversion='', gccversion='3.2.2 20030213 (Red Hat Linux 8.0 3.2.2-1)',
            >> gccosandvers=''
            >> +gccversion='3.2.2 200302'
            >> + intsize=e, longsize= , ptrsize=p, doublesize=8, byteorder34
            >> d_longlong�fine, longlongsize=8, d_longdbl�fine, longdblsize
            >> - ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
            >> lseeksize=8
            >> - alignbytes=4, usemymalloc=n, prototype�fine
            >> + ivtype='long'
            >> +k', ivsize=4'
            >> +ivtype='long'
            >> +known_ext, nvtype='double'
            >> +o_nonbl', nvsize=, Off_t='', lseeksize=8
            >> + alignbytes=4, prototype�fine
            >> Linker and Libraries:
            >> - ld='cc', ldflags =' -L/usr/local/lib'
            >> + ld='gcc'
            >> +l', ldflags =' -L/usr/local/lib'
            >> +ldf'
            >> libpth=/usr/local/lib /lib /usr/lib
            >> - libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
            >> - perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
            >> - libc=/lib/libc-2.1.3.so, so=so, useshrplib�lse, libperl=libperl.a
            >> + libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
            >> + perllibs> + libc=/lib/libc-2.3.1.so, so=so, useshrplib=true,
            libperl=libper
            >
            >Your 5.6.1 is built as a static perl, whereas 5.8.0 as a dynamic.

            I build a static perl 5.8.0 last night, did not seem to change anything.

            >
            >> + gnulibc_version='2.3.1'
            >> Dynamic Linking:
            >> - dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
            >> - cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
            >> + dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic
            >> -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
            >> + cccdlflags='-fPIC'
            >> +ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s
            >> Unicode/Normalize XS/A'


            I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system
            and see what this leads to. I wonder if it could be the newer gcc or glibc?


            Aaron Thul
            e-mol Development Team
            http://www.e-mol.com/?layout=emol103


            _______________________________________________________
            Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com





            --
            Reporting bugs: http://perl.apache.org/bugs/
            Mail list info: http://perl.apache.org/maillist/modperl.html
          • Stas Bekman
            ... This is quite possible, since the sharing mostly comes from your OS, not specificly from Perl. You may also want to try the latest perl-5.8.1 snapshot,
            Message 5 of 7 , Sep 4, 2003
              > I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system
              > and see what this leads to.
              > I wonder if it could be the newer gcc or glibc?

              This is quite possible, since the sharing mostly comes from your OS, not
              specificly from Perl.

              You may also want to try the latest perl-5.8.1 snapshot, while you are at it,
              as it'll be released rsn.

              __________________________________________________________________
              Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
              http://stason.org/ mod_perl Guide ---> http://perl.apache.org
              mailto:stas@... http://use.perl.org http://apacheweek.com
              http://modperlbook.org http://apache.org http://ticketmaster.com



              --
              Reporting bugs: http://perl.apache.org/bugs/
              Mail list info: http://perl.apache.org/maillist/modperl.html
            • e-mol Development Team
              Message 6 of 7 , Sep 4, 2003
                After some thinking time I decided to compile perl 5.8.0 on the older system
                that did have 5.6.1. It would seem it has nothing to do with perl 5.8.0. I
                compiled perl 5.8.0 on the older system and preloading worked just like it should.

                Now I know that it does not have anything to do with perl or mod_perl but
                rather the newer gcc and glibc on the newer system.

                New system:
                gcc-3.2.2
                glibc-2.3.2

                Old system
                glibc-2.2.4
                gcc-2.96

                Has anyone else had problems with gcc-3.2.2 or glibc-2.3.2 and shared memory?
                Next I am going to try perl 5.8.1 snapshot to see what happens.


                Aaron Thul
                e-mol Development Team
                http://www.e-mol.com/?layout=emol103

                stas@... wrote:
                >
                >> I think next I may try and see if perl 5.6.1 can be build on the 5.8.0 system
                >> and see what this leads to.
                >> I wonder if it could be the newer gcc or glibc?
                >
                >This is quite possible, since the sharing mostly comes from your OS, not
                >specificly from Perl.
                >
                >You may also want to try the latest perl-5.8.1 snapshot, while you are at it,
                >as it'll be released rsn.
                >


                _______________________________________________________
                Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com





                --
                Reporting bugs: http://perl.apache.org/bugs/
                Mail list info: http://perl.apache.org/maillist/modperl.html
              • Stas Bekman
                ... Ask at the glibc list? or may be p5p, as there are quite a few knowledgeable folks over there... ... Probably nothing will change on the sharing front, but
                Message 7 of 7 , Sep 4, 2003
                  e-mol Development Team wrote:
                  > After some thinking time I decided to compile perl 5.8.0 on the older system
                  > that did have 5.6.1. It would seem it has nothing to do with perl 5.8.0. I
                  > compiled perl 5.8.0 on the older system and preloading worked just like it should.
                  >
                  > Now I know that it does not have anything to do with perl or mod_perl but
                  > rather the newer gcc and glibc on the newer system.
                  >
                  > New system:
                  > gcc-3.2.2
                  > glibc-2.3.2
                  >
                  > Old system
                  > glibc-2.2.4
                  > gcc-2.96
                  >
                  > Has anyone else had problems with gcc-3.2.2 or glibc-2.3.2 and shared memory?

                  Ask at the glibc list? or may be p5p, as there are quite a few knowledgeable
                  folks over there...

                  > Next I am going to try perl 5.8.1 snapshot to see what happens.

                  Probably nothing will change on the sharing front, but you will get a better
                  perl ;)

                  __________________________________________________________________
                  Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                  http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                  mailto:stas@... http://use.perl.org http://apacheweek.com
                  http://modperlbook.org http://apache.org http://ticketmaster.com



                  --
                  Reporting bugs: http://perl.apache.org/bugs/
                  Mail list info: http://perl.apache.org/maillist/modperl.html
                Your message has been successfully submitted and would be delivered to recipients shortly.