| Summary: | xlsclients much too slow over network | ||||||
|---|---|---|---|---|---|---|---|
| Product: | xorg | Reporter: | Ian! D. Allen <idallen> | ||||
| Component: | App/other | Assignee: | Xorg Project Team <xorg-team> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
| Severity: | normal | ||||||
| Priority: | high | CC: | xcb | ||||
| Version: | git | ||||||
| Hardware: | x86 (IA32) | ||||||
| OS: | Linux (All) | ||||||
| Whiteboard: | |||||||
| i915 platform: | i915 features: | ||||||
| Attachments: |
|
||||||
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. xlsclients makes many calls that block waiting for a response from the server. Performance could probably be improved by porting from libX11 to libxcb to allow these calls to operate asynchronously. This is still a problem:
Ubuntu 8.10
xorg 1:7.4~5ubuntu3
$ time xlsclients | wc
17 124 1566
real 1m13.236s
user 0m0.012s
sys 0m0.072s
It takes 73 seconds to produce 17 lines of output on the remote system!
On the local system:
$ time xlsclients | wc
18 126 1600
real 0m0.224s
user 0m0.016s
sys 0m0.028s
Created attachment 29086 [details]
XCB conversion of xlsclients.c
Could you please try the attached XCB conversion of xlsclients.c? I'm curious to know how much it helps your case. Peter Harris wrote:
> Could you please try the attached XCB conversion of xlsclients.c?
Yes, that new XCB version fixes the huge delay:
time ./xlsclients | wc
17 126 1566
real 0m1.823s
user 0m0.000s
sys 0m0.008s
Only 49 "select" syscalls instead of over a thousand, and less than two
seconds of elapsed time instead of 60+ seconds. That works.
When can this version of xlsclients be made mainstream?
More polished version of the patch: git://anongit.freedesktop.org/~peterh/xlsclients master Thanks Peter! After review, I've merged your work to xlsclients master, though I'm leaving it to somebody else to roll a new 2.0 release. I merged your three commits into one, as they aren't independently usable; rebased on master, which surprisingly has changed in the last month; and I fixed some spurious whitespace and type diffs. Otherwise I left your code alone. Again, thanks for doing this work! Want to port some more apps now? :-) Alan suggested xprop as a good candidate... |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
My net connection is ADSL, 2.2Mbit down, 1.1Mbit up. I have various X clients open on my desktop, created via ssh logins to various other machines. I ssh to a remote system and then: % time xlsclients host1.ca xosview host1.ca xbiff -geometry 200x200+460+600 host1.ca mozilla-bin host2.ca xload -geometry 115x115+300+360 host3.ca xload -geometry 115x115+300+120 host4.ca xload -geometry 115x115+420+480 host5.ca xload -geometry 120x120+0+0 host1.ca /usr/bin/Eterm host1.ca Eterm host1.ca Eterm host1.ca xload -geometry 115x115+420+0 host1.ca Eterm 0.010u 0.230s 0:57.85 0.4% 0+68k 0+0io 0pf+0w It takes 57 seconds to produce 12 lines of output. I ssh to a different system: % time xlsclients host1.ca xosview host1.ca xbiff -geometry 200x200+460+600 host1.ca mozilla-bin host1.ca xload -geometry 115x115+420+0 host2.ca xload -geometry 115x115+300+360 host3.ca xload -geometry 115x115+300+120 host4.ca xload -geometry 115x115+420+480 host5.ca xload -geometry 120x120+0+0 host1.ca /usr/bin/Eterm host1.ca Eterm host1.ca Eterm host1.ca Eterm 0.023u 0.048s 0:56.85 0.1% 0+0k 0+0io 0pf+0w Another 56 seconds to produce 12 lines. Watching my local Ethernet switch status lights, my ADSL status lights, and confirming with tcpdump, I see a *lot* of ssh traffic being exchanged. Every new client adds about another 5 seconds to the wait. Running xlsclients locally on my desktop is virtually instantaneous. How can I speed up remote xlsclients? What is it doing, that it has to transfer so much data to produce 12 lines of output? xorg-x11-6.9-0.cvs20050810.6mdk