You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Long <ha...@yahoo.com.INVALID> on 2023/09/13 12:51:25 UTC

[users@httpd] How do I choose the best settings for the Apache Server?

Hello,
My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change the following settings for better performance?


Timeout 45
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
    StartServers                 3
    MinSpareServers         3
    MaxSpareServers        3
    ServerLimit                   50
    MaxClients                    50
    MaxRequestsPerChild  1000
</IfModule>

<IfModule mpm_worker_module>
    StartServers              3
    MaxClients                50
    MinSpareThreads     3
    MaxSpareThreads    3 
    ThreadsPerChild       25
    MaxRequestsPerChild  1000
</IfModule>


I'm thankful if anyone can guide me to choose the above settings according to my server hardware specifications. If you know of other settings, please share.


Thank you. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,Thanks again.So, is it better to use the following module?
<IfModule mpm_event_module> StartServers 3 MinSpareThreads 75 MaxSpareThreads 250ThreadLimit 64ThreadsPerChild 25MaxRequestWorkers 400 MaxConnectionsPerChild 0 </IfModule>

Do you know of any articles, websites, or something like a cheat sheet for quickly setting up Apache?

 
 
  On Fri, Sep 15, 2023 at 1:31 AM, Frank Gingras<th...@apache.org> wrote:   There are no "best" values, either way; it depends on your traffic pattern.
Use mod_status with ExtendedStatus on, and monitor /server-status to check how many idle workers you have, over time.
On Thu, Sep 14, 2023 at 5:45 PM Stormy <st...@stormy.ca> wrote:

On 2023-09-14 16:01, Jason Long wrote:
> Hello,
> Thanks again.
> How about the other parameters? For example, how can I estimate the best 
> value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?

What is wrong with the default values? Why do you want to "estimate"? 
Have you tried different values? If so, what was the upside/downside of 
your trials? Logs? Stats?

You say somewhere below that your server "uses WordPress, so it also has 
PHP and MySQL."  Fine, these are services (memory and CPU cycles) 
outside the scope of Apache/httpd which just "serves" what it is given 
to "serve."

As an example, I have just rewritten a quite big (474 Gb) WP website in 
html5 with minimal php and js. Result: client output identical, Apache 
throughput just over 90% lower. YMMV

Good luck,
Paul
> 
> 
>     On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras
>     <th...@apache.org> wrote:
>     Just comment out the LoadModule line for prefork, and uncomment the
>     line for event.
> 
>     There is no "template"; you just need to tweak event to spawn more
>     workers if needed, but the default settings should be fine for small
>     volumes.
> 
>     The prefork mpm should really be avoided at this point, as it spawns
>     a separate process for every single HTTP request.
> 
>     On Thu, Sep 14, 2023 at 2:47 PM Jason Long
>     <ha...@yahoo.com.invalid> wrote:
> 
>         Hello,
>         Thanks again.
>         So, I must remove the "mpm_prefork_module" section. Am I right?
> 
>         Can you show me an Apache configuration template for use with
>         Wordpress?
> 
>         When I must use "mpm_prefork_module"?
> 
> 
>             On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
>             <thumbs@apache.org <ma...@apache.org>> wrote:
>             500MB of RAM for the httpd processes, yes. The rest of the
>             RAM will go towards php and MySQL.
> 
>             Since wordpress is involved, you'll want to use the event
>             mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
> 
>             https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
>             <https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM>
> 
> 
> 
>             On Thu, Sep 14, 2023 at 6:21 AM Jason Long
>             <hack3rcon@yahoo.com <ma...@yahoo.com>> wrote:
> 
>                 Hello,
>                 Thank you so much for your reply.
>                 Can you tell me more about "It should run well under
>                 500MB even with thousands of workers."? Do you mean 500
>                 MB memory?
> 
>                 My server uses WordPress, so it also has PHP and MySQL.
>                 What parameters should I change?
> 
>                 What is the formula for calculating "mpm_prefork_module"
>                 and "mpm_worker_module"
>                 parameters?
> 
> 
> 
>                     On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
>                     <francois.gingras@gmail.com
>                     <ma...@gmail.com>> wrote:
>                     You'll want to make sure you're using the event mpm,
>                     in any case. It should run well under 500MB even
>                     with thousands of workers.
> 
>                     If php or another dynamic language is involved, then
>                     the answer will depend on what you use. You should
>                     also consider if other services use RAM, such as a
>                     rdbms.
> 
> 
>                     On Wed, Sep 13, 2023 at 8:52 AM Jason Long
>                     <ha...@yahoo.com.invalid> wrote:
> 
>                         Hello,
>                         My server has 6 GB RAM and 4 virtual CPUs. I
>                         want to know How can I change the following
>                         settings for better performance?
> 
> 
>                         Timeout 45
>                         KeepAlive On
>                         MaxKeepAliveRequests 100
>                         KeepAliveTimeout 15
> 
>                         <IfModule mpm_prefork_module>
>                              StartServers                 3
>                              MinSpareServers         3
>                              MaxSpareServers        3
>                              ServerLimit                   50
>                              MaxClients                    50
>                              MaxRequestsPerChild  1000
>                         </IfModule>
> 
>                         <IfModule mpm_worker_module>
>                              StartServers              3
>                              MaxClients                50
>                              MinSpareThreads     3
>                              MaxSpareThreads    3
>                              ThreadsPerChild       25
>                              MaxRequestsPerChild  1000
>                         </IfModule>
> 
> 
>                         I'm thankful if anyone can guide me to choose
>                         the above settings according to my server
>                         hardware specifications. If you know of other
>                         settings, please share.
> 
> 
>                         Thank you.
> 
>                         ---------------------------------------------------------------------
>                         To unsubscribe, e-mail:
>                         users-unsubscribe@httpd.apache.org
>                         <ma...@httpd.apache.org>
>                         For additional commands, e-mail:
>                         users-help@httpd.apache.org
>                         <ma...@httpd.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Frank Gingras <th...@apache.org>.
There are no "best" values, either way; it depends on your traffic pattern.

Use mod_status with ExtendedStatus on, and monitor /server-status to check
how many idle workers you have, over time.

On Thu, Sep 14, 2023 at 5:45 PM Stormy <st...@stormy.ca> wrote:

> On 2023-09-14 16:01, Jason Long wrote:
> > Hello,
> > Thanks again.
> > How about the other parameters? For example, how can I estimate the best
> > value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?
>
> What is wrong with the default values? Why do you want to "estimate"?
> Have you tried different values? If so, what was the upside/downside of
> your trials? Logs? Stats?
>
> You say somewhere below that your server "uses WordPress, so it also has
> PHP and MySQL."  Fine, these are services (memory and CPU cycles)
> outside the scope of Apache/httpd which just "serves" what it is given
> to "serve."
>
> As an example, I have just rewritten a quite big (474 Gb) WP website in
> html5 with minimal php and js. Result: client output identical, Apache
> throughput just over 90% lower. YMMV
>
> Good luck,
> Paul
> >
> >
> >     On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras
> >     <th...@apache.org> wrote:
> >     Just comment out the LoadModule line for prefork, and uncomment the
> >     line for event.
> >
> >     There is no "template"; you just need to tweak event to spawn more
> >     workers if needed, but the default settings should be fine for small
> >     volumes.
> >
> >     The prefork mpm should really be avoided at this point, as it spawns
> >     a separate process for every single HTTP request.
> >
> >     On Thu, Sep 14, 2023 at 2:47 PM Jason Long
> >     <ha...@yahoo.com.invalid> wrote:
> >
> >         Hello,
> >         Thanks again.
> >         So, I must remove the "mpm_prefork_module" section. Am I right?
> >
> >         Can you show me an Apache configuration template for use with
> >         Wordpress?
> >
> >         When I must use "mpm_prefork_module"?
> >
> >
> >             On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
> >             <thumbs@apache.org <ma...@apache.org>> wrote:
> >             500MB of RAM for the httpd processes, yes. The rest of the
> >             RAM will go towards php and MySQL.
> >
> >             Since wordpress is involved, you'll want to use the event
> >             mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
> >
> >             https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
> >             <https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM>
> >
> >
> >
> >             On Thu, Sep 14, 2023 at 6:21 AM Jason Long
> >             <hack3rcon@yahoo.com <ma...@yahoo.com>> wrote:
> >
> >                 Hello,
> >                 Thank you so much for your reply.
> >                 Can you tell me more about "It should run well under
> >                 500MB even with thousands of workers."? Do you mean 500
> >                 MB memory?
> >
> >                 My server uses WordPress, so it also has PHP and MySQL.
> >                 What parameters should I change?
> >
> >                 What is the formula for calculating "mpm_prefork_module"
> >                 and "mpm_worker_module"
> >                 parameters?
> >
> >
> >
> >                     On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
> >                     <francois.gingras@gmail.com
> >                     <ma...@gmail.com>> wrote:
> >                     You'll want to make sure you're using the event mpm,
> >                     in any case. It should run well under 500MB even
> >                     with thousands of workers.
> >
> >                     If php or another dynamic language is involved, then
> >                     the answer will depend on what you use. You should
> >                     also consider if other services use RAM, such as a
> >                     rdbms.
> >
> >
> >                     On Wed, Sep 13, 2023 at 8:52 AM Jason Long
> >                     <ha...@yahoo.com.invalid> wrote:
> >
> >                         Hello,
> >                         My server has 6 GB RAM and 4 virtual CPUs. I
> >                         want to know How can I change the following
> >                         settings for better performance?
> >
> >
> >                         Timeout 45
> >                         KeepAlive On
> >                         MaxKeepAliveRequests 100
> >                         KeepAliveTimeout 15
> >
> >                         <IfModule mpm_prefork_module>
> >                              StartServers                 3
> >                              MinSpareServers         3
> >                              MaxSpareServers        3
> >                              ServerLimit                   50
> >                              MaxClients                    50
> >                              MaxRequestsPerChild  1000
> >                         </IfModule>
> >
> >                         <IfModule mpm_worker_module>
> >                              StartServers              3
> >                              MaxClients                50
> >                              MinSpareThreads     3
> >                              MaxSpareThreads    3
> >                              ThreadsPerChild       25
> >                              MaxRequestsPerChild  1000
> >                         </IfModule>
> >
> >
> >                         I'm thankful if anyone can guide me to choose
> >                         the above settings according to my server
> >                         hardware specifications. If you know of other
> >                         settings, please share.
> >
> >
> >                         Thank you.
> >
> >
>  ---------------------------------------------------------------------
> >                         To unsubscribe, e-mail:
> >                         users-unsubscribe@httpd.apache.org
> >                         <ma...@httpd.apache.org>
> >                         For additional commands, e-mail:
> >                         users-help@httpd.apache.org
> >                         <ma...@httpd.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Frank Gingras <th...@apache.org>.
You will need to ask the cpanel community in that case.

On Sun, Sep 17, 2023 at 2:19 AM Jason Long <ha...@yahoo.com.invalid>
wrote:

> Hello,
> In the Apache configuration file, there is the following text:
>
> DO NOT EDIT. AUTOMATICALLY GENERATED.  USE INCLUDE FILES IF YOU NEED TO
> MAKE A CHANGE
> ...
> #    /etc/apache2/conf.d/includes/pre_main_global.conf
> #    /etc/apache2/conf.d/includes/pre_virtualhost_global.conf
> #    /etc/apache2/conf.d/includes/post_virtualhost_global.conf
> ...
>
> So because of cPanel, any changes I make are lost. In which of the above
> files should I apply the changes?
>
>
>
>
> On Saturday, September 16, 2023 at 02:15:06 AM GMT+3:30, Frank Gingras <
> thumbs@apache.org> wrote:
>
>
>
>
>
> You can only load one mpm module at a time. Run apachectl -M to see the
> loaded mpm.
>
> On Fri, Sep 15, 2023 at 6:19 PM Jason Long <ha...@yahoo.com.invalid>
> wrote:
> > Hello,
> > What happens if I use both modules at the same time?
> >
> >
> >
> >>
> >>
> >> On Fri, Sep 15, 2023 at 3:08 PM, Daniel Ferradal
> >> <df...@apache.org> wrote:
> >>
> >>
> >>
> >>
> >>
> >> El vie, 15 sept 2023 a las 13:36, Daniel Ferradal (<
> dferradal@apache.org>) escribió:
> >>>
> >>> When I probably recommended  MaxSpareThreads == to MaxRequestWorkers
> was due to Apache httpd with third party modules not restarting gracefully,
> that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to
> restart them.
> >>>
> >> I meant httpd server child processes not restarting gracefully
> >>
> >>
> >> --
> >> Daniel Ferradal
> >> HTTPD Project
> >> #httpd help at Libera.Chat
> >>
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,
In the Apache configuration file, there is the following text:

DO NOT EDIT. AUTOMATICALLY GENERATED.  USE INCLUDE FILES IF YOU NEED TO MAKE A CHANGE
...
#    /etc/apache2/conf.d/includes/pre_main_global.conf
#    /etc/apache2/conf.d/includes/pre_virtualhost_global.conf
#    /etc/apache2/conf.d/includes/post_virtualhost_global.conf
...

So because of cPanel, any changes I make are lost. In which of the above files should I apply the changes?




On Saturday, September 16, 2023 at 02:15:06 AM GMT+3:30, Frank Gingras <th...@apache.org> wrote: 





You can only load one mpm module at a time. Run apachectl -M to see the loaded mpm.

On Fri, Sep 15, 2023 at 6:19 PM Jason Long <ha...@yahoo.com.invalid> wrote:
> Hello,
> What happens if I use both modules at the same time?
> 
> 
> 
>>  
>>  
>> On Fri, Sep 15, 2023 at 3:08 PM, Daniel Ferradal
>> <df...@apache.org> wrote:
>> 
>> 
>>  
>> 
>> 
>> El vie, 15 sept 2023 a las 13:36, Daniel Ferradal (<df...@apache.org>) escribió:
>>> 
>>> When I probably recommended  MaxSpareThreads == to MaxRequestWorkers was due to Apache httpd with third party modules not restarting gracefully, that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to restart them.
>>> 
>> I meant httpd server child processes not restarting gracefully 
>> 
>> 
>> -- 
>> Daniel Ferradal
>> HTTPD Project
>> #httpd help at Libera.Chat
>>  
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Frank Gingras <th...@apache.org>.
You can only load one mpm module at a time. Run apachectl -M to see the
loaded mpm.

On Fri, Sep 15, 2023 at 6:19 PM Jason Long <ha...@yahoo.com.invalid>
wrote:

> Hello,
> What happens if I use both modules at the same time?
>
>
> On Fri, Sep 15, 2023 at 3:08 PM, Daniel Ferradal
> <df...@apache.org> wrote:
>
>
> El vie, 15 sept 2023 a las 13:36, Daniel Ferradal (<df...@apache.org>)
> escribió:
>
>
> When I probably recommended  MaxSpareThreads == to MaxRequestWorkers was
> due to Apache httpd with third party modules not restarting gracefully,
> that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to
> restart them.
>
> I meant httpd server child processes not restarting gracefully
>
>
> --
> Daniel Ferradal
> HTTPD Project
> #httpd help at Libera.Chat
>
>

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,What happens if I use both modules at the same time?

 
 
  On Fri, Sep 15, 2023 at 3:08 PM, Daniel Ferradal<df...@apache.org> wrote:   

El vie, 15 sept 2023 a las 13:36, Daniel Ferradal (<df...@apache.org>) escribió:


When I probably recommended  MaxSpareThreads == to MaxRequestWorkers was due to Apache httpd with third party modules not restarting gracefully, that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to restart them.

I meant httpd server child processes not restarting gracefully

-- 
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Daniel Ferradal <df...@apache.org>.
El vie, 15 sept 2023 a las 13:36, Daniel Ferradal (<df...@apache.org>)
escribió:

>
> When I probably recommended  MaxSpareThreads == to MaxRequestWorkers was
> due to Apache httpd with third party modules not restarting gracefully,
> that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to
> restart them.
>
> I meant httpd server child processes not restarting gracefully

-- 
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Daniel Ferradal <df...@apache.org>.
El vie, 15 sept 2023 a las 12:38, Mike Dewhirst (<mi...@dewhirst.com.au>)
escribió:

>
> # After reading
> https://www.liquidweb.com/kb/apache-performance-tuning-apache-mpm-modules/
> <IfModule mpm_event_module>
>         ServerLimit                     32
>         StartServers                    16
>         MinSpareThreads                 400
> #        MaxSpareThreads                 250 increase == MaxRequestWorkers
> dferradal@apache.org
>         MaxSpareThreads                 800
>         ThreadLimit                     64
>         ThreadsPerChild                 50
>         AsyncRequestWorkerFactor        2
>         MaxRequestWorkers               800
>         MaxConnectionsPerChild          0
> </IfModule>
>
>
>
>
When I probably recommended  MaxSpareThreads == to MaxRequestWorkers was
due to Apache httpd with third party modules not restarting gracefully,
that along to MaxConnectionsPerChild 0 would prevent HTTPD from trying to
restart them.

Where did you get this?

Also I keep wondering why people assign so many processes, StartServers 16?
In a threaded mpm?

Why not just assign just 2 or even 4, and assign 100, 200 worker threads
each?

-- 
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Mike Dewhirst <mi...@dewhirst.com.au>.
On 15/09/2023 8:14 pm, Jason Long wrote:
> Hello,
> Thank you so much.
> Can you share an ideal Apache configuration file? Something like a 
> template.

Not saying this is ideal but I went through an iterative set of confs 
and came to the following for a 4GB VM which seems to be OK in a lightly 
loaded scenario.

# event MPM
# ServerLimit: Upper limit on configurable number of processes (default 16)
# StartServers: initial number of server processes to start (default 3)
# MinSpareThreads: minimum number of worker threads which are kept spare 
(default 75)
# MaxSpareThreads: maximum number of worker threads which are kept spare 
(default 250)
# ThreadLimit: upper limit on the configurable number of threads per 
child process (default 64)
# ThreadsPerChild: constant number of worker threads in each server 
process (default 25)
# MaxRequestWorkers: maximum number of worker threads 
(ServerLimit*ThreadsPerChild)
# MaxConnectionsPerChild: maximum number of requests a server process serves
##
# After reading 
https://www.liquidweb.com/kb/apache-performance-tuning-apache-mpm-modules/
<IfModule mpm_event_module>
         ServerLimit                     32
         StartServers                    16
         MinSpareThreads                 400
#        MaxSpareThreads                 250 increase == 
MaxRequestWorkers dferradal@apache.org
         MaxSpareThreads                 800
         ThreadLimit                     64
         ThreadsPerChild                 50
         AsyncRequestWorkerFactor        2
         MaxRequestWorkers               800
         MaxConnectionsPerChild          0
</IfModule>

##
# First stab after reading Apache docs
#<IfModule mpm_event_module>
#    ServerLimit            16
#    StartServers            3
#    MinSpareThreads            75
#    MaxSpareThreads            250
#    ThreadLimit            750
#    ThreadsPerChild            250
#    AsyncRequestWorkerFactor    2
#    MaxRequestWorkers        1000
#    MaxConnectionsPerChild        0
#</IfModule>
# Original
#<IfModule mpm_event_module>
#    StartServers                    2
#    MinSpareThreads                 25
#    MaxSpareThreads                 75
#    ThreadLimit                     64
#    ThreadsPerChild                 25
#    MaxRequestWorkers               150
#    MaxConnectionsPerChild          0
#</IfModule>




>
>
>
>     On Fri, Sep 15, 2023 at 1:17 AM, Stormy
>     <st...@stormy.ca> wrote:
>     On 2023-09-14 16:01, Jason Long wrote:
>     > Hello,
>     > Thanks again.
>     > How about the other parameters? For example, how can I estimate
>     the best
>     > value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?
>
>     What is wrong with the default values? Why do you want to "estimate"?
>     Have you tried different values? If so, what was the
>     upside/downside of
>     your trials? Logs? Stats?
>
>     You say somewhere below that your server "uses WordPress, so it
>     also has
>     PHP and MySQL."  Fine, these are services (memory and CPU cycles)
>     outside the scope of Apache/httpd which just "serves" what it is
>     given
>     to "serve."
>
>     As an example, I have just rewritten a quite big (474 Gb) WP
>     website in
>     html5 with minimal php and js. Result: client output identical,
>     Apache
>     throughput just over 90% lower. YMMV
>
>     Good luck,
>     Paul
>     >
>     >
>     >    On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras
>     >    <th...@apache.org> wrote:
>     >    Just comment out the LoadModule line for prefork, and
>     uncomment the
>     >    line for event.
>     >
>     >    There is no "template"; you just need to tweak event to spawn
>     more
>     >    workers if needed, but the default settings should be fine
>     for small
>     >    volumes.
>     >
>     >    The prefork mpm should really be avoided at this point, as it
>     spawns
>     >    a separate process for every single HTTP request.
>     >
>     >    On Thu, Sep 14, 2023 at 2:47 PM Jason Long
>     >    <ha...@yahoo.com.invalid> wrote:
>     >
>     >        Hello,
>     >        Thanks again.
>     >        So, I must remove the "mpm_prefork_module" section. Am I
>     right?
>     >
>     >        Can you show me an Apache configuration template for use with
>     >        Wordpress?
>     >
>     >        When I must use "mpm_prefork_module"?
>     >
>     >
>     >            On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
>     >            <thumbs@apache.org <ma...@apache.org>> wrote:
>     >            500MB of RAM for the httpd processes, yes. The rest
>     of the
>     >            RAM will go towards php and MySQL.
>     >
>     >            Since wordpress is involved, you'll want to use the event
>     >            mpm (nor prefork, nor event), proxy_fcgi and php-fpm.
>     See:
>     >
>     > https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
>     >           
>     <https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM>
>     >
>     >
>     >
>     >            On Thu, Sep 14, 2023 at 6:21 AM Jason Long
>     >            <hack3rcon@yahoo.com <ma...@yahoo.com>> wrote:
>     >
>     >                Hello,
>     >                Thank you so much for your reply.
>     >                Can you tell me more about "It should run well under
>     >                500MB even with thousands of workers."? Do you
>     mean 500
>     >                MB memory?
>     >
>     >                My server uses WordPress, so it also has PHP and
>     MySQL.
>     >                What parameters should I change?
>     >
>     >                What is the formula for calculating
>     "mpm_prefork_module"
>     >                and "mpm_worker_module"
>     >                parameters?
>     >
>     >
>     >
>     >                    On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
>     >                    <francois.gingras@gmail.com
>     > <ma...@gmail.com>> wrote:
>     >                    You'll want to make sure you're using the
>     event mpm,
>     >                    in any case. It should run well under 500MB even
>     >                    with thousands of workers.
>     >
>     >                    If php or another dynamic language is
>     involved, then
>     >                    the answer will depend on what you use. You
>     should
>     >                    also consider if other services use RAM, such
>     as a
>     >                    rdbms.
>     >
>     >
>     >                    On Wed, Sep 13, 2023 at 8:52 AM Jason Long
>     >                    <ha...@yahoo.com.invalid> wrote:
>     >
>     >                        Hello,
>     >                        My server has 6 GB RAM and 4 virtual CPUs. I
>     >                        want to know How can I change the following
>     >                        settings for better performance?
>     >
>     >
>     >                        Timeout 45
>     >                        KeepAlive On
>     >                        MaxKeepAliveRequests 100
>     >                        KeepAliveTimeout 15
>     >
>     >                        <IfModule mpm_prefork_module>
>     >                              StartServers  3
>     >                              MinSpareServers         3
>     >                              MaxSpareServers        3
>     >                              ServerLimit  50
>     >                              MaxClients   50
>     >                              MaxRequestsPerChild  1000
>     >                        </IfModule>
>     >
>     >                        <IfModule mpm_worker_module>
>     >                              StartServers              3
>     >                              MaxClients                50
>     >                              MinSpareThreads     3
>     >                              MaxSpareThreads    3
>     >                              ThreadsPerChild       25
>     >                              MaxRequestsPerChild  1000
>     >                        </IfModule>
>     >
>     >
>     >                        I'm thankful if anyone can guide me to choose
>     >                        the above settings according to my server
>     >                        hardware specifications. If you know of other
>     >                        settings, please share.
>     >
>     >
>     >                        Thank you.
>     >
>     >
>     ---------------------------------------------------------------------
>     >                        To unsubscribe, e-mail:
>     > users-unsubscribe@httpd.apache.org
>     > <ma...@httpd.apache.org>
>     >                        For additional commands, e-mail:
>     > users-help@httpd.apache.org
>     > <ma...@httpd.apache.org>
>
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>     For additional commands, e-mail: users-help@httpd.apache.org
>


-- 
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Your
email software can handle signing.


Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,Thank you so much.Can you share an ideal Apache configuration file? Something like a template.


 
 
  On Fri, Sep 15, 2023 at 1:17 AM, Stormy<st...@stormy.ca> wrote:   On 2023-09-14 16:01, Jason Long wrote:
> Hello,
> Thanks again.
> How about the other parameters? For example, how can I estimate the best 
> value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?

What is wrong with the default values? Why do you want to "estimate"? 
Have you tried different values? If so, what was the upside/downside of 
your trials? Logs? Stats?

You say somewhere below that your server "uses WordPress, so it also has 
PHP and MySQL."  Fine, these are services (memory and CPU cycles) 
outside the scope of Apache/httpd which just "serves" what it is given 
to "serve."

As an example, I have just rewritten a quite big (474 Gb) WP website in 
html5 with minimal php and js. Result: client output identical, Apache 
throughput just over 90% lower. YMMV

Good luck,
Paul
> 
> 
>    On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras
>    <th...@apache.org> wrote:
>    Just comment out the LoadModule line for prefork, and uncomment the
>    line for event.
> 
>    There is no "template"; you just need to tweak event to spawn more
>    workers if needed, but the default settings should be fine for small
>    volumes.
> 
>    The prefork mpm should really be avoided at this point, as it spawns
>    a separate process for every single HTTP request.
> 
>    On Thu, Sep 14, 2023 at 2:47 PM Jason Long
>    <ha...@yahoo.com.invalid> wrote:
> 
>        Hello,
>        Thanks again.
>        So, I must remove the "mpm_prefork_module" section. Am I right?
> 
>        Can you show me an Apache configuration template for use with
>        Wordpress?
> 
>        When I must use "mpm_prefork_module"?
> 
> 
>            On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
>            <thumbs@apache.org <ma...@apache.org>> wrote:
>            500MB of RAM for the httpd processes, yes. The rest of the
>            RAM will go towards php and MySQL.
> 
>            Since wordpress is involved, you'll want to use the event
>            mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
> 
>            https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
>            <https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM>
> 
> 
> 
>            On Thu, Sep 14, 2023 at 6:21 AM Jason Long
>            <hack3rcon@yahoo.com <ma...@yahoo.com>> wrote:
> 
>                Hello,
>                Thank you so much for your reply.
>                Can you tell me more about "It should run well under
>                500MB even with thousands of workers."? Do you mean 500
>                MB memory?
> 
>                My server uses WordPress, so it also has PHP and MySQL.
>                What parameters should I change?
> 
>                What is the formula for calculating "mpm_prefork_module"
>                and "mpm_worker_module"
>                parameters?
> 
> 
> 
>                    On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
>                    <francois.gingras@gmail.com
>                    <ma...@gmail.com>> wrote:
>                    You'll want to make sure you're using the event mpm,
>                    in any case. It should run well under 500MB even
>                    with thousands of workers.
> 
>                    If php or another dynamic language is involved, then
>                    the answer will depend on what you use. You should
>                    also consider if other services use RAM, such as a
>                    rdbms.
> 
> 
>                    On Wed, Sep 13, 2023 at 8:52 AM Jason Long
>                    <ha...@yahoo.com.invalid> wrote:
> 
>                        Hello,
>                        My server has 6 GB RAM and 4 virtual CPUs. I
>                        want to know How can I change the following
>                        settings for better performance?
> 
> 
>                        Timeout 45
>                        KeepAlive On
>                        MaxKeepAliveRequests 100
>                        KeepAliveTimeout 15
> 
>                        <IfModule mpm_prefork_module>
>                              StartServers                 3
>                              MinSpareServers         3
>                              MaxSpareServers        3
>                              ServerLimit                   50
>                              MaxClients                    50
>                              MaxRequestsPerChild  1000
>                        </IfModule>
> 
>                        <IfModule mpm_worker_module>
>                              StartServers              3
>                              MaxClients                50
>                              MinSpareThreads     3
>                              MaxSpareThreads    3
>                              ThreadsPerChild       25
>                              MaxRequestsPerChild  1000
>                        </IfModule>
> 
> 
>                        I'm thankful if anyone can guide me to choose
>                        the above settings according to my server
>                        hardware specifications. If you know of other
>                        settings, please share.
> 
> 
>                        Thank you.
> 
>                        ---------------------------------------------------------------------
>                        To unsubscribe, e-mail:
>                        users-unsubscribe@httpd.apache.org
>                        <ma...@httpd.apache.org>
>                        For additional commands, e-mail:
>                        users-help@httpd.apache.org
>                        <ma...@httpd.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Stormy <st...@stormy.ca>.
On 2023-09-14 16:01, Jason Long wrote:
> Hello,
> Thanks again.
> How about the other parameters? For example, how can I estimate the best 
> value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?

What is wrong with the default values? Why do you want to "estimate"? 
Have you tried different values? If so, what was the upside/downside of 
your trials? Logs? Stats?

You say somewhere below that your server "uses WordPress, so it also has 
PHP and MySQL."  Fine, these are services (memory and CPU cycles) 
outside the scope of Apache/httpd which just "serves" what it is given 
to "serve."

As an example, I have just rewritten a quite big (474 Gb) WP website in 
html5 with minimal php and js. Result: client output identical, Apache 
throughput just over 90% lower. YMMV

Good luck,
Paul
> 
> 
>     On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras
>     <th...@apache.org> wrote:
>     Just comment out the LoadModule line for prefork, and uncomment the
>     line for event.
> 
>     There is no "template"; you just need to tweak event to spawn more
>     workers if needed, but the default settings should be fine for small
>     volumes.
> 
>     The prefork mpm should really be avoided at this point, as it spawns
>     a separate process for every single HTTP request.
> 
>     On Thu, Sep 14, 2023 at 2:47 PM Jason Long
>     <ha...@yahoo.com.invalid> wrote:
> 
>         Hello,
>         Thanks again.
>         So, I must remove the "mpm_prefork_module" section. Am I right?
> 
>         Can you show me an Apache configuration template for use with
>         Wordpress?
> 
>         When I must use "mpm_prefork_module"?
> 
> 
>             On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
>             <thumbs@apache.org <ma...@apache.org>> wrote:
>             500MB of RAM for the httpd processes, yes. The rest of the
>             RAM will go towards php and MySQL.
> 
>             Since wordpress is involved, you'll want to use the event
>             mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
> 
>             https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
>             <https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM>
> 
> 
> 
>             On Thu, Sep 14, 2023 at 6:21 AM Jason Long
>             <hack3rcon@yahoo.com <ma...@yahoo.com>> wrote:
> 
>                 Hello,
>                 Thank you so much for your reply.
>                 Can you tell me more about "It should run well under
>                 500MB even with thousands of workers."? Do you mean 500
>                 MB memory?
> 
>                 My server uses WordPress, so it also has PHP and MySQL.
>                 What parameters should I change?
> 
>                 What is the formula for calculating "mpm_prefork_module"
>                 and "mpm_worker_module"
>                 parameters?
> 
> 
> 
>                     On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
>                     <francois.gingras@gmail.com
>                     <ma...@gmail.com>> wrote:
>                     You'll want to make sure you're using the event mpm,
>                     in any case. It should run well under 500MB even
>                     with thousands of workers.
> 
>                     If php or another dynamic language is involved, then
>                     the answer will depend on what you use. You should
>                     also consider if other services use RAM, such as a
>                     rdbms.
> 
> 
>                     On Wed, Sep 13, 2023 at 8:52 AM Jason Long
>                     <ha...@yahoo.com.invalid> wrote:
> 
>                         Hello,
>                         My server has 6 GB RAM and 4 virtual CPUs. I
>                         want to know How can I change the following
>                         settings for better performance?
> 
> 
>                         Timeout 45
>                         KeepAlive On
>                         MaxKeepAliveRequests 100
>                         KeepAliveTimeout 15
> 
>                         <IfModule mpm_prefork_module>
>                              StartServers                 3
>                              MinSpareServers         3
>                              MaxSpareServers        3
>                              ServerLimit                   50
>                              MaxClients                    50
>                              MaxRequestsPerChild  1000
>                         </IfModule>
> 
>                         <IfModule mpm_worker_module>
>                              StartServers              3
>                              MaxClients                50
>                              MinSpareThreads     3
>                              MaxSpareThreads    3
>                              ThreadsPerChild       25
>                              MaxRequestsPerChild  1000
>                         </IfModule>
> 
> 
>                         I'm thankful if anyone can guide me to choose
>                         the above settings according to my server
>                         hardware specifications. If you know of other
>                         settings, please share.
> 
> 
>                         Thank you.
> 
>                         ---------------------------------------------------------------------
>                         To unsubscribe, e-mail:
>                         users-unsubscribe@httpd.apache.org
>                         <ma...@httpd.apache.org>
>                         For additional commands, e-mail:
>                         users-help@httpd.apache.org
>                         <ma...@httpd.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,Thanks again.How about the other parameters? For example, how can I estimate the best value for "MaxRequestsPerChild", "ThreadsPerChild" and etc.?

 
  On Thu, Sep 14, 2023 at 10:27 PM, Frank Gingras<th...@apache.org> wrote:   Just comment out the LoadModule line for prefork, and uncomment the line for event.
There is no "template"; you just need to tweak event to spawn more workers if needed, but the default settings should be fine for small volumes.
The prefork mpm should really be avoided at this point, as it spawns a separate process for every single HTTP request.
On Thu, Sep 14, 2023 at 2:47 PM Jason Long <ha...@yahoo.com.invalid> wrote:

Hello,Thanks again.So, I must remove the "mpm_prefork_module" section. Am I right?
Can you show me an Apache configuration template for use with Wordpress?
When I must use "mpm_prefork_module"?
 
 
  On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras<th...@apache.org> wrote:   500MB of RAM for the httpd processes, yes. The rest of the RAM will go towards php and MySQL.
Since wordpress is involved, you'll want to use the event mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM



On Thu, Sep 14, 2023 at 6:21 AM Jason Long <ha...@yahoo.com> wrote:

Hello,Thank you so much for your reply.Can you tell me more about "It should run well under 500MB even with thousands of workers."? Do you mean 500 MB memory?
My server uses WordPress, so it also has PHP and MySQL. What parameters should I change?

What is the formula for calculating "mpm_prefork_module" and "mpm_worker_module"parameters?



 
  On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras<fr...@gmail.com> wrote:   You'll want to make sure you're using the event mpm, in any case. It should run well under 500MB even with thousands of workers.
If php or another dynamic language is involved, then the answer will depend on what you use. You should also consider if other services use RAM, such as a rdbms.

On Wed, Sep 13, 2023 at 8:52 AM Jason Long <ha...@yahoo.com.invalid> wrote:

Hello,
My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change the following settings for better performance?


Timeout 45
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
    StartServers                 3
    MinSpareServers         3
    MaxSpareServers        3
    ServerLimit                   50
    MaxClients                    50
    MaxRequestsPerChild  1000
</IfModule>

<IfModule mpm_worker_module>
    StartServers              3
    MaxClients                50
    MinSpareThreads     3
    MaxSpareThreads    3 
    ThreadsPerChild       25
    MaxRequestsPerChild  1000
</IfModule>


I'm thankful if anyone can guide me to choose the above settings according to my server hardware specifications. If you know of other settings, please share.


Thank you. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


  

  

  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Frank Gingras <th...@apache.org>.
Just comment out the LoadModule line for prefork, and uncomment the line
for event.

There is no "template"; you just need to tweak event to spawn more workers
if needed, but the default settings should be fine for small volumes.

The prefork mpm should really be avoided at this point, as it spawns a
separate process for every single HTTP request.

On Thu, Sep 14, 2023 at 2:47 PM Jason Long <ha...@yahoo.com.invalid>
wrote:

> Hello,
> Thanks again.
> So, I must remove the "mpm_prefork_module" section. Am I right?
>
> Can you show me an Apache configuration template for use with Wordpress?
>
> When I must use "mpm_prefork_module"?
>
>
> On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras
> <th...@apache.org> wrote:
> 500MB of RAM for the httpd processes, yes. The rest of the RAM will go
> towards php and MySQL.
>
> Since wordpress is involved, you'll want to use the event mpm (nor
> prefork, nor event), proxy_fcgi and php-fpm. See:
>
> https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
>
>
>
> On Thu, Sep 14, 2023 at 6:21 AM Jason Long <ha...@yahoo.com> wrote:
>
> Hello,
> Thank you so much for your reply.
> Can you tell me more about "It should run well under 500MB even with
> thousands of workers."? Do you mean 500 MB memory?
>
> My server uses WordPress, so it also has PHP and MySQL. What parameters
> should I change?
>
> What is the formula for calculating "mpm_prefork_module" and
> "mpm_worker_module"
> parameters?
>
>
>
> On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras
> <fr...@gmail.com> wrote:
> You'll want to make sure you're using the event mpm, in any case. It
> should run well under 500MB even with thousands of workers.
>
> If php or another dynamic language is involved, then the answer will
> depend on what you use. You should also consider if other services use RAM,
> such as a rdbms.
>
>
> On Wed, Sep 13, 2023 at 8:52 AM Jason Long <ha...@yahoo.com.invalid>
> wrote:
>
> Hello,
> My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change
> the following settings for better performance?
>
>
> Timeout 45
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
>
> <IfModule mpm_prefork_module>
>     StartServers                 3
>     MinSpareServers         3
>     MaxSpareServers        3
>     ServerLimit                   50
>     MaxClients                    50
>     MaxRequestsPerChild  1000
> </IfModule>
>
> <IfModule mpm_worker_module>
>     StartServers              3
>     MaxClients                50
>     MinSpareThreads     3
>     MaxSpareThreads    3
>     ThreadsPerChild       25
>     MaxRequestsPerChild  1000
> </IfModule>
>
>
> I'm thankful if anyone can guide me to choose the above settings according
> to my server hardware specifications. If you know of other settings, please
> share.
>
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,Thanks again.So, I must remove the "mpm_prefork_module" section. Am I right?
Can you show me an Apache configuration template for use with Wordpress?
When I must use "mpm_prefork_module"?
 
 
  On Thu, Sep 14, 2023 at 4:24 PM, Frank Gingras<th...@apache.org> wrote:   500MB of RAM for the httpd processes, yes. The rest of the RAM will go towards php and MySQL.
Since wordpress is involved, you'll want to use the event mpm (nor prefork, nor event), proxy_fcgi and php-fpm. See:
https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM



On Thu, Sep 14, 2023 at 6:21 AM Jason Long <ha...@yahoo.com> wrote:

Hello,Thank you so much for your reply.Can you tell me more about "It should run well under 500MB even with thousands of workers."? Do you mean 500 MB memory?
My server uses WordPress, so it also has PHP and MySQL. What parameters should I change?

What is the formula for calculating "mpm_prefork_module" and "mpm_worker_module"parameters?



 
  On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras<fr...@gmail.com> wrote:   You'll want to make sure you're using the event mpm, in any case. It should run well under 500MB even with thousands of workers.
If php or another dynamic language is involved, then the answer will depend on what you use. You should also consider if other services use RAM, such as a rdbms.

On Wed, Sep 13, 2023 at 8:52 AM Jason Long <ha...@yahoo.com.invalid> wrote:

Hello,
My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change the following settings for better performance?


Timeout 45
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
    StartServers                 3
    MinSpareServers         3
    MaxSpareServers        3
    ServerLimit                   50
    MaxClients                    50
    MaxRequestsPerChild  1000
</IfModule>

<IfModule mpm_worker_module>
    StartServers              3
    MaxClients                50
    MinSpareThreads     3
    MaxSpareThreads    3 
    ThreadsPerChild       25
    MaxRequestsPerChild  1000
</IfModule>


I'm thankful if anyone can guide me to choose the above settings according to my server hardware specifications. If you know of other settings, please share.


Thank you. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


  

  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,Thank you so much for your reply.Can you tell me more about "It should run well under 500MB even with thousands of workers."? Do you mean 500 MB memory?
My server uses WordPress, so it also has PHP and MySQL. What parameters should I change?

What is the formula for calculating "mpm_prefork_module" and "mpm_worker_module"parameters?



 
  On Wed, Sep 13, 2023 at 5:00 PM, Francois Gingras<fr...@gmail.com> wrote:   You'll want to make sure you're using the event mpm, in any case. It should run well under 500MB even with thousands of workers.
If php or another dynamic language is involved, then the answer will depend on what you use. You should also consider if other services use RAM, such as a rdbms.

On Wed, Sep 13, 2023 at 8:52 AM Jason Long <ha...@yahoo.com.invalid> wrote:

Hello,
My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change the following settings for better performance?


Timeout 45
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
    StartServers                 3
    MinSpareServers         3
    MaxSpareServers        3
    ServerLimit                   50
    MaxClients                    50
    MaxRequestsPerChild  1000
</IfModule>

<IfModule mpm_worker_module>
    StartServers              3
    MaxClients                50
    MinSpareThreads     3
    MaxSpareThreads    3 
    ThreadsPerChild       25
    MaxRequestsPerChild  1000
</IfModule>


I'm thankful if anyone can guide me to choose the above settings according to my server hardware specifications. If you know of other settings, please share.


Thank you. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


  

Re: [users@httpd] How do I choose the best settings for the Apache Server?

Posted by Francois Gingras <fr...@gmail.com>.
You'll want to make sure you're using the event mpm, in any case. It should
run well under 500MB even with thousands of workers.

If php or another dynamic language is involved, then the answer will depend
on what you use. You should also consider if other services use RAM, such
as a rdbms.


On Wed, Sep 13, 2023 at 8:52 AM Jason Long <ha...@yahoo.com.invalid>
wrote:

> Hello,
> My server has 6 GB RAM and 4 virtual CPUs. I want to know How can I change
> the following settings for better performance?
>
>
> Timeout 45
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
>
> <IfModule mpm_prefork_module>
>     StartServers                 3
>     MinSpareServers         3
>     MaxSpareServers        3
>     ServerLimit                   50
>     MaxClients                    50
>     MaxRequestsPerChild  1000
> </IfModule>
>
> <IfModule mpm_worker_module>
>     StartServers              3
>     MaxClients                50
>     MinSpareThreads     3
>     MaxSpareThreads    3
>     ThreadsPerChild       25
>     MaxRequestsPerChild  1000
> </IfModule>
>
>
> I'm thankful if anyone can guide me to choose the above settings according
> to my server hardware specifications. If you know of other settings, please
> share.
>
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>