[PATCH v3] configurable maximum number of clients
Olivier Fourdan
ofourdan at redhat.com
Wed Jun 3 07:51:57 PDT 2015
Hi
This needs http://patchwork.freedesktop.org/patch/50714/ to be applied on X proto first.
Attaching the small programs I use to test this patch, of course the idea is tio choose between the number of clients or the number of resources per client (as both end up being in the same 29bit value), so both need to be tested.
With these patches I get pretty good results:
First run with 512 clients:
$ ./hw/kdrive/ephyr/Xephyr -maxclients 512 :10
$ DISPLAY=:10 ./countclients
Maximum number of clients reached => 508 connections created
$ DISPLAY=:10 ./countres
Resource mask: 0x000fffff
1048575 (0x000fffff) resources created!
Second run with 256 clients:
$ ./hw/kdrive/ephyr/Xephyr -maxclients 256 :10
$ DISPLAY=:10 ./countclients
Maximum number of clients reached => 255 connections created
$ DISPLAY=:10 ./countres
Resource mask: 0x001fffff
2097151 (0x001fffff) resources created!
Third run with 128 clients:
$ ./hw/kdrive/ephyr/Xephyr -maxclients 128 :10
$ DISPLAY=:10 ./countclients
Maximum number of clients reached => 127 connections created
$ DISPLAY=:10 ./countres
Resource mask: 0x003fffff
4194303 (0x003fffff) resources created!
Forth run with only 64 clients:
$ ./hw/kdrive/ephyr/Xephyr -maxclients 64 :10
$ DISPLAY=:10 ./countclients
Maximum number of clients reached => 63 connections created
$ DISPLAY=:10 ./countres
Resource mask: 0x007fffff
8388607 (0x007fffff) resources created!
Cheers,
Olivier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: countclients.c
Type: text/x-c++src
Size: 2264 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150603/d9bbd8cc/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: countres.c
Type: text/x-c++src
Size: 956 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150603/d9bbd8cc/attachment-0001.c>
More information about the xorg-devel
mailing list