public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin Perl has slowed in recent months
@ 2022-05-18  1:53 David Christensen
  2022-05-21 17:55 ` Hans-Bernhard Bröker
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: David Christensen @ 2022-05-18  1:53 UTC (permalink / raw)
  To: cygwin

cygwin:

I have a computer:

2022-05-17 18:46:12 dpchrist@dht4s3r1 ~/src/perl/Dpchrist-Perl
$ systeminfo | egrep '^OS (Name|Version)' ; uname -a ; cygcheck -c cygwin
OS Name:                   Microsoft Windows 7 Professional
OS Version:                6.1.7601 Service Pack 1 Build 7601
CYGWIN_NT-6.1 dht4s3r1 3.3.5(0.341/5/3) 2022-05-13 12:27 x86_64 Cygwin
Cygwin Package Information
Package              Version        Status
cygwin               3.3.5-1        OK


I am working on a Perl module that runs on various Unix-like platforms. 
When I 'make test' on similar computers:

FreeBSD 12.3-RELEASE		 28 wallclock secs
Debian GNU/Linux 11.3	 	 31 wallclock secs
macOS 11.6.2		 	 36 wallclock secs
Windows 7 / Cygwin 3.3.5-1	509 wallclock secs


A few months ago, I seem to recall that Cygwin was about 4 times slower. 
  Now it is over 14 times slower.


Is this expected?  If not, how do I find the bottleneck?


TIA,

David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-18  1:53 Cygwin Perl has slowed in recent months David Christensen
@ 2022-05-21 17:55 ` Hans-Bernhard Bröker
  2022-05-22 19:11   ` David Christensen
  2022-05-24 18:57 ` Achim Gratz
  2022-05-25  6:36 ` David Christensen
  2 siblings, 1 reply; 15+ messages in thread
From: Hans-Bernhard Bröker @ 2022-05-21 17:55 UTC (permalink / raw)
  To: cygwin

Am 18.05.2022 um 03:53 schrieb David Christensen:

 > I am working on a Perl module that runs on various Unix-like platforms.
 > When I 'make test' on similar computers:
 >
 > FreeBSD 12.3-RELEASE         28 wallclock secs
 > Debian GNU/Linux 11.3          31 wallclock secs
 > macOS 11.6.2              36 wallclock secs
 > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs

Given the complete lack of information about what that Perl module of 
yours might be doing, that's hard to have a meaningful discussion about.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-21 17:55 ` Hans-Bernhard Bröker
@ 2022-05-22 19:11   ` David Christensen
  2022-05-23 18:47     ` Lee
  0 siblings, 1 reply; 15+ messages in thread
From: David Christensen @ 2022-05-22 19:11 UTC (permalink / raw)
  To: cygwin

On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
> Am 18.05.2022 um 03:53 schrieb David Christensen:
> 
>  > I am working on a Perl module that runs on various Unix-like platforms.
>  > When I 'make test' on similar computers:
>  >
>  > FreeBSD 12.3-RELEASE         28 wallclock secs
>  > Debian GNU/Linux 11.3          31 wallclock secs
>  > macOS 11.6.2              36 wallclock secs
>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
> 
> Given the complete lack of information about what that Perl module of 
> yours might be doing, that's hard to have a meaningful discussion about.


Thank you for the response.  I was hoping there was a known issue. 
Apparently, not.


The above module is proprietary, so I thought I would profile some 
similar CPAN modules to generate discussion information:

2022-05-22 01:25:39 dpchrist@dht4s3r1 ~
$ systeminfo | egrep '^OS (Name|Version)' ; uname -a ; cygcheck -c cygwin
OS Name:                   Microsoft Windows 7 Professional
OS Version:                6.1.7601 Service Pack 1 Build 7601
CYGWIN_NT-6.1-7601 dht4s3r1 3.3.5-341.x86_64 2022-05-13 12:27 UTC x86_64 
Cygwin
Cygwin Package Information
Package              Version        Status
cygwin               3.3.5-1        OK

2022-05-22 01:26:45 dpchrist@dht4s3r1 ~
$ cpan install Devel::NYTProf
<snip>
t/50-errno.t ............. 1/8
#   Failed test '$! should not be altered by NYTProf i/o'
#   at t/50-errno.t line 58.
#          got: '0'
#     expected: '3'
# Looks like you failed 1 test of 8.
t/50-errno.t ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
<snip>
Test Summary Report
-------------------
t/50-errno.t           (Wstat: 256 Tests: 8 Failed: 1)
   Failed test:  6
   Non-zero exit status: 1
Files=55, Tests=4736, 570 wallclock secs ( 0.64 usr  1.06 sys + 104.19 
cusr 403.73 csys = 509.62 CPU)
Result: FAIL
Failed 1/55 test programs. 1/4736 subtests failed.
make: *** [Makefile:1284: test_dynamic] Error 255
   JKEENAN/Devel-NYTProf-6.11.tar.gz
   /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
   reports JKEENAN/Devel-NYTProf-6.11.tar.gz


STFW:

https://github.com/Perl/perl5/issues/12389


Any suggestions?

David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-22 19:11   ` David Christensen
@ 2022-05-23 18:47     ` Lee
  2022-05-23 21:22       ` David Christensen
  2022-05-24  8:25       ` Csaba Raduly
  0 siblings, 2 replies; 15+ messages in thread
From: Lee @ 2022-05-23 18:47 UTC (permalink / raw)
  To: David Christensen; +Cc: cygwin

On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>>
>>  > I am working on a Perl module that runs on various Unix-like platforms.
>>  > When I 'make test' on similar computers:
>>  >
>>  > FreeBSD 12.3-RELEASE         28 wallclock secs
>>  > Debian GNU/Linux 11.3          31 wallclock secs
>>  > macOS 11.6.2              36 wallclock secs
>>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
>>
>> Given the complete lack of information about what that Perl module of
>> yours might be doing, that's hard to have a meaningful discussion about.
>
>
> Thank you for the response.  I was hoping there was a known issue.
> Apparently, not.

What I consider a well known issue is that process start up time is
_very_ slow.  If your  'make test' starts lots of processes that could
be a problem.

Another huge slowdown is Windows Defender.  Try turning that off and
seeing how long your 'make test' takes then.

Regards,
Lee

>
> The above module is proprietary, so I thought I would profile some
> similar CPAN modules to generate discussion information:
>
> 2022-05-22 01:25:39 dpchrist@dht4s3r1 ~
> $ systeminfo | egrep '^OS (Name|Version)' ; uname -a ; cygcheck -c cygwin
> OS Name:                   Microsoft Windows 7 Professional
> OS Version:                6.1.7601 Service Pack 1 Build 7601
> CYGWIN_NT-6.1-7601 dht4s3r1 3.3.5-341.x86_64 2022-05-13 12:27 UTC x86_64
> Cygwin
> Cygwin Package Information
> Package              Version        Status
> cygwin               3.3.5-1        OK
>
> 2022-05-22 01:26:45 dpchrist@dht4s3r1 ~
> $ cpan install Devel::NYTProf
> <snip>
> t/50-errno.t ............. 1/8
> #   Failed test '$! should not be altered by NYTProf i/o'
> #   at t/50-errno.t line 58.
> #          got: '0'
> #     expected: '3'
> # Looks like you failed 1 test of 8.
> t/50-errno.t ............. Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/8 subtests
> <snip>
> Test Summary Report
> -------------------
> t/50-errno.t           (Wstat: 256 Tests: 8 Failed: 1)
>    Failed test:  6
>    Non-zero exit status: 1
> Files=55, Tests=4736, 570 wallclock secs ( 0.64 usr  1.06 sys + 104.19
> cusr 403.73 csys = 509.62 CPU)
> Result: FAIL
> Failed 1/55 test programs. 1/4736 subtests failed.
> make: *** [Makefile:1284: test_dynamic] Error 255
>    JKEENAN/Devel-NYTProf-6.11.tar.gz
>    /usr/bin/make test -- NOT OK
> //hint// to see the cpan-testers results for installing this module, try:
>    reports JKEENAN/Devel-NYTProf-6.11.tar.gz
>
>
> STFW:
>
> https://github.com/Perl/perl5/issues/12389
>
>
> Any suggestions?
>
> David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-23 18:47     ` Lee
@ 2022-05-23 21:22       ` David Christensen
  2022-05-24  8:25       ` Csaba Raduly
  1 sibling, 0 replies; 15+ messages in thread
From: David Christensen @ 2022-05-23 21:22 UTC (permalink / raw)
  To: cygwin

On 5/23/22 11:47, Lee wrote:
> On 5/22/22, David Christensen wrote:
>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>>>
>>>   > I am working on a Perl module that runs on various Unix-like platforms.
>>>   > When I 'make test' on similar computers:
>>>   >
>>>   > FreeBSD 12.3-RELEASE         28 wallclock secs
>>>   > Debian GNU/Linux 11.3          31 wallclock secs
>>>   > macOS 11.6.2              36 wallclock secs
>>>   > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs

>> I was hoping there was a known issue.

> What I consider a well known issue is that process start up time is
> _very_ slow.  If your  'make test' starts lots of processes that could
> be a problem.


[Replying to off-list message.]


Thank you for the reply.


'make test' starts a large number of processes -- perhaps a thousand.


> Another huge slowdown is Windows Defender.  Try turning that off and
> seeing how long your 'make test' takes then.


Of all the test scripts, 02-compile.t consumes the most time on all 
platforms.


Using 02-compile.t as a benchmark, here is the compile time with Windows 
Defender enabled:

$ time perl -Ilib t/02-compile.t
<snip>
real    2m1.404s
user    3m20.490s
sys     4m24.476s


Here is the compile time with Windows Defender disabled:

$ time perl -Ilib t/02-compile.t
<snip>
real    1m56.606s
user    3m14.374s
sys     4m20.106s


Both of the above tests were run in Cygwin64 Terminal.  Using Debian and 
SSH:

$ time perl -Ilib t/02-compile.t
<snip>
real	1m18.733s
user	2m32.187s
sys	2m29.652s


So, Cygwin64 Terminal is also a problem.


In all cases, Resource Monitor indicates the script is CPU bound.


David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-23 18:47     ` Lee
  2022-05-23 21:22       ` David Christensen
@ 2022-05-24  8:25       ` Csaba Raduly
  2022-05-24  8:47         ` Sam Edge
  1 sibling, 1 reply; 15+ messages in thread
From: Csaba Raduly @ 2022-05-24  8:25 UTC (permalink / raw)
  To: Lee; +Cc: David Christensen, cygwin list

On Mon, 23 May 2022 at 20:47, Lee  wrote:
>
> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
> > On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
> >> Am 18.05.2022 um 03:53 schrieb David Christensen:
> >>
> >>  > I am working on a Perl module that runs on various Unix-like platforms.
> >>  > When I 'make test' on similar computers:
> >>  >
> >>  > FreeBSD 12.3-RELEASE         28 wallclock secs
> >>  > Debian GNU/Linux 11.3          31 wallclock secs
> >>  > macOS 11.6.2              36 wallclock secs
> >>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
> >>
> >> Given the complete lack of information about what that Perl module of
> >> yours might be doing, that's hard to have a meaningful discussion about.
> >
> >
> > Thank you for the response.  I was hoping there was a known issue.
> > Apparently, not.
>
> What I consider a well known issue is that process start up time is
> _very_ slow.  If your  'make test' starts lots of processes that could
> be a problem.
>

While Cygwin''s fork emulation is indeed  slow (I once measured 1000:1
between Cygwin and Linux  * ),
"make test" likely started roughly the same number of processes "then"
as it does  "now".
In  which case the increase in the run time could be attributed to Cygwin.

*  "The marvel is not that the bear dances  well,  but that the bear
dances at all"  - Russian proverb
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-24  8:25       ` Csaba Raduly
@ 2022-05-24  8:47         ` Sam Edge
  2022-05-24 15:03           ` David Christensen
  0 siblings, 1 reply; 15+ messages in thread
From: Sam Edge @ 2022-05-24  8:47 UTC (permalink / raw)
  To: cygwin

On 24/05/2022 09:25, Csaba Raduly wrote:
 > On Mon, 23 May 2022 at 20:47, Lee  wrote:
 >>
 >> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
 >>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
 >>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
 >>>>
 >>>>  > I am working on a Perl module that runs on various Unix-like
platforms.
 >>>>  > When I 'make test' on similar computers:
 >>>>  >
 >>>>  > FreeBSD 12.3-RELEASE         28 wallclock secs
 >>>>  > Debian GNU/Linux 11.3          31 wallclock secs
 >>>>  > macOS 11.6.2              36 wallclock secs
 >>>>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
 >>>>
 >>>> Given the complete lack of information about what that Perl module of
 >>>> yours might be doing, that's hard to have a meaningful discussion
about.
 >>>
 >>>
 >>> Thank you for the response.  I was hoping there was a known issue.
 >>> Apparently, not.
 >>
 >> What I consider a well known issue is that process start up time is
 >> _very_ slow.  If your  'make test' starts lots of processes that could
 >> be a problem.
 >>
 >
 > While Cygwin''s fork emulation is indeed  slow (I once measured 1000:1
 > between Cygwin and Linux  * ),
 > "make test" likely started roughly the same number of processes "then"
 > as it does  "now".
 > In  which case the increase in the run time could be attributed to
Cygwin.

Indeed.

But perhaps what the Cygwin core and/or Cygwin Perl maintainers need is a
simple test case Perl script that can be shown to be much slower on the
current
releases than it was on a named earlier pair of releases. And maybe some
testing by the original poster to see if it is the Cygwin or Perl release
change that causes the issue.

Anecdotal observations do not an issue report make. ;-)

--
Sam Edge


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-24  8:47         ` Sam Edge
@ 2022-05-24 15:03           ` David Christensen
  2022-05-24 15:59             ` Sam Edge
  2022-05-24 19:31             ` Brian Inglis
  0 siblings, 2 replies; 15+ messages in thread
From: David Christensen @ 2022-05-24 15:03 UTC (permalink / raw)
  To: cygwin

On 5/24/22 01:47, Sam Edge wrote:
> On 24/05/2022 09:25, Csaba Raduly wrote:
>  > On Mon, 23 May 2022 at 20:47, Lee  wrote:
>  >>
>  >> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
>  >>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>  >>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>  >>>>
>  >>>>  > I am working on a Perl module that runs on various Unix-like
> platforms.
>  >>>>  > When I 'make test' on similar computers:
>  >>>>  >
>  >>>>  > FreeBSD 12.3-RELEASE         28 wallclock secs
>  >>>>  > Debian GNU/Linux 11.3          31 wallclock secs
>  >>>>  > macOS 11.6.2              36 wallclock secs
>  >>>>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
>  >>>>
>  >>>> Given the complete lack of information about what that Perl module of
>  >>>> yours might be doing, that's hard to have a meaningful discussion
> about.
>  >>>
>  >>>
>  >>> Thank you for the response.  I was hoping there was a known issue.
>  >>> Apparently, not.
>  >>
>  >> What I consider a well known issue is that process start up time is
>  >> _very_ slow.  If your  'make test' starts lots of processes that could
>  >> be a problem.
>  >>
>  >
>  > While Cygwin''s fork emulation is indeed  slow (I once measured 1000:1
>  > between Cygwin and Linux  * ),
>  > "make test" likely started roughly the same number of processes "then"
>  > as it does  "now".
>  > In  which case the increase in the run time could be attributed to
> Cygwin.
> 
> Indeed.
> 
> But perhaps what the Cygwin core and/or Cygwin Perl maintainers need is a
> simple test case Perl script that can be shown to be much slower on the
> current
> releases than it was on a named earlier pair of releases. And maybe some
> testing by the original poster to see if it is the Cygwin or Perl release
> change that causes the issue.
> 
> Anecdotal observations do not an issue report make. ;-)


So, we are discussing running a Perl benchmark for various combinations 
of Cygwin version and/or Cygwin Perl version.  That is an O(n) and/or 
O(n**2) problem.


If multiple benchmarks are considered, increase the O() exponent by one.


If multiple versions of Windows are considered, increase the O() 
exponent by one.


If multiple computers are considered, increase the O() exponent by one.


Does the Cygwin project do any of the above?  If so, how?  Where are the 
test plans and assets?  Where is the raw data?  Where are the reports?


If end users are expected to do the above, please advise:

1.  How to install multiple versions of Cygwin on Windows 7 Professional 
64-bit Service Pack 1 on an x86_64 computer such that each instance of 
Cygwin does not interact with any other instance of Cygwin.

2.  How to install multiple versions of Cygwin Perl on each of many 
Cygwin installations on Windows 7 Professional 64-bit Service Pack 1 on 
an x86_64 computer such that each instance of Cygwin Perl does not 
interact with any other instance of Cygwin Perl or Cygwin.

3.  What is a suitable Perl benchmark?


David

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-24 15:03           ` David Christensen
@ 2022-05-24 15:59             ` Sam Edge
  2022-05-24 17:09               ` David Christensen
  2022-05-24 19:31             ` Brian Inglis
  1 sibling, 1 reply; 15+ messages in thread
From: Sam Edge @ 2022-05-24 15:59 UTC (permalink / raw)
  To: cygwin

On 24/05/2022 16:03, David Christensen wrote:
> On 5/24/22 01:47, Sam Edge wrote:
>> On 24/05/2022 09:25, Csaba Raduly wrote:
>>  > On Mon, 23 May 2022 at 20:47, Lee  wrote:
>>  >>
>>  >> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
>>  >>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>>  >>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>>  >>>>
>>  >>>>  > I am working on a Perl module that runs on various Unix-like
>> platforms.
>>  >>>>  > When I 'make test' on similar computers:
>>  >>>>  >
>>  >>>>  > FreeBSD 12.3-RELEASE         28 wallclock secs
>>  >>>>  > Debian GNU/Linux 11.3          31 wallclock secs
>>  >>>>  > macOS 11.6.2              36 wallclock secs
>>  >>>>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
>>  >>>>
>>  >>>> Given the complete lack of information about what that Perl
>> module of
>>  >>>> yours might be doing, that's hard to have a meaningful discussion
>> about.
>>  >>>
>>  >>>
>>  >>> Thank you for the response.  I was hoping there was a known issue.
>>  >>> Apparently, not.
>>  >>
>>  >> What I consider a well known issue is that process start up time is
>>  >> _very_ slow.  If your  'make test' starts lots of processes that
>> could
>>  >> be a problem.
>>  >>
>>  >
>>  > While Cygwin''s fork emulation is indeed  slow (I once measured
>> 1000:1
>>  > between Cygwin and Linux  * ),
>>  > "make test" likely started roughly the same number of processes
>> "then"
>>  > as it does  "now".
>>  > In  which case the increase in the run time could be attributed to
>> Cygwin.
>>
>> Indeed.
>>
>> But perhaps what the Cygwin core and/or Cygwin Perl maintainers need
>> is a
>> simple test case Perl script that can be shown to be much slower on the
>> current
>> releases than it was on a named earlier pair of releases. And maybe some
>> testing by the original poster to see if it is the Cygwin or Perl
>> release
>> change that causes the issue.
>>
>> Anecdotal observations do not an issue report make. ;-)
>
>
> So, we are discussing running a Perl benchmark for various
> combinations of Cygwin version and/or Cygwin Perl version.  That is an
> O(n) and/or O(n**2) problem.
>
>
> If multiple benchmarks are considered, increase the O() exponent by one.
>
>
> If multiple versions of Windows are considered, increase the O()
> exponent by one.
>
>
> If multiple computers are considered, increase the O() exponent by one.
>
>
> Does the Cygwin project do any of the above?  If so, how?  Where are
> the test plans and assets?  Where is the raw data?  Where are the
> reports?
>
>
> If end users are expected to do the above, please advise:
>
> 1.  How to install multiple versions of Cygwin on Windows 7
> Professional 64-bit Service Pack 1 on an x86_64 computer such that
> each instance of Cygwin does not interact with any other instance of
> Cygwin.
>
> 2.  How to install multiple versions of Cygwin Perl on each of many
> Cygwin installations on Windows 7 Professional 64-bit Service Pack 1
> on an x86_64 computer such that each instance of Cygwin Perl does not
> interact with any other instance of Cygwin Perl or Cygwin.
>
> 3.  What is a suitable Perl benchmark?
>
>
> David
>
The Cygwin core & Perl maintainers do not get paid for their work.

If you believe you have spotted a regression, it's up to you to isolate
at what revision of Perl or of Cygwin core it started to happen. You can
get older revisions of Cygwin & Perl from the Cygwin Time Machine
(GFGI). You can have as many parallel installations of Cygwin and its
packages as you like simply by specifying different install paths when
running the setup program (RTFM).

Like most FOSS, Cygwin & its packages are provided with no warranty.

If they are so vital to your business, you need to be doing regression
testing yourself before upgrading production systems and maintaining
your own Cygwin repo so you have a copy of the production releases.

This is all SOP for using FOSS in a business context, unless you're
willing to pay someone else to do it for you, which is how Red Hat et al
make their money.

--
Sam Edge

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-24 15:59             ` Sam Edge
@ 2022-05-24 17:09               ` David Christensen
  0 siblings, 0 replies; 15+ messages in thread
From: David Christensen @ 2022-05-24 17:09 UTC (permalink / raw)
  To: cygwin

On 5/24/22 08:59, Sam Edge wrote:
> On 24/05/2022 16:03, David Christensen wrote:
>> On 5/24/22 01:47, Sam Edge wrote:
>>> On 24/05/2022 09:25, Csaba Raduly wrote:
>>>  > On Mon, 23 May 2022 at 20:47, Lee  wrote:
>>>  >>
>>>  >> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
>>>  >>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>>>  >>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>>>  >>>>
>>>  >>>>  > I am working on a Perl module that runs on various Unix-like
>>> platforms.
>>>  >>>>  > When I 'make test' on similar computers:
>>>  >>>>  >
>>>  >>>>  > FreeBSD 12.3-RELEASE         28 wallclock secs
>>>  >>>>  > Debian GNU/Linux 11.3          31 wallclock secs
>>>  >>>>  > macOS 11.6.2              36 wallclock secs
>>>  >>>>  > Windows 7 / Cygwin 3.3.5-1    509 wallclock secs
>>>  >>>>
>>>  >>>> Given the complete lack of information about what that Perl
>>> module of
>>>  >>>> yours might be doing, that's hard to have a meaningful discussion
>>> about.
>>>  >>>
>>>  >>>
>>>  >>> Thank you for the response.  I was hoping there was a known issue.
>>>  >>> Apparently, not.
>>>  >>
>>>  >> What I consider a well known issue is that process start up time is
>>>  >> _very_ slow.  If your  'make test' starts lots of processes that
>>> could
>>>  >> be a problem.
>>>  >>
>>>  >
>>>  > While Cygwin''s fork emulation is indeed  slow (I once measured
>>> 1000:1
>>>  > between Cygwin and Linux  * ),
>>>  > "make test" likely started roughly the same number of processes
>>> "then"
>>>  > as it does  "now".
>>>  > In  which case the increase in the run time could be attributed to
>>> Cygwin.
>>>
>>> Indeed.
>>>
>>> But perhaps what the Cygwin core and/or Cygwin Perl maintainers need
>>> is a
>>> simple test case Perl script that can be shown to be much slower on the
>>> current
>>> releases than it was on a named earlier pair of releases. And maybe some
>>> testing by the original poster to see if it is the Cygwin or Perl
>>> release
>>> change that causes the issue.
>>>
>>> Anecdotal observations do not an issue report make. ;-)
>>
>>
>> So, we are discussing running a Perl benchmark for various
>> combinations of Cygwin version and/or Cygwin Perl version.  That is an
>> O(n) and/or O(n**2) problem.
>>
>>
>> If multiple benchmarks are considered, increase the O() exponent by one.
>>
>>
>> If multiple versions of Windows are considered, increase the O()
>> exponent by one.
>>
>>
>> If multiple computers are considered, increase the O() exponent by one.
>>
>>
>> Does the Cygwin project do any of the above?  If so, how?  Where are
>> the test plans and assets?  Where is the raw data?  Where are the
>> reports?
>>
>>
>> If end users are expected to do the above, please advise:
>>
>> 1.  How to install multiple versions of Cygwin on Windows 7
>> Professional 64-bit Service Pack 1 on an x86_64 computer such that
>> each instance of Cygwin does not interact with any other instance of
>> Cygwin.
>>
>> 2.  How to install multiple versions of Cygwin Perl on each of many
>> Cygwin installations on Windows 7 Professional 64-bit Service Pack 1
>> on an x86_64 computer such that each instance of Cygwin Perl does not
>> interact with any other instance of Cygwin Perl or Cygwin.
>>
>> 3.  What is a suitable Perl benchmark?
>>
>>
>> David
>>
> The Cygwin core & Perl maintainers do not get paid for their work.


I do not get paid for working on Cygwin and/or Perl.  But, I have been 
paid for using and programming both.


> If you believe you have spotted a regression, it's up to you to isolate
> at what revision of Perl or of Cygwin core it started to happen. 


If Cygwin provides me with the means; fair enough.


> You can
> get older revisions of Cygwin & Perl from the Cygwin Time Machine
> (GFGI). 


https://html.duckduckgo.com/html?q=site%3Acygwin.org%20cygwin%20time%20machine

https://cygwin.cygwin.narkive.com/cSRkGFjw/time-machine

http://www.fruitbat.org/Cygwin/index.html#cygwincirca

http://www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html


I built a similar hack years ago.


GFGI Programming Systems Product


> You can have as many parallel installations of Cygwin and its
> packages as you like simply by specifying different install paths when
> running the setup program (RTFM).


Section?  Page?


> Like most FOSS, Cygwin & its packages are provided with no warranty.


https://cygwin.org/faq.html#faq.what.free


> If they are so vital to your business, you need to be doing regression
> testing yourself before upgrading production systems 


Have you been spying on me?  ;-)


> and maintaining
> your own Cygwin repo so you have a copy of the production releases.


https://cygwin.org/faq.html#faq.what.version

https://cygwin.org/faq.html#faq.setup.old-versions


I would say "disappointing", but I think you found the answer (below).


> This is all SOP for using FOSS in a business context, 


TIMTOWTDI.


> unless you're
> willing to pay someone else to do it for you, 
> which is how Red Hat et al
> make their money.


I think you have found the answer.


David


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-18  1:53 Cygwin Perl has slowed in recent months David Christensen
  2022-05-21 17:55 ` Hans-Bernhard Bröker
@ 2022-05-24 18:57 ` Achim Gratz
  2022-05-25  6:36 ` David Christensen
  2 siblings, 0 replies; 15+ messages in thread
From: Achim Gratz @ 2022-05-24 18:57 UTC (permalink / raw)
  To: cygwin

David Christensen writes:
> I have a computer:
>
> 2022-05-17 18:46:12 dpchrist@dht4s3r1 ~/src/perl/Dpchrist-Perl
> $ systeminfo | egrep '^OS (Name|Version)' ; uname -a ; cygcheck -c cygwin
> OS Name:                   Microsoft Windows 7 Professional
> OS Version:                6.1.7601 Service Pack 1 Build 7601
> CYGWIN_NT-6.1 dht4s3r1 3.3.5(0.341/5/3) 2022-05-13 12:27 x86_64 Cygwin
> Cygwin Package Information
> Package              Version        Status
> cygwin               3.3.5-1        OK

Nothing of which tells me very much, except that you're using a Windows
version that is out of support.  None of what you show is likely to
explain the problem you're seeing, though.

> I am working on a Perl module that runs on various Unix-like
> platforms. When I 'make test' on similar computers:
>
> FreeBSD 12.3-RELEASE		 28 wallclock secs
> Debian GNU/Linux 11.3	 	 31 wallclock secs
> macOS 11.6.2		 	 36 wallclock secs
> Windows 7 / Cygwin 3.3.5-1	509 wallclock secs

Which again gives no usable information.

> A few months ago, I seem to recall that Cygwin was about 4 times
> slower.   Now it is over 14 times slower.

So what's the difference between the two environments other than "a few
months"?

Cygwin Perl was last updated in August 2021 and there haven't been any
changes in how fast it builds and tests modules that I have been able to
detect since (or even compared to the previous version of Perl).  A
slowdown of at least a factor of three (based on your vague assertion
above) would have been noticed quickly as I compare both the results and
the build/test times for each package build I do.  The build times on
the CI (for the same package across the last two or three years)
independently confirm that observation.  Note that this also rules out a
general slowdown in compilation speed (both gcc and binutils did get
updates in this timeframe).  However, I can not rule out that different
choice of defaults and/or changes in the optimization engines could have
had the effect you're seeing in very specific instances.

> Is this expected?  If not, how do I find the bottleneck?

It seems you're the only one who can provide the information necessary
to make that determination.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-24 15:03           ` David Christensen
  2022-05-24 15:59             ` Sam Edge
@ 2022-05-24 19:31             ` Brian Inglis
  1 sibling, 0 replies; 15+ messages in thread
From: Brian Inglis @ 2022-05-24 19:31 UTC (permalink / raw)
  To: cygwin

On 2022-05-24 09:03, David Christensen wrote:
> On 5/24/22 01:47, Sam Edge wrote:
>> On 24/05/2022 09:25, Csaba Raduly wrote:
>>> On Mon, 23 May 2022 at 20:47, Lee  wrote:
>>>> On 5/22/22, David Christensen <dpchrist@holgerdanske.com> wrote:
>>>>> On 5/21/22 10:55, Hans-Bernhard Bröker wrote:
>>>>>> Am 18.05.2022 um 03:53 schrieb David Christensen:
>>>>>>> I am working on a Perl module that runs on various Unix-like
>>>>>>> platforms.
>>>>>>> When I 'make test' on similar computers:
>>>>>>> FreeBSD 12.3-RELEASE         28 wallclock secs
>>>>>>> Debian GNU/Linux 11.3        31 wallclock secs
>>>>>>> macOS 11.6.2                 36 wallclock secs
>>>>>>> Windows 7 / Cygwin 3.3.5-1  509 wallclock secs

>>>>>> Given the complete lack of information about what that Perl
>>>>>> module of yours might be doing, that's hard to have a
>>>>>> meaningful discussion about.
>>>>> Thank you for the response. I was hoping there was a known
>>>>> issue. Apparently, not.
>>>> What I consider a well known issue is that process start up
>>>> time is _very_ slow.  If your  'make test' starts lots of
>>>> processes that could be a problem.
>>> While Cygwin''s fork emulation is indeed  slow (I once measured
>>> 1000:1 between Cygwin and Linux  * ), "make test" likely started
>>> roughly the same number of processes "then" as it does  "now". In
>>> which case the increase in the run time could be attributed to 
>>> Cygwin.
>> Indeed.
>> But perhaps what the Cygwin core and/or Cygwin Perl maintainers need is a
>> simple test case Perl script that can be shown to be much slower on the
>> current
>> releases than it was on a named earlier pair of releases. And maybe some
>> testing by the original poster to see if it is the Cygwin or Perl release
>> change that causes the issue.
>> Anecdotal observations do not an issue report make. ;-)

Nobody can interpret results where the source is not well known and we 
do not have access to the source.
This project definitely prefers Simple Test Cases.
Please show us your source, or better cut it down to show only the slow 
parts, and demonstrate the slowness, and someone with appropriate 
expertise may be able to help.

> So, we are discussing running a Perl benchmark for various combinations 
> of Cygwin version and/or Cygwin Perl version.  That is an O(n) and/or 
> O(n**2) problem.
> If multiple benchmarks are considered, increase the O() exponent by one.
> If multiple versions of Windows are considered, increase the O() 
> exponent by one.
> If multiple computers are considered, increase the O() exponent by one.
> Does the Cygwin project do any of the above?  If so, how?  Where are the 
> test plans and assets?  Where is the raw data?  Where are the reports?
> If end users are expected to do the above, please advise:
> 1.  How to install multiple versions of Cygwin on Windows 7 Professional 
> 64-bit Service Pack 1 on an x86_64 computer such that each instance of 
> Cygwin does not interact with any other instance of Cygwin.
> 2.  How to install multiple versions of Cygwin Perl on each of many 
> Cygwin installations on Windows 7 Professional 64-bit Service Pack 1 on 
> an x86_64 computer such that each instance of Cygwin Perl does not 
> interact with any other instance of Cygwin Perl or Cygwin.

This project is an all volunteer effort done in contributors' free time.
Users with problems need to do their part in reporting problems: see 
Cygwin sig at bottom for advice on reporting problems, and FAQ answers.

> 3.  What is a suitable Perl benchmark?

A Simple Test Case from your source code is the best diagnostic 
frequently provided by users with uncommon problems often leading to 
satisfactory successful resolutions.

If there are Perl performance, timing, or trace utilities or modules, 
you might want to investigate and test those out, and provide details 
from them here.

Running your program using the strace utility to log the core Cygwin 
activity and timings should give you information to start narrowing down 
any Cygwin bottlenecks e.g.

	$ strace -o perl.strace perl -e ...

and you can attach it to a post for assistance.

Do not neglect checking Windows Task Manager, Resource Monitor, or 
Sysinternals Process Monitor to find system level symptoms and provide 
details from them here.

Pointers from any of the above to specific Perl statements or modules, 
Cygwin core components, or Windows API calls, could be enough to allow 
others to assist you with your current issue.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-18  1:53 Cygwin Perl has slowed in recent months David Christensen
  2022-05-21 17:55 ` Hans-Bernhard Bröker
  2022-05-24 18:57 ` Achim Gratz
@ 2022-05-25  6:36 ` David Christensen
  2022-05-25 15:04   ` gs-cygwin.com
  2 siblings, 1 reply; 15+ messages in thread
From: David Christensen @ 2022-05-25  6:36 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

cygwin:

I went back to the desktop computer that I have been using for Cygwin 
Perl testing:

motherboard:	Intel DQ67SW
processor:	Intel Core i7-2600S
memory:		Corsair CMV8GX3M2A1333C9 2 @ 4 GB
disk:		Intel SSD 520 Series 180 GB
OS Name:	Microsoft Windows 7 Professional
OS Version:	6.1.7601 Service Pack 1 Build 7601


See cygcheck-old.txt in the attached tarball for a listing of Cygwin 
packages installed.


'make test' produced the following result:

99 wallclock secs ( 1.76 usr  0.41 sys + 342.21 cusr 375.40 csys = 
719.78 CPU)


I ran Windows Update, which indicated one optional update was available 
(Windows Defender).  I installed the update.


I ran Cygwin setup-x86_64.exe version 2.918 and upgraded all Cygwin 
packages.  See cygcheck-new.txt in the attached tarball for a listing of 
current Cygwin packages installed.


I ran the cpan(1) shell and upgraded Perl modules:

cpan[1]> upgrade /(.*)/


See cpan-upgrade.txt and current-perl-modules.txt in the attached 
tarball for a listing of Perl modules that were out-of-date and a 
listing of the current Perl modules installed.


'make test' now produces:

211 wallclock secs ( 2.39 usr  2.71 sys + 525.68 cusr 998.78 csys = 
1529.57 CPU)


David

[-- Attachment #2: cygwin-20220524-2330.tar.gz --]
[-- Type: application/gzip, Size: 14603 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-25  6:36 ` David Christensen
@ 2022-05-25 15:04   ` gs-cygwin.com
  2022-05-25 20:06     ` David Christensen
  0 siblings, 1 reply; 15+ messages in thread
From: gs-cygwin.com @ 2022-05-25 15:04 UTC (permalink / raw)
  To: David Christensen; +Cc: cygwin

On Tue, May 24, 2022 at 11:36:21PM -0700, David Christensen wrote:
> I went back to the desktop computer that I have been using for Cygwin Perl
> testing:
> 
[...]
> 
> 'make test' produced the following result:
> 
> 99 wallclock secs ( 1.76 usr  0.41 sys + 342.21 cusr 375.40 csys = 719.78
> CPU)
> 
[...]
> I ran Cygwin setup-x86_64.exe version 2.918 and upgraded all Cygwin
> packages.
[...]
> I ran the cpan(1) shell and upgraded Perl modules:
[...]
> 
> 'make test' now produces:
> 
> 211 wallclock secs ( 2.39 usr  2.71 sys + 525.68 cusr 998.78 csys = 1529.57
> CPU)

You have merely demonstrated that there is a change in timing after
upgrading *all* of cygwin environment and packages.

Basic troubleshooting by any competent admin involves making changes
stepwise in steps as small as (reasonably) possible, and reperforming
tests each step.

Next step: go back to your older system and upgrade only the Perl
packages, then repeat the test.

If you are capable, try testing your cygwin environment on a different
machine, preferably not a corporate machine with hidden BLODA, and with
Microsoft Defender disabled (for the tests) (as previously asked by
others).

If you are capable, try testing older and newer Perl installations on a
different OS.

Annecdotally, I noticed about month or two ago that running my Perl
Test::Harness slowed down dramatically after an upgrade of both kernel
and packages on a Linux (*not Cygwin*) system.  I have not yet seen
compelling evidence from you that the slowdown is due to Cygwin, and
have seen data suggesting it is more directly related to Perl changes.

Other than your 'make test', do you have any evidence that anything else
has slowed down as dramatically between the old and new cywgin packages?
Any other shell scripts for which you tested the timing?
Any other Perl scripts for which you tested the timing?
  (and not run under 'make test')

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Cygwin Perl has slowed in recent months
  2022-05-25 15:04   ` gs-cygwin.com
@ 2022-05-25 20:06     ` David Christensen
  0 siblings, 0 replies; 15+ messages in thread
From: David Christensen @ 2022-05-25 20:06 UTC (permalink / raw)
  To: cygwin

On 5/25/22 08:04, gs-cygwin.com@gluelogic.com wrote:
> On Tue, May 24, 2022 at 11:36:21PM -0700, David Christensen wrote:
>> I went back to the desktop computer that I have been using for Cygwin Perl
>> testing:
>>
> [...]
>>
>> 'make test' produced the following result:
>>
>> 99 wallclock secs ( 1.76 usr  0.41 sys + 342.21 cusr 375.40 csys = 719.78
>> CPU)
>>
> [...]
>> I ran Cygwin setup-x86_64.exe version 2.918 and upgraded all Cygwin
>> packages.
> [...]
>> I ran the cpan(1) shell and upgraded Perl modules:
> [...]
>>
>> 'make test' now produces:
>>
>> 211 wallclock secs ( 2.39 usr  2.71 sys + 525.68 cusr 998.78 csys = 1529.57
>> CPU)
> 
> You have merely demonstrated that there is a change in timing after
> upgrading *all* of cygwin environment and packages.
> 
> Basic troubleshooting by any competent admin involves making changes
> stepwise in steps as small as (reasonably) possible, and reperforming
> tests each step.
> 
> Next step: go back to your older system and upgrade only the Perl
> packages, then repeat the test.
> 
> If you are capable, try testing your cygwin environment on a different
> machine, preferably not a corporate machine with hidden BLODA, and with
> Microsoft Defender disabled (for the tests) (as previously asked by
> others).
> 
> If you are capable, try testing older and newer Perl installations on a
> different OS.
> 
> Annecdotally, I noticed about month or two ago that running my Perl
> Test::Harness slowed down dramatically after an upgrade of both kernel
> and packages on a Linux (*not Cygwin*) system.  I have not yet seen
> compelling evidence from you that the slowdown is due to Cygwin, and
> have seen data suggesting it is more directly related to Perl changes.
> 
> Other than your 'make test', do you have any evidence that anything else
> has slowed down as dramatically between the old and new cywgin packages?
> Any other shell scripts for which you tested the timing?
> Any other Perl scripts for which you tested the timing?
>    (and not run under 'make test')


I do not have the interest nor the means to bisect Cygwin, Perl, and/or 
CPAN looking for performance issues.


For my use-case (SOHO devops), Cygwin Perl performance is a "nice to 
have"; not a "must have". "Correctness" is the "must have".


I will continue to consider this question:

On 5/24/22 08:03, David Christensen wrote:
 > What is a suitable Perl benchmark?


David

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-05-25 20:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18  1:53 Cygwin Perl has slowed in recent months David Christensen
2022-05-21 17:55 ` Hans-Bernhard Bröker
2022-05-22 19:11   ` David Christensen
2022-05-23 18:47     ` Lee
2022-05-23 21:22       ` David Christensen
2022-05-24  8:25       ` Csaba Raduly
2022-05-24  8:47         ` Sam Edge
2022-05-24 15:03           ` David Christensen
2022-05-24 15:59             ` Sam Edge
2022-05-24 17:09               ` David Christensen
2022-05-24 19:31             ` Brian Inglis
2022-05-24 18:57 ` Achim Gratz
2022-05-25  6:36 ` David Christensen
2022-05-25 15:04   ` gs-cygwin.com
2022-05-25 20:06     ` David Christensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).