Greetings, from when I first upgraded to xorg-server-1.5.3 (mainly to use KDE4), I'm having X.org causing huge CPU usage averages. I notice lags when I switch application windows and if I check out top I usually get something like this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4241 root 20 0 239m 60m 4236 S 44 6.1 28:54.34 X With X.org 1.3, I had no such problems whatsoever. I'm using x11-drivers/xf86-video-intel, which I have recompiled for X.org 1.5.3. Reproducible: Always Steps to Reproduce: emerge --info: Portage 2.2_rc20 (default/linux/x86/2008.0, gcc-4.2.4, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686) ================================================================= System uname: Linux-2.6.27-gentoo-r8-i686-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-glibc2.0 Timestamp of tree: Sun, 08 Mar 2009 17:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.4-r2 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.3.8 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo/" LANG="en_US" LDFLAGS="-Wl,-O1" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 acl alsa bash-completion berkdb bzip2 cdr cli cracklib crypt cups dri dvd dvdr dvdread firefox flac fortran gdbm gpm iconv isdnlog kde madwifi-ng midi mmx mmxext mp3 mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python qt4 readline reflection session spl sse sse2 ssl sysfs tcpd unicode vim-syntax wifi win32codecs x86 xorg zlib" ALSA_CARDS="ca0106" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 184833 [details] xorg.conf I'm attaching you my /etc/X11/xorg.conf.
Created attachment 184834 [details] Xorg.0.log also attached you shall find my /var/log/Xorg.0.log :)
Please read this document http://www.gentoo.org/proj/en/qa/backtraces.xml to get good debugging symbols on xorg-server, pixman, all your X drivers. Then use a tool like oprofile or sysprof to profile the X process. Thanks
Created attachment 185003 [details] directory listing of the debugging archive (In reply to comment #3) > Please read this document http://www.gentoo.org/proj/en/qa/backtraces.xml to > get good debugging symbols on xorg-server, pixman, all your X drivers. > > Then use a tool like oprofile or sysprof to profile the X process. > > Thanks > I created a .tar.gz containing the following: -My /usr/lib/debug after emerging with CFLAGS="-march=i686 -O1 -ggdb -pipe" and FEATURES="$FEATURES splitdebug" the following: *xorg-server *pixman *xf86-video-intel *xf86-input-keyboard *xf86-input-mouse -My /var/lib/oprofile after the following: *opcontrol --init *opcontrol --vmlinux=/usr/src/linux/vmlinux --start <playing around with firefox/akregator/etc.> *opcontrol --stop Unfortunately, the file size is 35MB. Want me to upload it in a nice and trusted server and give out the link? To avoid total dissapointment, I'm attaching the list of files in the .tar.gz archive, in case I'm missing something important. Thanks :)
I don't need the files, just the final profile statistics :) Thanks
(In reply to comment #5) > I don't need the files, just the final profile statistics :) > > Thanks > And what about the debugging symbols? They take 32MB of space. (I'm not at home right now, I'm gonna give you the final profile statistics when I get back (could you give me the exact command of doing that, to avoid any possible mistakes/misunderstandings?).)
(In reply to comment #6) > And what about the debugging symbols? They take 32MB of space. Useless, they don't have any information. They just allow profiling/debugging tools to report more precise information. > (I'm not at home right now, I'm gonna give you the final profile statistics > when I get back (could you give me the exact command of doing that, to avoid > any possible mistakes/misunderstandings?).) I have no idea, I have never used oprofile. You're own your own :) Cheers
Attached you will find a .tar.gz [0], with the oprofile results of: */usr/lib/xorg/modules/libexa.so */usr/lib/libpixman-1.so.0.14.0 */usr/lib/xorg/modules/drivers/intel_drv.so */usr/bin/X */usr/src/linux/vmlinux which was created by using a modified version of a script I found here: http://www.lostgeeks.org/npen/2008/05/26/using-oprofile-with-xorg/ If you need anything else, just tell me! [0] (yeah, I know, it's an extra step for anyone who wants to help, but uploading each file seperately wouldn't be too practical either)
Created attachment 185125 [details] oprofile results
I can't open that file...
(In reply to comment #10) > I can't open that file... > Really? Weird... $ tar xf oprofile_debugme.tar.gz should do the trick... :/
Comment on attachment 185125 [details] oprofile results Ahha, not a tar.gz, but a tar file :)
Honestly, I don't know what to think of the profiles. I don't know how to interpret them. Could you try using sysprof instead? At least, I know how to read its numbers :) Btw, let's try to discuss this on IRC instead, it'll be faster. I usually hang out on #gentoo-desktop. Cheers
That's kind of a weird way to provide oprofile results, normally one would provide them all in a single file. I combined them all and sorted by percentage. Here is everything above 2% (column 2) -- you could just grep functions out of individual files if you don't know which binary they come from: 181825 53.4533 pixman_region_subtractO 101334 47.6180 exaOffscreenAlloc 77446 36.3928 exaOffscreenFree 120543 35.4375 pixman_op 38835 27.9067 Xorg dixLookupPrivate 111388 18.6775 mwait_idle 596375 16.6379 /usr/src/linux-2.6.27-gentoo-r8/vmlinux 538290 15.0174 /snd_ca0106 2962 14.9302 i830_exa_pixmap_is_offscreen 390430 10.8923 /lib/libc-2.6.1.so 1919 9.6729 i830_refresh_ring 340157 9.4898 /usr/lib/libpixman-1.so.0.14.0 1274 6.4217 i830_prepare_composite 1266 6.3814 i830_composite 1223 6.1646 i830_texture_setup 212806 5.9369 /usr/lib/xorg/modules/libexa.so 1158 5.8370 .plt 179277 5.0015 /usr/lib/libasound.so.2.0.0 6857 4.9274 Xorg XYToWindow 172263 4.8059 /usr/lib/mozilla-firefox/libxul.so 164803 4.5977 /usr/lib/qt4/libQtCore.so.4.4.2 869 4.3803 I830DRISwapContext 137446 3.8345 /usr/bin/Xorg 22244 3.7299 sysenter_past_esp 5172 3.7166 Xorg dixLookupResource 120362 3.3579 /usr/lib/qt4/libQtGui.so.4.4.2 595 2.9991 i830_check_composite_texture 595 2.9991 __i686.get_pc_thunk.bx 17786 2.9824 native_read_tsc 570 2.8731 I830EXASolid 16799 2.8169 __copy_to_user_ll 555 2.7975 intel_get_pixmap_pitch 15984 2.6802 fget_light 3710 2.6660 Xorg ProcTranslateCoords 92295 2.5749 /usr/lib/libmad.so.0.2.1 3503 2.5172 Xorg compWindowUpdate 492 2.4800 i830_check_composite 3302 2.3728 Xorg Dispatch 470 2.3691 i830_get_pixmap_bo 460 2.3187 I830BlockHandler 452 2.2783 intel_batch_flush 432 2.1775 I830VideoBlockHandler 12756 2.1389 avc_has_perm_noaudit 2972 2.1357 Xorg ReadRequestFromClient 2945 2.1163 Xorg __i686.get_pc_thunk.bx 416 2.0969 IntelEmitInvarientState 406 2.0465 I830Sync
Created attachment 185194 [details] oprof George, In the future, I recommend you use a script like this to run oprofile.
(In reply to comment #13) > Honestly, I don't know what to think of the profiles. I don't know how to > interpret them. > > Could you try using sysprof instead? At least, I know how to read its numbers > :) > > Btw, let's try to discuss this on IRC instead, it'll be faster. I usually hang > out on #gentoo-desktop. > > Cheers > Alright, I got you a sysprof log! It was a bit too big (2,6MB) to bit uploaded in the Gentoo bugzilla, so I uploaded it over here: http://dev.gentoo.org/~asn/gentoo/sysprof.log (In reply to comment #15) > Created an attachment (id=185194) [edit] > oprof > > George, > > In the future, I recommend you use a script like this to run oprofile. > Aw, alright, thanks :)
(In reply to comment #16) > Alright, I got you a sysprof log! > It was a bit too big (2,6MB) to bit uploaded in the Gentoo bugzilla, so I > uploaded it over here: > http://dev.gentoo.org/~asn/gentoo/sysprof.log Here's what I see from this : 1) you have a lot of running apps when you did the profile (firefox, amarok). 2) I don't see anything obviously wrong in there. I think you should open a bug in FreeDesktop's bugzilla to get this profile analyzed by Xorg devs. Please paste the url here so we can track the issue too. I'm quite puzzled by this... Thanks
(In reply to comment #17) > (In reply to comment #16) > > Alright, I got you a sysprof log! > > It was a bit too big (2,6MB) to bit uploaded in the Gentoo bugzilla, so I > > uploaded it over here: > > http://dev.gentoo.org/~asn/gentoo/sysprof.log > > Here's what I see from this : > > 1) you have a lot of running apps when you did the profile (firefox, amarok). > 2) I don't see anything obviously wrong in there. > > I think you should open a bug in FreeDesktop's bugzilla to get this profile > analyzed by Xorg devs. > > Please paste the url here so we can track the issue too. I'm quite puzzled by > this... > > Thanks > Reported upstream at: https://bugs.freedesktop.org/show_bug.cgi?id=20753 ; )
Alright, let's track the bug upstream then. Thanks a bunch :)