← Back to team overview

registry team mailing list archive

[Bug 277069] Re: Slow performance with remote X applications (java, firefox/xul, etc.)

 

Launchpad has imported 10 comments from the remote bug at
http://bugs.freedesktop.org/show_bug.cgi?id=17868.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2008-10-02T03:59:24+00:00 Juha Erkkilä wrote:

Created an attachment (id=19336)
tshark-dump of one keypress with XCB linked in

Some Java applications, such as the trial version in
http://www.typingmaster.com/, run unusably slow when used over a remote
X connection.

I'm using Ubuntu Hardy 8.04.1 with LTSP5, Linux kernel 2.6.24-19-server,
with 32-bit firefox and 32-bit Java-plugin.  The relevant package
versions are here:

firefox32 2.0.0.17
sun-java32 1.6.0.5
sun-java6-jre 6-06-0ubuntu1
ia32-libs 2.2ubuntu11
libxcb1 1.1-1ubuntu1
libxcb-xlib0 1.1-1ubuntu1

The issue does not appear to be Java-version related (it exists in 1.5
and 1.6 versions).  I have not tested the very latest Java-versions
though.  The reason I'm reporting this as a possible XCB-related issue
is that one can workaround the problem by using an X11-library that does
not link to XCB.

In current Ubuntu version (Hardy), /usr/lib32/libX11.so.6.2.0 library
links to /usr/lib32/libxcb-xlib.so.0 and /usr/lib32/libxcb.so.1
libraries, XCB version is 1.1.  In previous Ubuntu version (Gutsy) the
X11-library does not do this.  When the new library shared object
replaced with the old one, the problem disappears, and Java applications
that had problems run fine.

There may be some other differences between the X11-libraries, but using
XCB as an underlying implementation seems to be a major change, or is
it?  All other applications do not appear to have these problems, Java
applications appear to be the sole source of these problems.

I'm adding two attachments that show tshark-dump of network traffic in
both cases, perhaps it helps to analyze the issue.  What happens there
is one keypress on typingmaster Java-version, on Hardy/XCB case it takes
half a minute to process one keypress and switch a screen, on Gutsy/no-
XCB case it takes maybe a second.

Juha

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/0

------------------------------------------------------------------------
On 2008-10-02T04:00:21+00:00 Juha Erkkilä wrote:

Created an attachment (id=19337)
tshark-dump of one keypress without XCB

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/1

------------------------------------------------------------------------
On 2009-02-17T11:54:07+00:00 Jordan Erickson wrote:

FYI, I have triaged this issue with Ubuntu Launchpad. Please see
https://bugs.launchpad.net/libxcb/+bug/277069 for additional submitted
comments and information.

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/21

------------------------------------------------------------------------
On 2009-02-17T12:22:20+00:00 Jordan Erickson wrote:

Also, see the following threads for more information regarding this
issue:

http://sourceforge.net/mailarchive/forum.php?thread_name=81910.36206.qm%40web62007.mail.re1.yahoo.com&forum_name
=ltsp-discuss

http://www.typingmaster.com/forum/messages.aspx?TopicID=11

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/22

------------------------------------------------------------------------
On 2009-05-21T07:45:56+00:00 elupus wrote:

I think this could be related to what I was experiencing for GLX over
network.

Running any GLX application over network was horribly slow. I then found
out that running GLX application over network loopback on the same
machine was event slow. Ie i tested the following.

DISPLAY=localhost:0.0 LIBGL_ALWAYS_INDIRECT=1 xbmc
vs
DISPLAY=:0.0 LIBGL_ALWAYS_INDIRECT=1 xbmc

where xbmc being XBMC Media Center is a opengl application. The first
test gave a fps of 10, while the second a fps 40 on my hardware. After
some pondering i thought about the nagle algorithm.

After modifying libxcb to disable the nagle algorthim, the above two
commands rendered at about the same speed of 40fps.

I'll attach a diff.

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/31

------------------------------------------------------------------------
On 2009-05-21T07:47:35+00:00 elupus wrote:

Created an attachment (id=26071)
Patch to disable nagle algorithm on XCB network sockets

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/32

------------------------------------------------------------------------
On 2009-05-22T05:18:33+00:00 elupus wrote:

My patch seems to have solved the issue for the people affected by this
bug. There might be an alternate approach that would incure less
overhead due to TCP_NODELAY.

One could instead of having TCP_NODELAY enabled all the time, only
enable it on the socket on a call to _XFlush(), then disable. I'm not
sure how the kernel would like this setting being enabled and disabled
all the time thou.

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/36

------------------------------------------------------------------------
On 2009-05-26T01:20:19+00:00 Julien Cristau wrote:

Disabling Nagle sounds pretty reasonable to me.  It's also what Xtrans
(and thus traditional Xlib) does.

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/41

------------------------------------------------------------------------
On 2009-05-26T07:16:57+00:00 Julien-danjou wrote:

commit ee89850e68205a7f8961ace0839b5be86040dade
Author: elupus <elupus@xxxxxxx>
Date:   Tue May 26 16:14:48 2009 +0200

    Disable Nagle on TCP socket
    
    Signed-off-by: Julien Danjou <julien@xxxxxxxxxxx>

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/42

------------------------------------------------------------------------
On 2009-05-26T09:58:06+00:00 X-po8 wrote:

(In reply to comment #8)
> commit ee89850e68205a7f8961ace0839b5be86040dade
> Author: elupus <elupus@xxxxxxx>
> Date:   Tue May 26 16:14:48 2009 +0200
> 
>     Disable Nagle on TCP socket
> 
>     Signed-off-by: Julien Danjou <julien@xxxxxxxxxxx>
> 

I can't believe we had Nagle on. :-)  Oops.

Thanks much to all for the diagnosis and fix.

Reply at: https://bugs.launchpad.net/libxcb/+bug/277069/comments/43


** Changed in: libxcb
   Importance: Unknown => High

-- 
Slow performance with remote X applications (java, firefox/xul, etc.)
https://bugs.launchpad.net/bugs/277069
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.