Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399475 - gnome-base/gnome-shell-3.2.1-r3 needs a lot of memory, feature or bug?
Summary: gnome-base/gnome-shell-3.2.1-r3 needs a lot of memory, feature or bug?
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gnome3.6
  Show dependency tree
 
Reported: 2012-01-20 09:33 UTC by Juergen Rose
Modified: 2012-12-28 00:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The result of 'cat /proc/`pidof gnome-shell`/smaps > proc_pidof-gnome-shell_smaps.txt' (proc_pidof-gnome-shell_smaps.txt,481.32 KB, text/plain)
2012-01-20 12:32 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2012-01-20 09:33:00 UTC
Top shows that gnome shell needs almost 2GB of virtual and 800 MB resident memory:

top - 10:24:03 up 8 days,  1:32,  5 users,  load average: 0.00, 0.05, 0.21
Tasks: 191 total,   2 running, 189 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.5%us,  1.0%sy,  0.0%ni, 97.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3988796k total,  3231912k used,   756884k free,   184904k buffers
Swap: 12594924k total,   229848k used, 12365076k free,  1226288k cached

  PID USER PR NI  VIRT  RES SHR S %CPU %MEM   TIME+  COMMAND
 4437 rose 20  0 1857m 790m  10m S   3 20.3 328:59.95 gnome-shell
 4013 root 20  0  226m  52m 6072 S   1  1.3  95:37.83 Xorg
32694 rose 20  0 19464 1528 1080 R   1  0.0   0:03.62 top

Is this normal or a bug?



rose@lynx:/home/rose(6)$ emerge --info
Portage 2.1.10.44 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.2.0-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.2.0-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Fri, 20 Jan 2012 06:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3::sage-on-gentoo, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.2-r1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo lordvan x11 arcon ibormuth bicatali sage-on-gentoo java-overlay sunrise proaudio science dilfridge local x-cpan g-octave
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://ftp.easynet.nl/mirror/gentoo/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
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="/var/lib/layman/lordvan /var/lib/layman/x11 /var/lib/layman/arcon /var/lib/layman/ibormuth /var/lib/layman/bicatali /var/lib/layman/sage-on-gentoo /var/lib/layman/java-overlay /var/lib/layman/sunrise /var/lib/layman/pro-audio /var/lib/layman/science /var/lib/layman/dilfridge /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X Xaw3d a52 aac acl acpi admin afs alsa amd64 ao apache2 applet archive arpack asf aspell assistant atlas audacious audiofile automap automount bash-completion berkdb blas blast bluetooth boo boost branding bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cg cgi chm cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia dirac djvu doc dri ds2490 ds9097 ds9097u dts dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf encode epiphany evo examples exif expat extensions extra extras faac faad fam ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago garmin gcj gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib glpk gml gmp gmtsuppl gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk gudev guile harness hddtemp hdf hdf5 hdri http httpd hvm hwdb iconv icq icu id3 ide imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack laptop latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lirc lua lzo mad mail maildir mapnik math matroska mkl mmx mmxext mng modules mono motif mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy obex objc ocaml ocr octave odbc ogdi ogg ole openexr opengl openmp overview pam pango pcre pda pdf perl plotutils plugins png podcast policykit portaudio posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool sage samba sasl schroedinger science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell sql sqlite sse sse2 sse4 ssl ssse3 startup-notification stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora thinkpad threads thunderbird tidy tiff tk tools truetype udev unicode usb userlocales utempter vaapi video virtualbox vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xft xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" ALSA_CARDS="intel8x0" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-wt220u" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nouveau vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always
Comment 1 Mart Raudsepp gentoo-dev 2012-01-20 09:46:17 UTC
These numbers don't tell much. Content of /proc/`pidof gnome-shell`/smaps while it has a lot of RSS would be much more useful to look at. That said, I noticed a few memory leak fixes going into 3.2.2, but supposedly small (and smaps should show the lots of memory is under [heap] then).
Comment 2 Juergen Rose 2012-01-20 12:30:43 UTC
Hello Mart,

Thanks for your comment. If I understand the output of /proc/`pidof gnome-shell`/smaps (ca. 492 KB) correctly, the largest components (with respect to Size) are:

023a4000-1720b000 rw-p 00000000 00:00 0                                  [heap]
Size:             342428 kB
Rss:              336012 kB

and

7fbc9dd17000-7fbca4000000 r--p 00000000 fe:00 1228814                    /usr/share/icons/hicolor/icon-theme.cache
Size:             101284 kB
Rss:                 148 kB


The largest componenents (witht respect to Rss) are:

023a4000-1720b000 rw-p 00000000 00:00 0                                  [heap]
Size:             342428 kB
Rss:              336012 kB

7fbcac000000-7fbcb0000000 rw-p 00000000 00:00 0 
Size:              65536 kB
Rss:               65444 kB

7fbcc0000000-7fbcc4000000 rw-p 00000000 00:00 0 
Size:              65536 kB
Rss:               65420 kB

7fbccc000000-7fbcd0000000 rw-p 00000000 00:00 0 
Size:              65536 kB
Rss:               65188 kB

7fbcec000000-7fbcf0000000 rw-p 00000000 00:00 0 
Size:              65536 kB
Rss:               65456 kB


But I can't assess, whether this is normal or not.
Comment 3 Juergen Rose 2012-01-20 12:32:06 UTC
Created attachment 299387 [details]
The result of 'cat /proc/`pidof gnome-shell`/smaps > proc_pidof-gnome-shell_smaps.txt'
Comment 4 Juergen Rose 2012-01-20 12:45:22 UTC
BTW., the system is a laptop, where 'uptime' says that the laptop is already 8 days running. But in these 8 days the system was in several sleeping states as 'suspend to ram' or 'suspend do disk'.


On a second system (desktop) with an uptime of 3 days I get similar memory values for gnome-shell:

op - 13:41:04 up 3 days, 19:43, 14 users,  load average: 0.01, 0.10, 0.13
Tasks: 220 total,   1 running, 219 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.2%us,  1.8%sy,  0.0%ni, 94.3%id,  0.6%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8168096k total,  7298540k used,   869556k free,   656760k buffers
Swap: 33575840k total,    54852k used, 33520988k free,  3500416k cached

  PID USER   PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5032 root   20   0  252m 119m 4136 S    7  1.5  80:43.84 Xorg
20446 rose   20   0 1534m 436m  31m S    6  5.5  59:40.97 firefox
 6223 rose   20   0 1727m 683m  25m S    6  8.6 123:56.78 gnome-shell

root@moose:/home/rose/ISOs(48)# cat /proc/`pidof gnome-shell`/smaps
...
0243c000-0fa55000 rw-p 00000000 00:00 0             [heap]
Size:             219236 kB
Rss:              218620 kB
...
7fa129be9000-7fa130000000 r--p 00000000 fd:00 5158636  /usr/share/icons/hicolor/icon-theme.cache
Size:             102492 kB
Rss:                2528 kB
...
7fa138000000-7fa13c000000 rw-p 00000000 00:00 0 
Size:              65536 kB
Rss:               65536 kB
...
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-01-21 02:11:33 UTC
Please try mutter-3.2.2 and gnome-shell-3.2.2.1, they should fix some memory leaks.
Comment 6 Pacho Ramos gentoo-dev 2012-01-30 11:38:53 UTC
(In reply to comment #5)
> Please try mutter-3.2.2 and gnome-shell-3.2.2.1, they should fix some memory
> leaks.
Comment 7 Juergen Rose 2012-01-30 18:29:18 UTC
It seems me, that I still have the issue. gnome-shell needs not as much memory as before, but it still needs a lot of memory:

rose@lynx:/home/rose(3)$ qlist -Iv mutter
x11-wm/mutter-3.2.2
rose@lynx:/home/rose(4)$ qlist -Iv gnome-shell
app-admin/eselect-gnome-shell-extensions-20111211
gnome-base/gnome-shell-3.2.2.1
gnome-extra/gnome-shell-extensions-3.2.2
gnome-extra/gnome-shell-frippery-0.3.6

gnome-shell needs more 1.3GB virtual memory and 220 GB residental memory:

Top shows 
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
29971 rose      20   0 1312m 227m  25m S   1.3  5.8   7:03.52 gnome-shell


From /proc/`pidof gnome-shell`/smaps I see that icon-theme.cache needs more than 100 MB:

00ab6000-069dc000 rw-p 00000000 00:00 0                           [heap]
Size:              97432 kB
Rss:               96872 kB
...
7ff7bdd2f000-7ff7c4000000 r--p 00000000 fe:00 2915148                    /usr/share/icons/hicolor/icon-theme.cache
Size:             101188 kB
Rss:                  12 kB
...
7ff7dcfc7000-7ff7e1600000 r--p 00000000 fe:00 1236994                    /usr/share/icons/gnome/icon-theme.cache
Size:              71908 kB
Rss:                1936 kB
...
7ff7e7ffe000-7ff7ebfff000 rw-s 00000000 00:13 14732112                   /dev/shm/pulse-shm-2652673977
Size:              65540 kB
Rss:                 148 kB
...
7ff7f0000000-7ff7f1fcb000 rw-p 00000000 00:00 0 
Size:              32556 kB
Rss:               32556 kB
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-01-30 19:10:02 UTC
(In reply to comment #7)
> It seems me, that I still have the issue. gnome-shell needs not as much memory
> as before, but it still needs a lot of memory

At least there is some improvement. I don't think anyone on the gentoo gnome team understands gnome-shell and mutter internals well enough to find remaining memory leaks on their own, so you should probably talk directly to upstream. There are already two upstream bugs filed about abnormal gnome-shell memory usage: https://bugzilla.gnome.org/show_bug.cgi?id=642652 and https://bugzilla.gnome.org/show_bug.cgi?id=665678

> From /proc/`pidof gnome-shell`/smaps I see that icon-theme.cache needs more
> than 100 MB:

No, it's using only 12 kB, look at the rss line :)
Comment 9 Juergen Rose 2012-05-04 06:29:56 UTC
Now gnome-shell needs more than 2GB of resident memory:

  PID USER PR NI  VIRT  RES  SHR S %CPU %MEM TIME+  COMMAND                       
18212 rose 20  0 2102m 756m  19m D 22.9  9.5 4599:42 firefox
14588 rose 20  0 3229m 2.1g  16m S 20.6 26.5 1283:43 gnome-shell            
14333 root 20  0  518m 191m 3608 S 12.6  2.4 1156:17 Xorg
Comment 10 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-11-03 11:05:01 UTC
How is the consumption in gnome 3.4 or 3.6 ?

To make sure this is not due to a buggy extension, please make sure you have running bare shell.

I've experienced some extensions like system-monitor-extension that for some reason make gnome-shell memory grow overtime, quite rapidly.
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-12-28 00:28:40 UTC
No update from reporters. Closing.