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

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


Hi Ken,

On Tue, 7 Sep 2021 12:26:31 +0900
Takashi Yano wrote:
> On Fri, 27 Aug 2021 20:24:40 +0900
> Takashi Yano wrote:
> > Hi Ken,
> > 
> > Thanks much! I tested topic/pipe branch.
> > 
> > [yano@cygwin-PC ~]$ scp test.dat yano@linux-server:.
> > yano@linux-server's password:
> > test.dat                                      100%  100MB  95.9MB/s   00:01
> > [yano@cygwin-PC ~]$ scp yano@linux-server:test.dat .
> > yano@linux-server's password:
> > test.dat                                      100%  100MB   8.0MB/s   00:12
> > 
> > yano@linux-server:~$ scp yano@cygwin-PC:test.dat .
> > yano@cygwin-PC's password:
> > test.dat                                      100%  100MB 109.7MB/s   00:00
> > yano@linux-server:~$ scp test.dat yano@cygwin-PC:.
> > yano@cygwin-PC's password:
> > test.dat                                      100%  100MB  31.4MB/s   00:03
> > 
> > As shown above, outgoing transfer-rate has been improved upto near
> > theoretical limit. However, incoming transfer-rate is not improved
> > much.
> > 
> > I digged further and found the first patch attached solves the issue
> > as follows.
> > 
> > [yano@cygwin-PC ~]$ scp yano@linux-server:test.dat .
> > yano@linux-server's password:
> > test.dat                                      100%  100MB 112.8MB/s   00:00
> > 
> > yano@linux-server2:~$ scp test.dat yano@cygwin-PC:.
> > yano@cygwin-PC's password:
> > test.dat                                      100%  100MB 102.5MB/s   00:00
> 
> With this patch (2e36ae2e), I found a problem that mintty gets into
> high load if several keys are typed quickly.
> 
> Therefore, I would like to propose a patch attached.

I found the fifo has same issue as pipe that throughput is
slowing down occasionally.

Please try simple test case attached (fifo_test.c).
Argument of fifo_test means:
0: with select, blocking I/O
1: with select, non-blocking I/O
2: without select, blocking I/O
3: without select, non-blocking I/O

In my environment, the results are as follows.

[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 0

Total: 100MB in 4.593770 second, 21.768613MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 1

Total: 100MB in 0.564711 second, 177.081603MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 2

Total: 100MB in 0.514730 second, 194.276724MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 3
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Total: 100MB in 0.038880 second, 2572.003230MB/s

Therefore, I would like to propose patch attached, which utilizes
select_sem just as pipe.

With the patch attached, the throughput of the fifo is improved
much as follows.

[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 0

Total: 100MB in 0.076400 second, 1308.895384MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 1

Total: 100MB in 0.064198 second, 1557.683351MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 2

Total: 100MB in 0.021803 second, 4586.503754MB/s
[yano@Express5800-S70 ~/pipe_test]$ ./fifo_test 3
wwwwwwrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Total: 100MB in 0.021747 second, 4598.271969MB/s


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fifo_test.c
Type: text/x-csrc
Size: 2228 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20210909/3d498f6a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cygwin-fifo-Utilize-select_sem-for-fifo-as-well-as-p.patch
Type: application/octet-stream
Size: 4455 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20210909/3d498f6a/attachment-0001.obj>


More information about the Cygwin-developers mailing list