Re: [users@httpd] Re: Are this option

2022-03-24 Thread Marc Serra
Please don't spend more time on this until I write another email. I
found sometrhng strange on our PHP code.

Missatge de Marc Serra  del dia dj., 24 de març 2022
a les 12:42:
>
> > Pretty bad numbers actually, aren't you limited by the network
> > bandwidth between ab and the server?
>
> I think it isn't a bandwidth problem. Look ...
>
> wget https://domain.tld/test.zip
> --2022-03-24 12:04:26--  https://domain.tld/test.zip
> Resolving domain.tld (domain.tld)... 82.x.x.x
> Connecting to domain.tld (domain.tld)|82.x.x.x|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 688466403 (657M) [application/zip]
> Saving to: ‘test.zip’
>
> test.zip
> 100%[===>]
> 656.57M  11.2MB/sin 59s
>
> 2022-03-24 12:05:25 (11.2 MB/s) - ‘test.zip’ saved [688466403/688466403]
>
>
> > What are the numbers from ab when it's running on the server (i.e. ab
> > ... https://localhost/index.html)?
>
> Not good (this test is made from the same server where are hosted
> www.domain.tld) ...
>
> ab -l -H 'Accept-Encoding: gzip,deflate' -k -n 1 -c 1000
> https://www.domain.tld/index.html
> This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking www.domain.tld (be patient)
> Completed 1000 requests
> Completed 2000 requests
> Completed 3000 requests
> Completed 4000 requests
> Completed 5000 requests
> Completed 6000 requests
> Completed 7000 requests
> Completed 8000 requests
> Completed 9000 requests
> Completed 1 requests
> Finished 1 requests
>
>
> Server Software:Apache
> Server Hostname:www.domain.tld
> Server Port:443
> SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
> Server Temp Key:X25519 253 bits
> TLS Server Name:www.domain.tld
>
> Document Path:  /index.html
> Document Length:Variable
>
> Concurrency Level:  1000
> Time taken for tests:   262.963 seconds
> Complete requests:  1
> Failed requests:0
> Non-2xx responses:  9582
> Keep-Alive requests:9582
> Total transferred:  57837957 bytes
> HTML transferred:   49816818 bytes
> Requests per second:38.03 [#/sec] (mean)
> Time per request:   26296.304 [ms] (mean)
> Time per request:   26.296 [ms] (mean, across all concurrent requests)
> Transfer rate:  214.79 [Kbytes/sec] received
>
> Connection Times (ms)
>   min  mean[+/-sd] median   max
> Connect:0  292 1179.6  08078
> Processing: 0 24796 6927.5  27341   54249
> Waiting:0 25726 5596.4  27377   54249
> Total:  0 25088 6821.9  27372   54249
>
> Percentage of the requests served within a certain time (ms)
>   50%  27372
>   66%  27532
>   75%  27641
>   80%  27767
>   90%  28015
>   95%  28133
>   98%  31766
>   99%  40137
>  100%  54249 (longest request
>
>
> > The CPU usage looks high (20%) too for the requested load, but that's
> > probably on mod_deflate (and TLS handshakes), how does "-H
> > 'Accept-Encoding: gzip,deflate'" change things?
>
> I tried without the -H option and I got similar results
>
> ab -l -k -n 1 -c 1000 https://www.domain.tld/index.php
> This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking www.domain.tld (be patient)
> Completed 1000 requests
> Completed 2000 requests
> Completed 3000 requests
> Completed 4000 requests
> Completed 5000 requests
> Completed 6000 requests
> Completed 7000 requests
> Completed 8000 requests
> Completed 9000 requests
> Completed 1 requests
> Finished 1 requests
>
>
> Server Software:Apache
> Server Hostname:www.domain.tld
> Server Port:443
> SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
> Server Temp Key:X25519 253 bits
> TLS Server Name:www.domain.tld
>
> Document Path:  /index.php
> Document Length:Variable
>
> Concurrency Level:  1000
> Time taken for tests:   325.617 seconds
> Complete requests:  1
> Failed requests:0
> Keep-Alive requests:0
> Total transferred:  157188 bytes
> HTML transferred:   156440 bytes
> Requests per second:30.71 [#/sec] (mean)
> Time per request:   32561.691 [ms] (mean)
> Time per request:   32.562 [ms] (mean, across all concurrent requests)
> Transfer rate:  4714.25 [Kbytes/sec] received
>
> Connection Times (ms)
>   min  mean[+/-sd] median   max
> Connect:1  177 610.2  23500
> Processing:   334 30715 5844.0  32449   48394
> Waiting:  218 30593 5846.3  32327   48264
> Total:336 30892 5586.1  32456   48396
>
> Percentage of the r

Re: [users@httpd] Re: Are this option

2022-03-24 Thread Marc Serra
> Pretty bad numbers actually, aren't you limited by the network
> bandwidth between ab and the server?

I think it isn't a bandwidth problem. Look ...

wget https://domain.tld/test.zip
--2022-03-24 12:04:26--  https://domain.tld/test.zip
Resolving domain.tld (domain.tld)... 82.x.x.x
Connecting to domain.tld (domain.tld)|82.x.x.x|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 688466403 (657M) [application/zip]
Saving to: ‘test.zip’

test.zip
100%[===>]
656.57M  11.2MB/sin 59s

2022-03-24 12:05:25 (11.2 MB/s) - ‘test.zip’ saved [688466403/688466403]


> What are the numbers from ab when it's running on the server (i.e. ab
> ... https://localhost/index.html)?

Not good (this test is made from the same server where are hosted
www.domain.tld) ...

ab -l -H 'Accept-Encoding: gzip,deflate' -k -n 1 -c 1000
https://www.domain.tld/index.html
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.domain.tld (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 1 requests
Finished 1 requests


Server Software:Apache
Server Hostname:www.domain.tld
Server Port:443
SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key:X25519 253 bits
TLS Server Name:www.domain.tld

Document Path:  /index.html
Document Length:Variable

Concurrency Level:  1000
Time taken for tests:   262.963 seconds
Complete requests:  1
Failed requests:0
Non-2xx responses:  9582
Keep-Alive requests:9582
Total transferred:  57837957 bytes
HTML transferred:   49816818 bytes
Requests per second:38.03 [#/sec] (mean)
Time per request:   26296.304 [ms] (mean)
Time per request:   26.296 [ms] (mean, across all concurrent requests)
Transfer rate:  214.79 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:0  292 1179.6  08078
Processing: 0 24796 6927.5  27341   54249
Waiting:0 25726 5596.4  27377   54249
Total:  0 25088 6821.9  27372   54249

Percentage of the requests served within a certain time (ms)
  50%  27372
  66%  27532
  75%  27641
  80%  27767
  90%  28015
  95%  28133
  98%  31766
  99%  40137
 100%  54249 (longest request


> The CPU usage looks high (20%) too for the requested load, but that's
> probably on mod_deflate (and TLS handshakes), how does "-H
> 'Accept-Encoding: gzip,deflate'" change things?

I tried without the -H option and I got similar results

ab -l -k -n 1 -c 1000 https://www.domain.tld/index.php
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.domain.tld (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 1 requests
Finished 1 requests


Server Software:Apache
Server Hostname:www.domain.tld
Server Port:443
SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key:X25519 253 bits
TLS Server Name:www.domain.tld

Document Path:  /index.php
Document Length:Variable

Concurrency Level:  1000
Time taken for tests:   325.617 seconds
Complete requests:  1
Failed requests:0
Keep-Alive requests:0
Total transferred:  157188 bytes
HTML transferred:   156440 bytes
Requests per second:30.71 [#/sec] (mean)
Time per request:   32561.691 [ms] (mean)
Time per request:   32.562 [ms] (mean, across all concurrent requests)
Transfer rate:  4714.25 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:1  177 610.2  23500
Processing:   334 30715 5844.0  32449   48394
Waiting:  218 30593 5846.3  32327   48264
Total:336 30892 5586.1  32456   48396

Percentage of the requests served within a certain time (ms)
  50%  32456
  66%  32616
  75%  32700
  80%  32733
  90%  32833
  95%  32934
  98%  33002
  99%  33033
 100%  48396 (longest request)


> Sorry, more questions than answers, but results on my (poor) laptop look like:

Oh, no! Thank's for all your answers, questions and time!

> Or with a shorter resource (1KB) and 10x more requests to amortize the ramp 
> up:



--
Marc Serra

-- 


   
  
  

Re: [users@httpd] Re: Are this option

2022-03-24 Thread Yann Ylavic
On Thu, Mar 24, 2022 at 9:36 AM Marc Serra  wrote:
>
> I tested the settings with Apache Bench ...
>
> ab -l -H 'Accept-Encoding: gzip,deflate' -k -n 1 -c 1000
> https://www.DOMAIN1.TLD/index.html
>
> I'm not sure if the following are good numbers or bad numbers. Can
> anyone help me interpret this result please?

Pretty bad numbers actually, aren't you limited by the network
bandwidth between ab and the server?
What are the numbers from ab when it's running on the server (i.e. ab
... https://localhost/index.html)?

The CPU usage looks high (20%) too for the requested load, but that's
probably on mod_deflate (and TLS handshakes), how does "-H
'Accept-Encoding: gzip,deflate'" change things?

Sorry, more questions than answers, but results on my (poor) laptop look like:
$ bin/ab -k -n 1 -c 1000 https://localhost:40443/250KB.bin
...
Server Software:Apache/2.5.1-dev
Server Hostname:localhost
Server Port:40443
SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Server Temp Key:X25519 253 bits

Document Path:  /250KB.bin
Document Length:256000 bytes

Concurrency Level:  1000
Concurrency achieved:   1000
Rampup delay:   0 [ms]
Time taken for tests:   2.437 seconds
Complete requests:  1
Failed requests:0
Keep-Alive requests:1
Total transferred:  2607109000 bytes
HTML transferred:   2603564800 bytes
Requests per second:4103.52 [#/sec] (mean)
Time per request:   243.694 [ms] (mean)
Time per request:   0.244 [ms] (mean, across all concurrent requests)
Transfer rate:  1044756.99 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:0   34 103.0  0 378
Processing:   181  203   9.6203 527
Waiting:0   13   6.9 10 152
Total:181  237 105.3203 579

Percentage of the requests served within a certain time (ms)
  50%203
  66%206
  75%209
  80%212
  90%517
  95%552
  98%563
  99%567
 100%579 (longest request)


Or with a shorter resource (1KB) and 10x more requests to amortize the ramp up:
$ bin/ab -k -n 10 -c 1000 https://localhost:40443/1KB.bin
...
Concurrency Level:  1000
Concurrency achieved:   1000
Rampup delay:   0 [ms]
Time taken for tests:   1.953 seconds
Complete requests:  10
Failed requests:0
Keep-Alive requests:99475
Total transferred:  135073187 bytes
HTML transferred:   103209984 bytes
Requests per second:51202.91 [#/sec] (mean)
Time per request:   19.530 [ms] (mean)
Time per request:   0.020 [ms] (mean, across all concurrent requests)
Transfer rate:  67540.43 [Kbytes/sec] received


Regards;
Yann.

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



Re: [users@httpd] Re: Are this option

2022-03-24 Thread Marc Serra
Hi again,

I tested the settings with Apache Bench ...

ab -l -H 'Accept-Encoding: gzip,deflate' -k -n 1 -c 1000
https://www.DOMAIN1.TLD/index.html

I'm not sure if the following are good numbers or bad numbers. Can
anyone help me interpret this result please?



This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.DOMAIN1.TLD (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 1 requests
Finished 1 requests


Server Software:Apache
Server Hostname:www.DOMAIN1.TLD
Server Port:443
SSL/TLS Protocol:   TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key:X25519 253 bits
TLS Server Name:www.DOMAIN1.TLD

Document Path:  /index.html
Document Length:Variable

Concurrency Level:  1000
Time taken for tests:   318.542 seconds
Complete requests:  1
Failed requests:0
Non-2xx responses:  9572
Keep-Alive requests:9561
Total transferred:  208048597 bytes
HTML transferred:   200026656 bytes
Requests per second:31.39 [#/sec] (mean)
Time per request:   31854.176 [ms] (mean)
Time per request:   31.854 [ms] (mean, across all concurrent requests)
Transfer rate:  637.82 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:0   67 283.1  02752
Processing:91 30309 7974.2  33159   49480
Waiting:0 31523 5907.8  33184   49478
Total: 91 30376 7926.5  33162   49480

Percentage of the requests served within a certain time (ms)
  50%  33162
  66%  33264
  75%  33324
  80%  33357
  90%  33503
  95%  33578
  98%  33626
  99%  33692
 100%  49480 (longest request





The memory used on the server it's really low ...

free -m
  totalusedfree  shared  buff/cache   available
Mem:  643072752 448 196   61106   60683
Swap:  7629   47625






I remind you of the current settings

StartServers 2
ServerLimit 45
ThreadLimit 100
ThreadsPerChild 100
MinSpareThreads 100
MaxSpareThreads 750
MaxRequestWorkers 1500
MaxConnectionsPerChild 0









 Finally here you have the result of mod_status (very looong)


Apache Server Status for 82.x.x.x (via 82.x.x.x)
Server Version: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
Server MPM: event
Server Built: 2022-03-16T16:52:53
Current Time: Thursday, 24-Mar-2022 09:06:54 CET
Restart Time: Thursday, 24-Mar-2022 09:05:13 CET
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 1 minute 41 seconds
Server load: 6.17 5.45 3.68
Total accesses: 2932 - Total Traffic: 68.5 MB - Total Duration: 66037674
CPU Usage: u15.82 s2.52 cu.97 cs.21 - 19.3% CPU load
29 requests/sec - 0.7 MB/second - 23.9 kB/request - 22523.1 ms/request
1004 requests currently being processed, 396 idle workers
Slot PID Stopping Connections Threads Async connections
total accepting busy idle writing keep-alive closing
0 245322 no 100 no 100 0 0 0 0
1 247187 no 100 no 100 0 0 0 0
2 245581 no 100 no 100 0 0 0 0
3 245737 no 100 no 100 0 0 0 0
4 245738 no 100 no 100 0 0 0 0
5 245991 no 99 yes 99 1 0 0 0
6 245992 no 100 no 100 0 0 0 0
7 247321 no 100 no 100 0 0 0 0
8 245994 no 100 no 100 0 0 0 0
9 247322 no 100 no 100 0 0 0 0
10 247565 no 0 yes 0 100 0 0 0
11 247566 no 0 yes 0 100 0 0 0
12 247570 no 1 yes 2 98 0 0 0
13 247582 no 3 yes 3 97 0 0 0
Sum 14 0 1003 1004 396 0 0 0









WW_W








__

Re: [users@httpd] Re: Are this option

2022-03-18 Thread Marc Serra
Thank you very much Yann,

The workload will be static HTML files.

The site typically has 1.000 visits per hour, but some days it has a
sudden demand of 10.000 unique visitors in a matter of seconds.

We start with your values and check periodically with mod_status.

Thank's again

Missatge de Yann Ylavic  del dia dv., 18 de març
2022 a les 11:19:


>
> On Fri, Mar 18, 2022 at 8:27 AM Marc Serra  wrote:
> >
> > Thank's for your comments Frank,
> >
> > Reading the Apache documentation
> > (https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html#threadlimit)
> > I cannot find the way to calculate an optimal value for ThreadLimit
> > and ThreadsPerChild directives for that reason I kept the default
> > values (64 and 25).
> >
> > Can you (or anyone) help me to find the right values?
>
> This script might help for an MPM event configuration based on
> MaxRequestWorkers:
> ```
> #!/bin/bash
>
> if [ $# -lt 1 ]; then
> echo>&2 "usage: `basename $0` "
> exit 1
> fi
>
> # Some pre-computations
> numWorkers=$1
> if [ $numWorkers -lt 1000 ]; then
> numProcesses=10
> elif [ $numWorkers -lt 1 ]; then
> numProcesses=$(($numWorkers / 100))
> else
> numProcesses=100
> fi
> numThreads=$(($numWorkers / $numProcesses))
>
> cat < # MPM event settings
> StartServers 1
> ServerLimit  $(($numProcesses * 3))
> ThreadLimit  $numThreads
> ThreadsPerChild  $numThreads
> MinSpareThreads  $numThreads
> MaxSpareThreads  $(($numWorkers / 2))
> MaxRequestWorkers$numWorkers
> #ThreadStackSize 524288
> MaxConnectionsPerChild   0
> EOF
> ```
>
> For a MaxRequestWorkers of 1500, it gives:
> # MPM event settings
> StartServers 1
> ServerLimit  45
> ThreadLimit  100
> ThreadsPerChild  100
> MinSpareThreads  100
> MaxSpareThreads  750
> MaxRequestWorkers1500
> #ThreadStackSize 524288
> MaxConnectionsPerChild   0
>
> But you didn't describe your workload: static resources, dynamic
> content (local with mod_cgid or offloaded with mod_proxy_fcgi),
> proxying (HTTP, websocket), etc.
> Since your system looks quite capable (RAM/CPU), the limit for
> MaxRequestWorkers depends mainly on the average request time (bounded
> by timeouts) which you probably should measure for your workload.
>
>
> Regards;
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>

-- 
Marc Serra

-- 


   
  
  
  
 Manxa 1876, S.L.
Ctra. Les 
Tries, 85.17800 Olot (Girona)
*Tel. 972 27 45 30 www.manxa.com 
* 
  *Manxa 
Industrial *
 
  *Manxa Ferros *
   *Manxa Ferreteria i Parament de la Llar 
*
  

  



-- 


El contingut d’aquest correu electrònic i els seus annexos és 
estrictament confidencial. En el cas que no siguis el destinatari i hagis 
rebut aquest missatge per error, preguem que ho comuniquis al remitent i 
procedeixis a la seva eliminació, sense difondre, emmagatzemar o copiar el 
seu contingut. Imprimeix aquest correu només si és necessari.

El contenido 
de este correo electrónico y sus anexos es estrictamente confidencial. En 
el caso de que no seas el destinatario y hayas recibido este mensaje por 
error, rogamos lo comuniques al remitente y procedas a su eliminación, sin 
difundir, almacenar o copiar su contenido. Imprimir este correo solo si es 
necesario.

The content of this email and its attachments is strictly 
confidential. If you are not the recipient and you have received this 
message by mistake, please notify the sender and proceed to its 
elimination, without spreading, storing or copying its content. Print this 
email only if necessary.

Le contenu de cet e-mail et de ses pièces jointes 
est strictement confidentiel. Dans le cas où vous n'êtes pas le 
destinataire et avez reçu ce message par erreur, veuillez en informer 
l'expéditeur et procéder à sa suppression, sans diffuser, stocker ou copier 
son contenu. Imprimez cet e-mail uniquement si nécessaire.

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



Re: [users@httpd] Re: Are this option

2022-03-18 Thread Yann Ylavic
On Fri, Mar 18, 2022 at 8:27 AM Marc Serra  wrote:
>
> Thank's for your comments Frank,
>
> Reading the Apache documentation
> (https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html#threadlimit)
> I cannot find the way to calculate an optimal value for ThreadLimit
> and ThreadsPerChild directives for that reason I kept the default
> values (64 and 25).
>
> Can you (or anyone) help me to find the right values?

This script might help for an MPM event configuration based on
MaxRequestWorkers:
```
#!/bin/bash

if [ $# -lt 1 ]; then
echo>&2 "usage: `basename $0` "
exit 1
fi

# Some pre-computations
numWorkers=$1
if [ $numWorkers -lt 1000 ]; then
numProcesses=10
elif [ $numWorkers -lt 1 ]; then
numProcesses=$(($numWorkers / 100))
else
numProcesses=100
fi
numThreads=$(($numWorkers / $numProcesses))

cat <

Re: [users@httpd] Re: Are this option

2022-03-18 Thread Marc Serra
Thank's for your comments Frank,

Reading the Apache documentation
(https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html#threadlimit)
I cannot find the way to calculate an optimal value for ThreadLimit
and ThreadsPerChild directives for that reason I kept the default
values (64 and 25).

Can you (or anyone) help me to find the right values?



Missatge de Frank Gingras  del dia dj., 17 de març
2022 a les 17:19:
>
> Those settings could fit your workload, or not. You need to measure it with 
> /server-status to see how many idle workers you have.
>
> That being said, ThreadsPerChild seems very low. Depending on your content, 
> you could likely ramp up to a much higher value, which means that you would 
> need less parent processes.
>
>
>
> On Wed, 16 Mar 2022 at 08:14, Marc Serra  wrote:
>>
>> I'm sorry to insist ... if this list is not the right place to ask that 
>> question, could anyone tell me where to do it?
>>
>> Thank's
>>
>> Missatge de Marc Serra  del dia dc., 9 de març 2022 a les 
>> 18:01:
>>>
>>> Hi, I want to configure an apache server to support a high load site. Are 
>>> these settings correct?
>>>
>>> /etc/apache2/mods-enabled/mpm_event.conf
>>>
>>> 
>>> StartServers 2
>>> MinSpareThreads  75
>>> MaxSpareThreads  250
>>> ThreadLimit  64
>>> ThreadsPerChild  25
>>> MaxRequestWorkers 1500
>>> MaxConnectionsPerChild   0
>>> ServerLimit 75
>>> 
>>>
>>> I used a combination of 
>>> https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html and 
>>> https://support.plesk.com/hc/en-us/articles/214529205-Apache-keeps-going-down-on-a-Plesk-server-server-reached-MaxRequestWorkers-setting
>>>  ...
>>>
>>> MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) / average 
>>> Apache process size
>>> =>
>>> 1500 = (64000 - 6) / 40
>>>
>>> The default ServerLimit value is 16. To increase it, you must also raise 
>>> MaxRequestWorkers using the following formula: ServerLimit value x 25 = 
>>> MaxRequestWorkers value. For example, if ServerLimit is set to 20, then 
>>> MaxRequestWorkers will be 20 x 25 = 500.
>>> =>
>>> 75 x 25 = 1500
>>>
>>>
>>>
>>> The hardware includes 64GB of memory, AMD Ryzen 7 PRO 3700 8-Core Processor 
>>> and NVME disks.
>>>
>>> I'm using Apache 2.4.41 with event MPM on ubuntu 20.04 ...
>>>
>>> Server version: Apache/2.4.41 (Ubuntu)
>>> Server built:   2022-01-05T14:49:56
>>> Server's Module Magic Number: 20120211:88
>>> Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
>>> Compiled using: APR 1.6.5, APR-UTIL 1.6.1
>>> Architecture:   64-bit
>>> Server MPM: event
>>>   threaded: yes (fixed thread count)
>>> forked: yes (variable process count)
>>> Server compiled with
>>>  -D APR_HAS_SENDFILE
>>>  -D APR_HAS_MMAP
>>>  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
>>>  -D APR_USE_SYSVSEM_SERIALIZE
>>>  -D APR_USE_PTHREAD_SERIALIZE
>>>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>>>  -D APR_HAS_OTHER_CHILD
>>>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>>>  -D DYNAMIC_MODULE_LIMIT=256
>>>  -D HTTPD_ROOT="/etc/apache2"
>>>  -D SUEXEC_BIN="/usr/lib/apache2/suexec"
>>>  -D DEFAULT_PIDLOG="/var/run/apache2.pid"
>>>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>>>  -D DEFAULT_ERRORLOG="logs/error_log"
>>>  -D AP_TYPES_CONFIG_FILE="mime.types"
>>>  -D SERVER_CONFIG_FILE="apache2.conf"
>>>
>>> And this loaded Modules...
>>>  core_module (static)
>>>  so_module (static)
>>>  watchdog_module (static)
>>>  http_module (static)
>>>  log_config_module (static)
>>>  logio_module (static)
>>>  version_module (static)
>>>  unixd_module (static)
>>>  access_compat_module (shared)
>>>  aclr_module (shared)
>>>  actions_module (shared)
>>>  alias_module (shared)
>>>  auth_basic_module (shared)
>>>  authn_core_module (shared)
>>>  authn_file_module (shared)
>>>  authz_core_module (shared)
>>>  authz_host_module (shared)
>>>  authz_user_module (shared)
>>>  autoindex_module (shared)
>>>  cgid_module (shared)
>>>  deflate_module (shared)
>>>  dir_module (shared)
>>>  env_module (shared)
>>>  fcgid_module (shared)
>>>  filter_module (shared)
>>>  headers_module (shared)
>>>  include_module (shared)
>>>  mime_module (shared)
>>>  mpm_event_module (shared)
>>>  negotiation_module (shared)
>>>  proxy_module (shared)
>>>  proxy_fcgi_module (shared)
>>>  proxy_http_module (shared)
>>>  proxy_wstunnel_module (shared)
>>>  remoteip_module (shared)
>>>  reqtimeout_module (shared)
>>>  rewrite_module (shared)
>>>  setenvif_module (shared)
>>>  socache_shmcb_module (shared)
>>>  ssl_module (shared)
>>>  status_module (shared)
>>>  suexec_module (shared)
>>>  unique_id_module (shared)
>>>  userdir_module (shared)
>>>
>>>
>>> Thank's for your time.
>>>
>>
>>
>> --
>> Marc Serra
>> Organització i Sistemes
>>
>>
>> Manxa 1876, S.L.
>> Ctra. Les Tries, 85.17800 Olot (Girona)
>> Tel. 972 27 45 30 www.manxa.com Manxa Industrial
>> Manxa Ferros

>> Manxa Ferreteria i 

Re: [users@httpd] Re: Are this option

2022-03-17 Thread Frank Gingras
Those settings could fit your workload, or not. You need to measure it with
/server-status to see how many idle workers you have.

That being said, ThreadsPerChild seems very low. Depending on your content,
you could likely ramp up to a much higher value, which means that you would
need less parent processes.



On Wed, 16 Mar 2022 at 08:14, Marc Serra  wrote:

> I'm sorry to insist ... if this list is not the right place to ask that
> question, could anyone tell me where to do it?
>
> Thank's
>
> Missatge de Marc Serra  del dia dc., 9 de març 2022 a
> les 18:01:
>
>> Hi, I want to configure an apache server to support a high load site. Are
>> these settings correct?
>>
>> /etc/apache2/mods-enabled/mpm_event.conf
>>
>> 
>> StartServers 2
>> MinSpareThreads  75
>> MaxSpareThreads  250
>> ThreadLimit  64
>> ThreadsPerChild  25
>> MaxRequestWorkers 1500
>> MaxConnectionsPerChild   0
>> ServerLimit 75
>> 
>>
>> I used a combination of
>> https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html and
>> https://support.plesk.com/hc/en-us/articles/214529205-Apache-keeps-going-down-on-a-Plesk-server-server-reached-MaxRequestWorkers-setting
>> ...
>>
>> MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) /
>> average Apache process size
>> =>
>> 1500 = (64000 - 6) / 40
>>
>> The default ServerLimit value is 16. To increase it, you must also raise
>> MaxRequestWorkers using the following formula: ServerLimit value x 25 =
>> MaxRequestWorkers value. For example, if ServerLimit is set to 20, then
>> MaxRequestWorkers will be 20 x 25 = 500.
>> =>
>> 75 x 25 = 1500
>>
>>
>>
>> The hardware includes 64GB of memory, AMD Ryzen 7 PRO 3700 8-Core
>> Processor and NVME disks.
>>
>> I'm using Apache 2.4.41 with event MPM on ubuntu 20.04 ...
>>
>> Server version: Apache/2.4.41 (Ubuntu)
>> Server built:   2022-01-05T14:49:56
>> Server's Module Magic Number: 20120211:88
>> Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
>> Compiled using: APR 1.6.5, APR-UTIL 1.6.1
>> Architecture:   64-bit
>> Server MPM: event
>>   threaded: yes (fixed thread count)
>> forked: yes (variable process count)
>> Server compiled with
>>  -D APR_HAS_SENDFILE
>>  -D APR_HAS_MMAP
>>  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
>>  -D APR_USE_SYSVSEM_SERIALIZE
>>  -D APR_USE_PTHREAD_SERIALIZE
>>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>>  -D APR_HAS_OTHER_CHILD
>>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>>  -D DYNAMIC_MODULE_LIMIT=256
>>  -D HTTPD_ROOT="/etc/apache2"
>>  -D SUEXEC_BIN="/usr/lib/apache2/suexec"
>>  -D DEFAULT_PIDLOG="/var/run/apache2.pid"
>>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>>  -D DEFAULT_ERRORLOG="logs/error_log"
>>  -D AP_TYPES_CONFIG_FILE="mime.types"
>>  -D SERVER_CONFIG_FILE="apache2.conf"
>>
>> And this loaded Modules...
>>  core_module (static)
>>  so_module (static)
>>  watchdog_module (static)
>>  http_module (static)
>>  log_config_module (static)
>>  logio_module (static)
>>  version_module (static)
>>  unixd_module (static)
>>  access_compat_module (shared)
>>  aclr_module (shared)
>>  actions_module (shared)
>>  alias_module (shared)
>>  auth_basic_module (shared)
>>  authn_core_module (shared)
>>  authn_file_module (shared)
>>  authz_core_module (shared)
>>  authz_host_module (shared)
>>  authz_user_module (shared)
>>  autoindex_module (shared)
>>  cgid_module (shared)
>>  deflate_module (shared)
>>  dir_module (shared)
>>  env_module (shared)
>>  fcgid_module (shared)
>>  filter_module (shared)
>>  headers_module (shared)
>>  include_module (shared)
>>  mime_module (shared)
>>  mpm_event_module (shared)
>>  negotiation_module (shared)
>>  proxy_module (shared)
>>  proxy_fcgi_module (shared)
>>  proxy_http_module (shared)
>>  proxy_wstunnel_module (shared)
>>  remoteip_module (shared)
>>  reqtimeout_module (shared)
>>  rewrite_module (shared)
>>  setenvif_module (shared)
>>  socache_shmcb_module (shared)
>>  ssl_module (shared)
>>  status_module (shared)
>>  suexec_module (shared)
>>  unique_id_module (shared)
>>  userdir_module (shared)
>>
>>
>> Thank's for your time.
>>
>>
>
> --
> Marc Serra
> Organització i Sistemes
>
>
>  Manxa 1876, S.L.
> Ctra. Les Tries, 85.17800 Olot (Girona)
> *Tel. 972 27 45 30 www.manxa.com *
>  *Manxa Industrial
> *
>  *Manxa Ferros *
>  *Manxa Ferreteria i Parament de la Llar
> *
>
> El contingut d’aquest correu electrònic i els seus annexos és estrictament
> confidencial. En el cas que no siguis el destinatari i hagis rebut aquest
> missatge per error, preguem que ho comuniquis al remitent i procedeixis a
> la seva eliminació, sense difondre, emmagatzemar o copiar el seu contingut.
> I

[users@httpd] Re: Are this option

2022-03-16 Thread Marc Serra
I'm sorry to insist ... if this list is not the right place to ask that
question, could anyone tell me where to do it?

Thank's

Missatge de Marc Serra  del dia dc., 9 de març 2022 a les
18:01:

> Hi, I want to configure an apache server to support a high load site. Are
> these settings correct?
>
> /etc/apache2/mods-enabled/mpm_event.conf
>
> 
> StartServers 2
> MinSpareThreads  75
> MaxSpareThreads  250
> ThreadLimit  64
> ThreadsPerChild  25
> MaxRequestWorkers 1500
> MaxConnectionsPerChild   0
> ServerLimit 75
> 
>
> I used a combination of
> https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html and
> https://support.plesk.com/hc/en-us/articles/214529205-Apache-keeps-going-down-on-a-Plesk-server-server-reached-MaxRequestWorkers-setting
> ...
>
> MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) /
> average Apache process size
> =>
> 1500 = (64000 - 6) / 40
>
> The default ServerLimit value is 16. To increase it, you must also raise
> MaxRequestWorkers using the following formula: ServerLimit value x 25 =
> MaxRequestWorkers value. For example, if ServerLimit is set to 20, then
> MaxRequestWorkers will be 20 x 25 = 500.
> =>
> 75 x 25 = 1500
>
>
>
> The hardware includes 64GB of memory, AMD Ryzen 7 PRO 3700 8-Core
> Processor and NVME disks.
>
> I'm using Apache 2.4.41 with event MPM on ubuntu 20.04 ...
>
> Server version: Apache/2.4.41 (Ubuntu)
> Server built:   2022-01-05T14:49:56
> Server's Module Magic Number: 20120211:88
> Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
> Compiled using: APR 1.6.5, APR-UTIL 1.6.1
> Architecture:   64-bit
> Server MPM: event
>   threaded: yes (fixed thread count)
> forked: yes (variable process count)
> Server compiled with
>  -D APR_HAS_SENDFILE
>  -D APR_HAS_MMAP
>  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
>  -D APR_USE_SYSVSEM_SERIALIZE
>  -D APR_USE_PTHREAD_SERIALIZE
>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>  -D APR_HAS_OTHER_CHILD
>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>  -D DYNAMIC_MODULE_LIMIT=256
>  -D HTTPD_ROOT="/etc/apache2"
>  -D SUEXEC_BIN="/usr/lib/apache2/suexec"
>  -D DEFAULT_PIDLOG="/var/run/apache2.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_ERRORLOG="logs/error_log"
>  -D AP_TYPES_CONFIG_FILE="mime.types"
>  -D SERVER_CONFIG_FILE="apache2.conf"
>
> And this loaded Modules...
>  core_module (static)
>  so_module (static)
>  watchdog_module (static)
>  http_module (static)
>  log_config_module (static)
>  logio_module (static)
>  version_module (static)
>  unixd_module (static)
>  access_compat_module (shared)
>  aclr_module (shared)
>  actions_module (shared)
>  alias_module (shared)
>  auth_basic_module (shared)
>  authn_core_module (shared)
>  authn_file_module (shared)
>  authz_core_module (shared)
>  authz_host_module (shared)
>  authz_user_module (shared)
>  autoindex_module (shared)
>  cgid_module (shared)
>  deflate_module (shared)
>  dir_module (shared)
>  env_module (shared)
>  fcgid_module (shared)
>  filter_module (shared)
>  headers_module (shared)
>  include_module (shared)
>  mime_module (shared)
>  mpm_event_module (shared)
>  negotiation_module (shared)
>  proxy_module (shared)
>  proxy_fcgi_module (shared)
>  proxy_http_module (shared)
>  proxy_wstunnel_module (shared)
>  remoteip_module (shared)
>  reqtimeout_module (shared)
>  rewrite_module (shared)
>  setenvif_module (shared)
>  socache_shmcb_module (shared)
>  ssl_module (shared)
>  status_module (shared)
>  suexec_module (shared)
>  unique_id_module (shared)
>  userdir_module (shared)
>
>
> Thank's for your time.
>
>

-- 
Marc Serra
Organització i Sistemes

-- 


   
  
  
  
 Manxa 1876, S.L.
Ctra. Les 
Tries, 85.17800 Olot (Girona)
*Tel. 972 27 45 30 www.manxa.com 
* 
  *Manxa 
Industrial *
 
  *Manxa Ferros *
   *Manxa Ferreteria i Parament de la Llar 
*
  

  



-- 


El contingut d’aquest correu electrònic i els seus annexos és 
estrictament confidencial. En el cas que no siguis el destinatari i hagis 
rebut aquest missatge per error, preguem que ho comuniquis al remitent i 
procedeixis a la seva eliminació, sense difondre, emmagatzemar o copiar el 
seu contingut. Imprimeix aquest correu només si és necessari.

El contenido 
de este correo electrónico y sus anexos es estrictamente confidencial. En 
el caso de que no seas el destinatario y hayas recibido este mensaje por 
error, rogamos lo comuniques al remitente y procedas a su eliminación, sin 
difundir, almacenar o copiar su contenido. Imprimir este correo solo si es 
necesario.

The content of this email and its attachments is strictly 
confidential. If you are not the rec