[Bug 277069] Re: Java slow on remote X
** Changed in: libxcb (Ubuntu) Importance: Low => High ** Summary changed: - Java slow on remote X + Slow performance with remote X applications (java, etc.) ** Description changed: - I've submitted this bug as - https://bugs.freedesktop.org/show_bug.cgi?id=17868 as well. Though the - problem may not be in ia32-libs -package, it contains the - /usr/lib32/libX11.so.6.2.0 library that appears to be somehow relevant - to the problem at hand. + With xcb every write (in _XFlush) is followed by a read (_XEventsQueued) which + is the cause of the very poor performance. The read usually returns EAGAIN + because there is nothing to be read, but it is a severe performace hit anyhow. + And why _XEvenetsQueued/read is being called when select/poll has previously + returned indicating only a single file descriptor was ready is anybody's guess. + + [Original Report] + I've submitted this bug as https://bugs.freedesktop.org/show_bug.cgi?id=17868 as well. Though the problem may not be in ia32-libs -package, it contains the /usr/lib32/libX11.so.6.2.0 library that appears to be somehow relevant to the problem at hand. 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 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 [lspci] 00:00.0 Host bridge [0600]: VIA Technologies, Inc. VT8623 [Apollo CLE266] [1106:3123] Subsystem: VIA Technologies, Inc. Unknown device [1106:] 01:00.0 VGA compatible controller [0300]: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics [1106:3122] (rev 03) (prog-if 00 [VGA controller]) Subsystem: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics [1106:3122] ** Summary changed: - Slow performance with remote X applications (java, etc.) + Slow performance with remote X applications (java, firefox/xul, etc.) -- 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 Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Please see http://www.typingmaster.com/forum/messages.aspx?TopicID=11 for information regarding a specific case of this bug, in the TypingMaster java-based typing tutor for Linux. This is the app that I have the most issues with regarding this bug, and the people at TypingMaster have been very helpful so far. Hopefully they can be a good resource to help get this thing fixed once and for all. -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Changed in: libxcb Status: Unknown => Confirmed -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Bug watch added: freedesktop.org Bugzilla #17868 https://bugs.freedesktop.org/show_bug.cgi?id=17868 ** Also affects: libxcb via https://bugs.freedesktop.org/show_bug.cgi?id=17868 Importance: Unknown Status: Unknown -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Description changed: I've submitted this bug as https://bugs.freedesktop.org/show_bug.cgi?id=17868 as well. Though the problem may not be in ia32-libs -package, it contains the /usr/lib32/libX11.so.6.2.0 library that appears to be somehow relevant to the problem at hand. 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 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 + + [lspci] + 00:00.0 Host bridge [0600]: VIA Technologies, Inc. VT8623 [Apollo CLE266] [1106:3123] + Subsystem: VIA Technologies, Inc. Unknown device [1106:] + 01:00.0 VGA compatible controller [0300]: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics [1106:3122] (rev 03) (prog-if 00 [VGA controller]) + Subsystem: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics [1106:3122] -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 277069] Re: Java slow on remote X
To use an older version of libX11, I would suggest to unpack it in a different place, and use the LD_LIBRARY_PATH environment veriable to point your executables to that place. That way, you don't have to fight the package system. For example: dpkg-deb -x ~//libx11-6_1.1.1-1ubuntu4_amd64.deb /usr/local/foo/libx11-6-6_1.1.1-1ubuntu4_amd64 export LD_LIBRARY_PATH=/usr/local/foo/libx11-6-6_1.1.1-1ubuntu4_amd64/usr/lib:${LD_LIBRARY_PATH} Vincent. -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Not that I know of - but that, IMHO, is moot - we need to get the core issue fixed and not waste time and resources trying to find the best, most stable workaround. If I have to put on an LTSP cheerleader uniform, I will! ;) -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
By the next apt-get upgrade the link was unfortunately changed: wo...@hermine:/usr/lib$ ls -l libX11.* lrwxrwxrwx 1 root root 21 2009-01-15 12:22 libX11.so.6 -> libX11.so.6.2.0.hardy lrwxrwxrwx 1 root root 21 2009-01-15 12:20 libX11.so.6.2 -> libX11.so.6.2.0.gutsy -rw-r--r-- 1 root root 986540 2008-11-03 11:47 libX11.so.6.2.0.gutsy -rw-r--r-- 1 root root 944876 2008-11-03 11:47 libX11.so.6.2.0.hardy I guess it depends on the packages involved in the upgrade process whether the link is changed or not. Is there no way to prevent this? -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Jordan, I checked our system about changing symbolic links to libX11.so.6.2.0. by the update process, but I can confirm your issue only partly. When I inspected our system I found libX11.so.6 pointing to the wrong (hardy) version. I am not sure, if this link was set by an update process of if I just forgot to set it to the gutsy version when i installed the gutsy file. Therefore I proved as follows: I renamed the original hardy file to libX11.so.6.2.0.hardy and copied the gutsy libX11.so.6.2.0 to libX11.so.6.2.0.gutsy Additionally I changed the symbolic links: libX11.so.6 -> libX11.so.6.2.0.gutsy libX11.so.6.2 -> libX11.so.6.2.0.gutsy After sudo apt-get update and sudo apt-get upgrade the links still remain as I set them: wo...@harry:/usr/lib$ ls -l libX11.* lrwxrwxrwx 1 root root 21 2009-01-15 10:54 libX11.so.6 -> libX11.so.6.2.0.gutsy lrwxrwxrwx 1 root root 21 2009-01-15 10:53 libX11.so.6.2 -> libX11.so.6.2.0.gutsy -rw-r--r-- 1 root root 986540 2008-11-01 14:34 libX11.so.6.2.0.gutsy -rw-r--r-- 1 root root 944876 2008-03-11 21:33 libX11.so.6.2.0.hardy -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Hope this is an accurate affecting package change: $ apt-file search libX11.so.6 libx11-6: /usr/lib/libX11.so.6 libx11-6: /usr/lib/libX11.so.6.2.0 ** Changed in: libx11 (Ubuntu) Sourcepackagename: ia32-libs => libx11 -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
It seems as though even using 'dpkg-divert' won't help in this case, as ldconfig seems to override the libX11.so.6 symlink whenever changes take place. man dpkg-divert: --- Care should be taken when diverting shared libraries, ldconfig(8) creates a symbolic link based on the DT_SONAME field embedded in the library. Because ldconfig doesn’t honour diverts (only dpkg does), the symlink may end up pointing at the diverted library, if a diverted library has the same SONAME as the undiverted one. --- Anyway, I keep replacing the symlink, but it seems as though whenever I perform Ubuntu updates, the libX11.so.6 symlink reverts and points to the original file (which I renamed to libX11.so.6.2.0.orig). It's EXTREMELY frustrating, especially when administrating multiple servers that all experience this issue (7 in my case). It's not clean to replace this file all the time, either, as if people are logged onto thin clients when you replace it, they crash outright. Could this bug report be more effective if it points to 'libx11-6' ? See below: jerick...@fibonacci:~$ apt-file search libX11.so.6 libx11-6: /usr/lib/libX11.so.6 libx11-6: /usr/lib/libX11.so.6.2.0 Sincerely, Jordan/Lns -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Attachment added: "lspci --vvnn on a terminal" http://launchpadlibrarian.net/21119386/lspci.terminal -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Attachment added: "lspci --vvnn on the server" http://launchpadlibrarian.net/21119373/lspci.server -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
[This is an automated message] Hi juha-erkkila, Please attach the output of `lspci -vvnn` too. ** Changed in: libxcb (Ubuntu) Status: New => Incomplete -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
This is a showstopper at our school, too. It's not possible to use geogebra. Thank god, the above solution "works" for us! -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Yikes.. libxcb priority is "Low" ? That's surprising, given that (presumably) because of libxcb, Java applications are pretty much unusable in LTSP environments. -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
I had observed on our LTSP5 server whit ubuntu intrepid: - a java-application start on a thin-client is very slow. - the same java-application start with a nomachine-client nx works fast. why? -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Change package from ia32-libs to libxcb-xlib0 (as this is what is installed, by default on an i386 system). ** Changed in: libxcb (Ubuntu) Sourcepackagename: ia32-libs => libxcb -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
I can confirm this bug on Ubuntu 8.04.1 LTS running with LTSP5. I can also confirm the fix of replacing the Hardy version of: /usr/lib/libxcb-xlib.so.0 With the Gutsy version, as described in above comment. I have performed this fix on 2 separate LTSP networks and it seems to work fine, with no ill effects. The problem definitely lies in the changes made in the Hardy version of said file (linking to XCB? Not sure.) -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
@Scott: I asked Juha how to apply the workaround, here is his answer. #4 is the answer you are asking for: > 1.) How can a single file be replaced between different Ubuntu versions? Simply replacing the file (with cp) should be enough, but in case updates should happen to ia32-libs package that contains the /usr/lib32/libX11.so.6.2.0 file, those updates will overwrite the changed file. dpkg-divert can be used to solve this problem, it can be used to divert file updates to another place (in this case, because the file is a shared library, it should not be in the same directory, otherwise ldconfig will link to the wrong file). You might want to test by simply installing the gutsy version of ia32-libs package, it should work, but I don't recommend that as a permanent solution (it will change many other libraries as well). > 2.) Where can I get the file from Gutsy? http://packages.ubuntu.com/gutsy-updates/amd64/ia32-libs/download You can unpack deb-archives with (IIRC): (mkdir tmp && cd tmp && ar x ../ia32-libs_2.1ubuntu4_amd64.deb && \ tar -zxf data.tar.gz) You'll find the file there. Comment: That is for arch amd64. For arch i386 you'll find the package here: http://packages.ubuntu.com/gutsy/libx11-6 > 3.) Are there side effects that probably can affect the system? Perhaps, but I'm not aware of any. > 4.) Am I right that the file needs to be replaced in the ltsp chroot? No, X-clients use this library, so it needs to be replaced in the ltsp server environment, NOT in the image that is served to terminals. I hope this helps. Juha -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
Juha, I think I'm seeing a similar problem here, but with slow typing within OpenOffice.org. I was wondering, do you replace the library in BOTH the thin client chroot, and on the server, or only on the server? -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Changed in: ia32-libs (Ubuntu) Importance: Undecided => Low -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Attachment added: "tshark-dump of one keypress without XCB" http://launchpadlibrarian.net/18133652/typingmaster_one_keypress_gutsy_libX11.log.gz -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 277069] Re: Java slow on remote X
** Attachment added: "tshark-dump of one keypress with XCB linked in" http://launchpadlibrarian.net/18133630/typingmaster_one_keypress_hardy_libX11.log.gz -- Java slow on remote X https://bugs.launchpad.net/bugs/277069 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs