delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/22/03:44:09

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 24A6B385BF9F
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net
Subject: Re: New pty implementation is really slow
To: cygwin AT cygwin DOT com
References: <T2ea_w0xYVfOjY80lzLI17-jZsISnTZXfTh_jqEePHLNtgG2TCVMAovKFkBIEKhISLr9GFOIKSUixMgWa72iiqZLCDUCXVCJbAy3w7DGphU=@protonmail.com>
<dbbb929c-78a3-b5a8-4fd5-dffa1c99d43b AT gmail DOT com>
From: Thomas Wolff <towo AT towo DOT net>
X-Tagtoolbar-Keys: D20200322084314295
Message-ID: <9ee9e561-322e-ae11-963e-d3e351e6b4ee@towo.net>
Date: Sun, 22 Mar 2020 08:43:14 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.6.0
MIME-Version: 1.0
In-Reply-To: <dbbb929c-78a3-b5a8-4fd5-dffa1c99d43b@gmail.com>
X-Provags-ID: V03:K1:wA+4z71U22Lj2EBKcvO+x05+R3kmMFJkgqKNXNa/vVM3xio7Hik
Is/0NFmuY7IwkrfTWWpfv4+FxU+oNHSGmor5Q62k7V7/xA24TmhFcJXX0JIWlaoDwLv+cuD
ymMuI06A6p+SqEmSr23NM/3ntOzuqQVmGgmzimOl+/Bys3iIs7U72rWG6GgwSx91FXMCdXy
fZk3x9/HqOZtF6njL28dw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:7rCBld27VcE=:0VzB1CxH7WLvRiVhAAknlh
A7ZXTyO/16957OUI0B+FmrjfhFod3tThiAqpmEfU0J/94IEVdLXgegDDOJreD5gV008QjHSpJ
9b9zuuYi0SGd3yQkVNitpYe9UQEmasGg2HIK16DLP02V/70SsnF7EU1a2i+4UttCRY0CYdmkV
iFtyP+riLDcZ3Nj736v7OY5hiAqlf3ft6nTNbBUEPM2lCKGvwex5w8kqFcp4WJL/2otNKQoEI
IFJ6dZqmhDAiK+1Ijej/vNx7PdFAq8cqXkEM6910eR3Rd9yfWcUdk97LqNnkj3e16jZuigJBY
Nkr2/Er9BFKdS96j26IZLgulX1iBJoTVTBC5IALd+3yvjQZo0A03ZdgjHU3w72TxNNvb2JMU8
eVeSruXJwsYBf4xXbf7xHr3+LujsSPc2BqpwDnasOJq8x4s933VyKeqDdgZrR42iQGMTXfym9
RQnAFK6poClGi9WEjYrDEdMMJAAXNlEsn8JuIFDhopDpOUYLMM66n/uBVqDNDSHYjuaP7/xUi
+SXqjTDOBkA8EiMdpEGsPR/qcAj19RJ1wqVqgox7J6NdttMH0YMl8lLuckV2Z39QtUjFf0Dz4
du407ujouAtfMPm718Jz+L4PYXdVjMp5htATg0j6nu5LgmkfomA0V7ZNIoh5e03h+9gMzdXYB
3hJaAurcvugv+cWPxSmfCSkkWiJpszOddQnasSvltVMt6r8YX6RLRBFx8ZRhC86m4t5LbCsPc
6hqUwfxUfqhfaXr5GoElZ8tXr8ORZ727eOteZyMQNoDQxbcz0F5Ir/9NUzfFsPzJVasvRHH+c
kyCYSDoftiVRipwlJua7GsNLLo5ZdeMVve5G6LU9lidc+tyS8A=
X-Spam-Status: No, score=4.6 required=5.0 tests=BAYES_00, BODY_8BITS,
GARBLED_BODY, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY,
RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Level: ****
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 02M7ho3Y019451

Am 22.03.2020 um 06:51 schrieb Marco Atzeri via Cygwin:
> Am 22.03.2020 um 04:21 schrieb Joe via Cygwin:
>> I'm using cygwin 3.1.4 on Windows 10.
>>
>> The new pseudo terminal stuff seems really slow.
>>
>> For example:
>> $ time seq 10000
>> (output omitted)
>> real    0m23.510s
>> user    0m1.515s
>> sys     0m4.483s
>>
>> If I minimize the mintty window while seq is running, it gets 
>> slightly better:
>> real    0m4.562s
>> user    0m0.390s
>> sys     0m1.202s
>>
>> But when I set CYGWIN=disable_pcon before starting mintty, I get:
>> $ time seq 10000
>> (output omitted)
>> real    0m0.366s
>> user    0m0.109s
>> sys     0m0.093s
>>
>> So the new implementation seems to be over 60 times slower than the 
>> old one.
>> -- 
>
> only factor 10x on my test, amd only impacting mintty case
> Curious that 32bit disabled is 2x faster than 64bit disabled
>
> 64 bit
>
> Mintty with enabled (default)
>
> real    0m2.674s
> user    0m0.234s
> sys     0m0.859s
>
> mintty with disabled
>
> real    0m0.247s
> user    0m0.015s
> sys     0m0.046s
>
> CMD with enabled
> real    0m1.121s
> user    0m0.109s
> sys     0m0.187s
>
> CMD with disabled
> real    0m1.084s
> user    0m0.078s
> sys     0m0.312s
>
> 32 bit
>
> Mintty with enabled (default)
> real    0m2.548s
> user    0m0.281s
> sys     0m0.686s
>
> Mintty with disabled
> real    0m0.058s
> user    0m0.030s
> sys     0m0.000s
>
> CMD with enabled
> real    0m1.021s
> user    0m0.124s
> sys     0m0.296s
>
> CMD with disabled
> real    0m1.018s
> user    0m0.109s
> sys     0m0.265s
>
> I have the impression that the slow is due to some type of buffer 
> expansion as I seem to notice a not uniform progress of the print
> the screen. But it could be just my eye...
With disable_pcon, output is sent to mintty in bunches of 256 bytes at 
each read() invocation.
With pcon enabled, typical output size is 12 bytes. That doesn't seem to 
be the whole story, though.
Thomas
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019