h2c benchmarks with same Ubuntu tune as before

2022-08-29 Thread joe
h2load -n 10 -c 1000 -m 100 http://localhost/perl-script/enquiry.pl

starting benchmark...

spawning thread #0: 1000 total client(s). 10 total requests

Application protocol: h2c

progress: 10% done

progress: 20% done

progress: 30% done

progress: 40% done

progress: 50% done

progress: 60% done

progress: 70% done

progress: 80% done

progress: 90% done

progress: 100% done

 

finished in 11.60s, 8624.38 req/s, 11.13MB/s

requests: 10 total, 10 started, 10 done, 10 succeeded, 0 
failed, 0 errored, 0 timeout

status codes: 10 2xx, 0 3xx, 0 4xx, 0 5xx

traffic: 129.04MB (135312547) total, 560.93KB (574391) headers (space savings 
95.51%), 126.74MB (13290) data min max 
mean sd+/- sd

time for request:   225.73ms  11.31s   5.76s   3.09s58.62%

time for connect:15.40ms212.74ms 62.57ms 54.73ms87.50%

time to 1st byte:   261.01ms   9.04s   3.00s   2.01s68.00%

req/s   :   8.70   68.06   15.649.7385.70%

 

 


openpgp-digital-signature.asc
Description: PGP signature


Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
Forgive me for the pent up frustration of having our wonderful mod_perl
project being completely ignored and abandoned by the Perl Steering
Committee's frivolous lingustic interests over the years since the Parrot
announcement.
SaywerX gave us a reason to be hopeful again.  Let's see what they do with
it.

On Mon, Aug 29, 2022 at 1:34 PM Joe Schaefer  wrote:

> If the Perl steering committee had any brains left it would have
> capitalized on the perl 5.34 release and Co announced modperl2 ithread
> compatibility now available with Perl7’s new release.
>
> Instead they are going to kick the tires on the defaults for strictures
> and warnings until nobody cares any more.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 1:17:17 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> The only reason I’ve been vacillating about glibc/malloc thread safety is
> because I couldn’t fathom the fact that people still believed modperl isn’t
> compatible with mpm_event at this point in the Perl7 storyline.  The old
> segfaults of the past that happened in glibc malloc were because Perl was
> corrupting the heap in some other part of the codebase, and there’s no
> simple way to track it down without a tool like Valgrind, but we weren’t
> successful with that effort either.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 1:08:00 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> Religiously avoid setting up per request ithread environment variables.
> Just use PerlSetEnv in your Webserver config. Everything we did in modperl
> to support CGI scripts is a train wreck.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 1:04:03 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> Look into reducing the scope of your interpreters down from the request
> level to the handler level.  If all you are doing is running registry
> scripts, you will get even better scaling out of just a few ithreads per
> worker process.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 12:57:14 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> The only impact to your work with modperl is that you will need to assess
> the ithread-safety of your dependent XS-based modules.  For example, use a
> JSON::XS thread safe alternative- there are several.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 12:49:22 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> There is a mountain of awful advice floating around about ithreads,
> including pretty much everything going on in Raku around adopting the
> node.js model instead. It is safe to ignore all that now that SawyerX spit
> polished all of the perl5 internals.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Monday, August 29, 2022 12:40:43 PM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> Many of the performance hacks we’ve encouraged over the years, eg around
> HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you
> send flush buckets down the output filter stack yourself, the “response
> handler” phase exits long before the “connection handler” starts making non
> blocking socket system calls.  So you need an order of magnitude fewer
> ithreads than you do prefork children in a multitier arch.
>
> Get Outlook for iOS 
> --
> *From:* Joe Schaefer 
> *Sent:* Sunday, August 28, 2022 11:09:14 AM
> *To:* mod_perl list 
> *Subject:* Re: sealed.pm v4.0.0 is out
>
> Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so
> 16vCPU) and Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost
> all of the CPU was in userland (not system calls).
>
> On Sat, Aug 27, 2022 at 11:42 AM  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 

Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
If the Perl steering committee had any brains left it would have capitalized on 
the perl 5.34 release and Co announced modperl2 ithread compatibility now 
available with Perl7’s new release.

Instead they are going to kick the tires on the defaults for strictures and 
warnings until nobody cares any more.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:17:17 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

The only reason I’ve been vacillating about glibc/malloc thread safety is 
because I couldn’t fathom the fact that people still believed modperl isn’t 
compatible with mpm_event at this point in the Perl7 storyline.  The old 
segfaults of the past that happened in glibc malloc were because Perl was 
corrupting the heap in some other part of the codebase, and there’s no simple 
way to track it down without a tool like Valgrind, but we weren’t successful 
with that effort either.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:08:00 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Religiously avoid setting up per request ithread environment variables. Just 
use PerlSetEnv in your Webserver config. Everything we did in modperl to 
support CGI scripts is a train wreck.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:04:03 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Look into reducing the scope of your interpreters down from the request level 
to the handler level.  If all you are doing is running registry scripts, you 
will get even better scaling out of just a few ithreads per worker process.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:57:14 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

The only impact to your work with modperl is that you will need to assess the 
ithread-safety of your dependent XS-based modules.  For example, use a JSON::XS 
thread safe alternative- there are several.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:49:22 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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, 

Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
The only reason I’ve been vacillating about glibc/malloc thread safety is 
because I couldn’t fathom the fact that people still believed modperl isn’t 
compatible with mpm_event at this point in the Perl7 storyline.  The old 
segfaults of the past that happened in glibc malloc were because Perl was 
corrupting the heap in some other part of the codebase, and there’s no simple 
way to track it down without a tool like Valgrind, but we weren’t successful 
with that effort either.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:08:00 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Religiously avoid setting up per request ithread environment variables. Just 
use PerlSetEnv in your Webserver config. Everything we did in modperl to 
support CGI scripts is a train wreck.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:04:03 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Look into reducing the scope of your interpreters down from the request level 
to the handler level.  If all you are doing is running registry scripts, you 
will get even better scaling out of just a few ithreads per worker process.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:57:14 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

The only impact to your work with modperl is that you will need to assess the 
ithread-safety of your dependent XS-based modules.  For example, use a JSON::XS 
thread safe alternative- there are several.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:49:22 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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




Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
Religiously avoid setting up per request ithread environment variables. Just 
use PerlSetEnv in your Webserver config. Everything we did in modperl to 
support CGI scripts is a train wreck.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 1:04:03 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Look into reducing the scope of your interpreters down from the request level 
to the handler level.  If all you are doing is running registry scripts, you 
will get even better scaling out of just a few ithreads per worker process.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:57:14 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

The only impact to your work with modperl is that you will need to assess the 
ithread-safety of your dependent XS-based modules.  For example, use a JSON::XS 
thread safe alternative- there are several.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:49:22 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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 

Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
Look into reducing the scope of your interpreters down from the request level 
to the handler level.  If all you are doing is running registry scripts, you 
will get even better scaling out of just a few ithreads per worker process.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:57:14 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

The only impact to your work with modperl is that you will need to assess the 
ithread-safety of your dependent XS-based modules.  For example, use a JSON::XS 
thread safe alternative- there are several.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:49:22 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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 

Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
The only impact to your work with modperl is that you will need to assess the 
ithread-safety of your dependent XS-based modules.  For example, use a JSON::XS 
thread safe alternative- there are several.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:49:22 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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 

Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
There is a mountain of awful advice floating around about ithreads, including 
pretty much everything going on in Raku around adopting the node.js model 
instead. It is safe to ignore all that now that SawyerX spit polished all of 
the perl5 internals.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Monday, August 29, 2022 12:40:43 PM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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


Re: sealed.pm v4.0.0 is out

2022-08-29 Thread Joe Schaefer
Many of the performance hacks we’ve encouraged over the years, eg around 
HTTPD’s lingering close effect, are obsoleted with ithreads.  Unless you send 
flush buckets down the output filter stack yourself, the “response handler” 
phase exits long before the “connection handler” starts making non blocking 
socket system calls.  So you need an order of magnitude fewer ithreads than you 
do prefork children in a multitier arch.

Get Outlook for iOS

From: Joe Schaefer 
Sent: Sunday, August 28, 2022 11:09:14 AM
To: mod_perl list 
Subject: Re: sealed.pm v4.0.0 is out

Benchmark ran on my 2021 Dell Precision Laptop w/  8 cores + HT (so 16vCPU) and 
Ubuntu 22.04 inside WSL2.  Never topped 50% avg CPU, and almost all of the CPU 
was in userland (not system calls).

On Sat, Aug 27, 2022 at 11:42 AM 
mailto: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


--
Joe Schaefer, Ph.D.
[https://ci3.googleusercontent.com/mail-sig/AIorK4xJ9wGYA7VWN-zW0DcpKll4IC6JxLGTMmDkmdn4h4eHliQhOGGu1nAHJcSkYVnw1jXF8E--UGA]
We only build what you need built.
mailto:j...@sunstarsys.com>>
954.253.3732