cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Takashi Yano takashi.yano@nifty.ne.jp
Thu Sep 9 03:21:41 GMT 2021


On Wed, 8 Sep 2021 12:51:31 +0200
Corinna Vinschen wrote:
> 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.

Timing of select_sem notification is fixed by the patch attached.


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cygwin-pipe-Fix-notification-timing-of-select_sem.patch
Type: application/octet-stream
Size: 2381 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20210909/961706ed/attachment.obj>


More information about the Cygwin-developers mailing list