From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by sourceware.org (Postfix) with ESMTPS id 571AB3858415 for ; Wed, 8 Sep 2021 10:04:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 571AB3858415 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Ml3ym-1mn6Es0b0O-00lWAZ for ; Wed, 08 Sep 2021 12:04:22 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 9CED2A80D9E; Wed, 8 Sep 2021 12:04:21 +0200 (CEST) Date: Wed, 8 Sep 2021 12:04:21 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <3b560051-ab27-f392-ca4b-d1fd9b5733b0@cornell.edu> <20210827202440.47706fc2fc07c5e9a1bc0047@nifty.ne.jp> <20210907122631.65452be8d021ec72259431d5@nifty.ne.jp> <20210907195023.31ad8194457bb90c2b6971b4@nifty.ne.jp> <20210908090748.3e70ed5aea3fa3c320b5ae0d@nifty.ne.jp> <20210908131141.bf63a795ce13c8dd8f5c13a8@nifty.ne.jp> <20210908184511.75c901b132c71911aaaa6ad6@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210908184511.75c901b132c71911aaaa6ad6@nifty.ne.jp> X-Provags-ID: V03:K1:GpQyL1RApOW1+t/UFLkPd6PvVDuCw5HDsUrUlyMMqAkIZHz5Yk6 xLoyL0tnxvTNE8EYenZh2RzXJ9DQ1YZ643+vxcy39nntbTkZCGd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C_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 10:04:24 -0000 On Sep 8 18:45, Takashi Yano wrote: > On Wed, 8 Sep 2021 11:26:21 +0200 > Corinna Vinschen wrote: > > On Sep 8 11:01, Corinna Vinschen wrote: > > > What exactly is the problem in the code which results in high CPU > > > load? Can you explain this a bit? Maybe we need an entirely > > > different approach to avoid that. > > > > I saw your new patch, but I don't see the problem. I typed a lot of > > keys in mintty quickly and what happens is that the load of mintty > > goes up to 9% on a 4 CPU system, but only temporarily while typing. > > How do you reproduce the problem? > > Did you apply the patch > 0001-Cygwin-select-Introduce-select_evt-event-for-pipe.patch > or > 0001-Cygwin-select-Introduce-select_sem-semaphore-for-pip.patch > ? > > With these patch, the problem does not occur. The problem occurs > with the commit dccde0dc. dccde0dc is 23bb19efcc45 in topic/pipe ATM (after force push) so, yes, I'm running this with topic/pipe HEAD including this patch. > With my 4 core 8 thread CPU, CPU loads goes up to 12-13 % if > I type keys using key repeat (30cps) after the commit dccde0dc. Oh, wow! As I wrote above, before applying "Cygwin: select: Introduce select_sem semaphore for pipe." I only saw a 9% load. After applying the patch I saw the same load. I don't know what I did differently, but after reverting your semaphore patch I now see loads of up to 30%. So, never mind, apparently I tested wrongly before. Your patch reduces the load tremendously. Just one question. Would you mind to split your patch into two parts, one being just the revert of your "Improve select/poll response." patch and one introducing select_sem? Thanks, Corinna