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

Apache multi-processing module

Expand Messages
  • Corneliu Doban
    Hi guys, I have installed the apache/PHP packages and it works fine, but it takes tons of resources: - about 7 megs for the parent process - 11 megs per child
    Message 1 of 6 , Mar 3, 2005
    • 0 Attachment
      Hi guys,

      I have installed the apache/PHP packages and it works fine, but it
      takes tons of resources:
      - about 7 megs for the parent process
      - 11 megs per child process

      The current build is using the default unix multi-processing
      module "prefork". I believe that for a system with limited resources
      it will be more interesting to use the worker MPM which implements a
      hybrid multi-process multi-threaded server. By using threads to serve
      requests, it will be able to serve a large number of requests with
      less system resources than a process-based server.

      To actually choose the desired MPM, use the argument --with-mpm= NAME
      with the configure script. NAME is the name of the desired MPM.

      I have installed only the native build environment and the apache
      builds OK, but when I added "--with-mpm=worker" in the config options
      in apache.mk, the build fails.

      Can anyone, more experimented help me?

      Also, it looks that the AppWeb package does not have the PHP module.

      Thanks
      Corneliu
    • Jon Pounder
      ... just a guess, but you are probably missing either the pthreads package or the kernel thread support - not sure which apache needs ... Jon Pounder _/_/_/
      Message 2 of 6 , Mar 3, 2005
      • 0 Attachment
        >

        just a guess, but you are probably missing either the pthreads package or
        the kernel thread support - not sure which apache needs


        >
        > Hi guys,
        >
        > I have installed the apache/PHP packages and it works fine, but it
        > takes tons of resources:
        > - about 7 megs for the parent process
        > - 11 megs per child process
        >
        > The current build is using the default unix multi-processing
        > module "prefork". I believe that for a system with limited resources
        > it will be more interesting to use the worker MPM which implements a
        > hybrid multi-process multi-threaded server. By using threads to serve
        > requests, it will be able to serve a large number of requests with
        > less system resources than a process-based server.
        >
        > To actually choose the desired MPM, use the argument --with-mpm= NAME
        > with the configure script. NAME is the name of the desired MPM.
        >
        > I have installed only the native build environment and the apache
        > builds OK, but when I added "--with-mpm=worker" in the config options
        > in apache.mk, the build fails.
        >
        > Can anyone, more experimented help me?
        >
        > Also, it looks that the AppWeb package does not have the PHP module.
        >
        > Thanks
        > Corneliu
        >
        >
        >
        >
        >
        > [ Moderator Note: All static information is slowly moving to the Wiki at
        > http://www.nslu2-linux.org ]
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
        >


        Jon Pounder

        _/_/_/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/_/
        _/ _/_/ _/ _/ _/ _/_/ _/ _/_/
        _/ _/ _/_/ _/ _/ _/ _/_/ _/
        _/_/_/ _/ _/ _/_/_/_/ _/_/_/ _/ _/ _/_/_/_/


        Inline Internet Systems Inc.
        Thorold, Ontario, Canada

        Tools to Power Your e-Business Solutions
        www.inline.net
        www.ihtml.com
        www.ihtmlmerchant.com
        www.opayc.com
      • Lennert Buytenhek
        ... If you re referring to NPTL, that doesn t work on ARM yet due to lack of TLS support on the platform (but that s being worked on.) Userspace applications
        Message 3 of 6 , Mar 3, 2005
        • 0 Attachment
          On Thu, Mar 03, 2005 at 05:37:00PM -0500, Jon Pounder wrote:

          > just a guess, but you are probably missing either the pthreads package
          > or the kernel thread support - not sure which apache needs

          If you're referring to NPTL, that doesn't work on ARM yet due to lack
          of TLS support on the platform (but that's being worked on.)

          Userspace applications using pthreads shouldn't care whether it is
          linuxthreads (which probably what you mean by 'the pthreads package')
          or NPTL under the hood -- either linuxthreads or NPTL will work for
          apache.


          --L
        • Josh Parsons
          ... Suggestions of this kind are very much appreciated. I have a couple of questions, though: 1) I m no expert in the details of apache s multi-processing
          Message 4 of 6 , Mar 3, 2005
          • 0 Attachment
            On Thu, 2005-03-03 at 22:22 +0000, Corneliu Doban wrote:

            > I have installed the apache/PHP packages and it works fine, but it
            > takes tons of resources:
            > - about 7 megs for the parent process
            > - 11 megs per child process
            >
            > The current build is using the default unix multi-processing
            > module "prefork". I believe that for a system with limited resources
            > it will be more interesting to use the worker MPM...

            Suggestions of this kind are very much appreciated. I have a couple of
            questions, though:

            1) I'm no expert in the details of apache's multi-processing system, but
            I understand that threaded MPMs are not a good idea in combination with
            scripting systems such as PHP (as it cannot be guaranteed that every one
            of the large number of dependencies of PHP are thread-safe). Does worker
            offer a way around that problem?

            2) Is it possible to allow a choice of MPM after compilation? If so, we
            could offer prefork as a stable default, and a threaded MPM for users
            who just want core apache functionality, and don't need scripting.

            In any case, every user of apache should
            edit /opt/etc/apache2/httpd.conf and (among other things) comment out
            modules that they do not need. That should greatly reduce apache's
            resource hunger. Another good thing to do, if you are running a small
            server, is to tweak the parameters of the prefork MPM to limit the
            number of child processes that it spawns.

            --
            Josh Parsons
            Philosophy Department
            1238 Social Sciences and Humanities Bldg.
            University of California
            Davis, CA 95616-8673
            USA

            Please avoid sending me Word or PowerPoint attachments.
            See http://www.fsf.org/philosophy/no-word-attachments.html
          • CORNELIU DOBAN
            Thanks for the sugestions. I am a novice with apache, so I can t answer your first question. It looks that the MPM module can be configured only before
            Message 5 of 6 , Mar 3, 2005
            • 0 Attachment
              Thanks for the sugestions.
              I am a novice with apache, so I can't answer your first question.
              It looks that the MPM module can be configured only before compilation (also, only one module can be present and is taticaly linked). You can list the nodules linked staticaly with the command:
              httpd -l
               
              Thanks
              Corneliu


              Josh Parsons <jbparsons@...> wrote:
              On Thu, 2005-03-03 at 22:22 +0000, Corneliu Doban wrote:

              > I have installed the apache/PHP packages and it works fine, but it
              > takes tons of resources:
              >   - about 7 megs for the parent process
              >   - 11 megs per child process
              >
              > The current build is using the default unix multi-processing
              > module "prefork". I believe that for a system with limited resources
              > it will be more interesting to use the worker MPM...

              Suggestions of this kind are very much appreciated.  I have a couple of
              questions, though:

              1) I'm no expert in the details of apache's multi-processing system, but
              I understand that threaded MPMs are not a good idea in combination with
              scripting systems such as PHP (as it cannot be guaranteed that every one
              of the large number of dependencies of PHP are thread-safe). Does worker
              offer a way around that problem?

              2) Is it possible to allow a choice of MPM after compilation? If so, we
              could offer prefork as a stable default, and a threaded MPM for users
              who just want core apache functionality, and don't need scripting.

              In any case, every user of apache should
              edit /opt/etc/apache2/httpd.conf and (among other things) comment out
              modules that they do not need. That should greatly reduce apache's
              resource hunger. Another good thing to do, if you are running a small
              server, is to tweak the parameters of the prefork MPM to limit the
              number of child processes that it spawns.

              --
              Josh Parsons
              Philosophy Department
              1238 Social Sciences and Humanities Bldg.
              University of California
              Davis, CA 95616-8673
              USA

              Please avoid sending me Word or PowerPoint attachments.
              See http://www.fsf.org/philosophy/no-word-attachments.html



              [ Moderator Note: All static information is slowly moving to the Wiki at http://www.nslu2-linux.org ]



              Celebrate Yahoo!'s 10th Birthday!
              Yahoo! Netrospective: 100 Moments of the Web

            • CORNELIU DOBAN
              No, it seems more like a trivial error: Some headers included from the worker directory are trying to redefine some mpm related types. I don t remember exactly
              Message 6 of 6 , Mar 3, 2005
              • 0 Attachment
                No, it seems more like a trivial error:
                Some headers included from the worker directory are trying to redefine some mpm related types. I don't remember exactly the error but I will try to build it again when I 'll get home.
                 
                Thanks
                Corneliu

                Jon Pounder <jonp@...> wrote:

                >

                just a guess, but you are probably missing either the pthreads package or
                the kernel thread support - not sure which apache needs


                >
                > Hi guys,
                >
                > I have installed the apache/PHP packages and it works fine, but it
                > takes tons of resources:
                >   - about 7 megs for the parent process
                >   - 11 megs per child process
                >
                > The current build is using the default unix multi-processing
                > module "prefork". I believe that for a system with limited resources
                > it will be more interesting to use the worker MPM which implements a
                > hybrid multi-process multi-threaded server. By using threads to serve
                > requests, it will be able to serve a large number of requests with
                > less system resources than a process-based server.
                >
                > To actually choose the desired MPM, use the argument --with-mpm= NAME
                > with the configure script. NAME is the name of the desired MPM.
                >
                > I have installed only the native build environment and the apache
                > builds OK, but when I added "--with-mpm=worker" in the config options
                > in apache.mk, the build fails.
                >
                > Can anyone, more experimented help me?
                >
                > Also, it looks that the AppWeb package does not have the PHP module.
                >
                > Thanks
                > Corneliu
                >
                >
                >
                >
                >
                > [ Moderator Note: All static information is slowly moving to the Wiki at
                > http://www.nslu2-linux.org ]
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >
                >


                Jon Pounder

                   _/_/_/  _/    _/  _/       _/_/_/  _/    _/  _/_/_/_/
                    _/    _/_/  _/  _/         _/    _/_/  _/  _/_/
                   _/    _/  _/_/  _/         _/    _/  _/_/  _/
                _/_/_/  _/    _/  _/_/_/_/ _/_/_/  _/    _/  _/_/_/_/


                Inline Internet Systems Inc.
                Thorold, Ontario, Canada

                Tools to Power Your e-Business Solutions
                www.inline.net
                www.ihtml.com
                www.ihtmlmerchant.com
                www.opayc.com


                [ Moderator Note: All static information is slowly moving to the Wiki at http://www.nslu2-linux.org ]



                Celebrate Yahoo!'s 10th Birthday!
                Yahoo! Netrospective: 100 Moments of the Web

              Your message has been successfully submitted and would be delivered to recipients shortly.