From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id 5D90D3858C60 for ; Wed, 8 Sep 2021 10:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D90D3858C60 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 (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N5n3t-1n06Lg48GR-017BfY for ; Wed, 08 Sep 2021 12:51:32 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 56CE9A80CF7; Wed, 8 Sep 2021 12:51:31 +0200 (CEST) Date: Wed, 8 Sep 2021 12:51:31 +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: <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> <20210908194529.148fe98ca7593b079d0b1e65@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210908194529.148fe98ca7593b079d0b1e65@nifty.ne.jp> X-Provags-ID: V03:K1:J98FeKqicK0P77M8qu5LbmCYbnigNjX8BYt4nsJ0VVJGiWTE3Zo jWCzhZ5C8gKIRv8wtlb0mnc3BhvbTN5bdlwzN9Vwvb2YxGAZf9+NQtoizPVDex7Ah0FL+wH hhPcfiYaj76XYfNuaz5PbXunBRnnPegV52ATWe8qtFUf7ljsMMlgUO6yWt2vL89VTKhwC3f 6GhpOoJCJJiLvpbZ8Bwxw== X-UI-Out-Filterresults: notjunk:1;V03:K0:k6YOyqE0Vmw=:4pVejID14r4Wb93VZQE3yJ ioaEwmC+Bpbo33ImYMCSrT5t6iF71ZNWBbulSFbssgS5Z5VsluVxnsok7a3YWDyp6kSho5tnc RIffl7MeevGV1WDFk4/HdHyhMyhSgA5Tz0vF+HlC3aGPbSWulIRjRckAAFCmv0oIUV2QkgRZ8 nSPaei1j2PkEbVc71OsoVjUKdS2qkuOrHsWh19i3ponHMDnd0GmzCpuAwIvrgFrLg9baTRDZB Ty5mO2nVaRUcWVmnv/VUxhgaLB4FVJxd7l4EPZILm0ungzNx8vmBs7kG6AiJjGwRT0masvBSS QQP6SlSd+eNRh1jlr1j42Qb3+47QApdFxBlKF5qLA26HoE5o+YrYfyEQCBG7nYGj8O156peEb kebHxei0OnkuliBGxSFCzX7YYXH8NKfj6+PIC4UGeiSO5pJS4HS/bBAj8ccnfcmDKcjhaZpbR r9mvdpOrCFcJzHbm+Zsu1cWKANY6n9hbrVhOOWqsK26eauGjGO4VRPK/tAR7iZCutRSwLQjhD oVSYv1+LA1xGWfG1VyVfAtPsYKkzkY/vnJ7AjPKroaBYRqnjW5V0UnjhNe74xP2uBHcNt/RLF LdIyX/tHE7t5tccfMMx5H/gJQmIiu3DSusIEpucttxlvC2yA4oYYuHfCvGJE2ac5v4hpWqerh agXhwGUI8n7D8wNMz8fT4bTU4rgsr4lLcO6oO3Nj5obKY7to0Kp4YaqNUnwu633IuirNlFdkl sI6gjiApCiQVwv+NbdwAdV96Oqz6HAwptt2Dh6Ssib4tevGFQstFxEjhWCw= X-Spam-Status: No, score=-99.7 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, 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:51:34 -0000 On Sep 8 19:45, Takashi Yano wrote: > Hi Corinna, > > On Wed, 8 Sep 2021 12:04:21 +0200 > Corinna Vinschen wrote: > > 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. > > Thanks for testing again. > > > 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? > > I split the patch as you advised. Pushed. Thanks, Corinna