Cygwin/X becomes very slow with > 56 X clients in single window mode

Jon TURNEY jon.turney@dronecode.org.uk
Tue Mar 5 14:26:00 GMT 2013


On 25/02/2013 20:07, JD Paul wrote:
> Cygwin/X becomes very slow with > 56 X clients in single window mode.
> 
> Description:
> 
> When running Cygwin/X in rooted window mode (with or without
> -nodecoration), response time is fast for any number of X clients up
> to and including 56 (as determined by 'xlsclients').  Upon adding one
> more client, window creation starts taking up to 3 seconds, and
> mapping/unmpapping becomes quite noticeably slow.  Upon removing X
> clients enough that the number drops below 57, the response time is
> fast again.

> My hope is that this can be traced to to some hard-coded limit that
> could be easily raised.  If that is the case, I could use Cygwin/X
> once that limit is increased.

I suspect that perhaps the limit that is being hit here is in the cygwin DLL,
by asking select() to wait on more than 64 socket fds at the same time.

The underlying windows call used, WaitForMultipleObjects() is limited to
waiting on 64 different things.  We could (should?) fan-out to multiple
threads, each waiting on 64 sockets, but last time I looked, it seemed to me
that the current implementation doesn't do this.

See [1] for a previous attempt to fathom what does.  But looking at the code
again, it seems to me it WFMOs on groups of up to 64 sockets in turn, which is
only approximately equivalent to waiting on them all.

> Thanks very much for your time -- JD Paul

Thanks for the detailed bug report

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list