-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
So a <600MB total RSS footprint for the entire show, and I can stably
sustain 1000 concurrent ModPerl::Registry requests, in a few milliseconds
per request.
Good luck doing anything this efficiently with a multi-tiered dynamic
content delivery regime. The real tuning effort is to balance mpm_event
threads (100 - 1000x)
and ithreads.
- --
Joe Schaefer, Ph.D.
We only build what you need built.
954.253.3732
On 2022-08-27 at 15:42, j...@sunstarsys.com wrote:
> See https://sunstarsys.com/essays/perl7-sealed-lexicals. For the full
effect, you will need to build B::Generate with this patched version
instead: https://github.com/SunStarSys/cms/blob/master/Generate.xs
>
> Sample mod_perl config + benchmarks:
>
>
> StartServers 2
> MinSpareThreads100
> MaxSpareThreads500
> ThreadLimit 1000
> ThreadsPerChild100
> MaxRequestWorkers 100
> MaxConnectionsPerChild 0
>
>
>
> PerlSwitches -T -I/home/joesuf4/src/cms/lib
> PerlInterpStart 2
> PerlInterpMax 4
> PerlInterpMinSpare 1
> PerlInterpMaxSpare 4
> PerlInterpMaxRequests 100
> PerlOptions +GlobalRequest
>
>
> Require all granted
> AddHandler perl-script .pl
> PerlResponseHandler ModPerl::Registry
> Options +ExecCGI
>
>
>
> Require all granted
>
>
>
> ServerName localhost
> DocumentRoot /home/joesuf4/src/trunk/content
> Alias /perl-script /home/joesuf4/src/cms
>
>
>
>
>
> ab -n 1 -c 1000 http://localhost/perl-script/enquiry.pl
> This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
> Benchmarking localhost (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/2.4.52
> Server Hostname:localhost
> Server Port:80
>
> Document Path: /perl-script/enquiry.pl
> Document Length:1329 bytes
>
> Concurrency Level: 1000
> Time taken for tests: 1.218 seconds
> Complete requests: 1
> Failed requests:0
> Total transferred: 1501 bytes
> HTML transferred: 1329 bytes
> Requests per second:8207.94 [#/sec] (mean)
> Time per request: 121.833 [ms] (mean)
> Time per request: 0.122 [ms] (mean, across all concurrent requests)
> Transfer rate: 12031.37 [Kbytes/sec] received
>
> Connection Times (ms)
> min mean[+/-sd] median max
> Connect:02 6.2 0 24
> Processing: 4 93 49.6 82 458
> Waiting:1 80 44.5 71 455
> Total: 17 95 49.5 84 458
>
> Percentage of the requests served within a certain time (ms)
> 50% 84
> 66%100
> 75%112
> 80%120
> 90%147
> 95%173
> 98%233
> 99%318
> 100%458 (longest request)
>
> % pgrep -f apache2 | xargs -n1 ps -uwww
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> root 442827 0.0 0.1 18180 14244 ?Ss 11:27 0:00
/usr/sbin/apache2 -k start
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> www-data 446387 1.7 1.5 7549352 129692 ? Sl 11:28 0:12
/usr/sbin/apache2 -k start
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> www-data 451006 15.2 1.5 7483708 128468 ? Sl 11:39 0:10
/usr/sbin/apache2 -k start
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> www-data 451317 11.7 1.4 7483772 119836 ? Sl 11:39 0:07
/usr/sbin/apache2 -k start
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> www-data 451629 6.4 1.3 7483804 113012 ? Sl 11:39 0:03
/usr/sbin/apache2 -k start
> USER PID %CPU %MEMVSZ RSS TTY STAT START TIME
COMMAND
> www-data 451929 1.1 1.4 7483816 116668 ? Sl 11:39 0:00
/usr/sbin/apache2 -k start
-BEGIN PGP SIGNATURE-
Version: FlowCrypt Email Encryption 8.3.3
Comment: Seamlessly send and receive encrypted email
wsFzBAEBCgAGBQJjCkWOACEJEEAg7C7WAdUZFiEEf+9TuFcgikzfTrs6QCDs
LtYB1RkFAw//ceUc4RCiyAE4/NiLHh7/RFihyIEBm4LIi+JOF7y61mzWmjj2
oFguaOACfG5zsF3TftGeJXmYtP9tTE9e4NC4TJJ0ciwD9Z22lpx1+3WM6Vwg
gjnlYpm+HtElgvXB34DFj7k6ahNvbwT0NZxCa9R4Cx+x3mfe/43THDTqRHF7
H3QDqgsyEZingtBOL6uuViW82tR6f/Vl6tOf+3OQqCqsPHSr6UPzUorcB2wy
uL7YJKKqxERi6hrZEPM2scQsKvkAc7CTuuxXG7J2nWL+FM+A/+nPYMUWR10b
rJJcj0W+iHjcx0bmoIQJJdNOFkQn0hydprTdhH0caLN879OxX3pJI8jzjOxb
A5btacCuXbPwHrNMxb4bmvPrDHTQj8Sw5B6ylOIR