On Sun, 2 Mar 2003, Kean Johnston wrote:

> >    MAXCLIENTS is defined in xc/programs/Xserver/include/misc.h
> > 
> > It's currently 256.
> 
> >    Available fds would be another limiting factor.  The client 
> > ID and the resource ID share 29 bits of the XIDs, so beware that
> > doubling the number of client IDs will half the number of
> > resources available to each client. 
> 
> Many thanks Mark.
> 
> Is this a limitation that is possible or likely to be addressed
> in the future? I know 256 clients sounds like a lot but we have
> had many complaints from customers that its not. Lord knows
> what they're doing. Since I am just an X porter and not a real
> X hacker, I don't understand the rammifications of halving the
> resource ID's. At 256 clients, that's 8 bits for the client ID
> and 21 bits bits for the resource ID. If we increased the
> client limit to 512, using 9 bits for the client ID and 20 bits
> for the resource ID, that would leave 2^20 resource IDs.
> 
> Since I don't really know how often and when resource IDs are
> used, I don't know if that is sufficient for most apps. If not
> I guess I'll have to live with the 256 client limitation. Can
> you venture an opinion on how many resource IDs are likely to
> be used, even by a large client?

   Generally far less than that.  You can verify with
http://www.xfree86.org/~mvojkovi/restest.c.  It prints out
the number of each resource type.  Sum them up and those
are the IDs used by those clients.  And in Xinerama,
GCs and drawable resources are multiplied times the number
of screens (restest reflects that).  You can usually tell
which app is which by running xwininfo on an app and finding
out which client base (as reported by restest) it's window
is in.

   I'm seeing xterm using a couple dozen.  Netscape is using
about 1000.   You've probably still got alot of headroom if you
are only doubling or quadrupling it.  

   Also be aware that changing MAXCLIENTS changes binary
compatibility between modules.  There are parts of the server 
referencing MAXCLIENTS.


                        Mark.

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to