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

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


On Thu, 23 Sep 2021 09:03:13 -0400
Ken Brown wrote:
> On 9/23/2021 4:26 AM, Takashi Yano wrote:
> > * Make temporary_query_hdl() faster.
> 
> Thanks!  Again, I'm not familiar with the Windows functions that you used, so 
> Corinna should review this too when she returns.
> 
> I have one question:
> 
> The documentation at 
> https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses 
> says, "There is no indication given when the buffer is too small to store all 
> process identifiers. Therefore, if lpcbNeeded equals cb, consider retrying the 
> call with a larger array."
> 
> Does this mean that EnumProcesses could return TRUE even if the buffer is too small?

Ah, right. Thanks for pointing out that mistake.
I have fixed that.

P.S.
I measured the response of select().
The first time and second time response is measured.

Only the first time takes long response time because
the cached info is used in the second time. This patch
improves the response much. Also, caching info is very
effective.

First time, Second time
Without this patch:
19.427600 [msec], 0.113900 [msec]

With this patch:
3.344600 [msec], 0.115000 [msec]

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-Cygwin-pipe-Use-ProcessHandleInformation-if-avail.patch
Type: application/octet-stream
Size: 11858 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20210924/d177b49f/attachment-0001.obj>


More information about the Cygwin-developers mailing list