View previous topic :: View next topic |
Author |
Message |
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Sun Aug 15, 2004 2:25 pm Post subject: High memory usage w/ gnome apps. |
|
|
I'm sorry if this is a duplicate but the closest thread that I found had a slightly different problem(they were wondering why their memory usage was *close* to 100%).
My problem is this, I have 512mb of ram installed on this machine. While not a ton, it should be sufficiently enough to run linux. I noticed some things running sluggishly this morning, so I checked on the memory usage. It was at 100% with swap using over 120 megs of ram. The culprits??
Firefox: 160 megs of ram (three different windows open with about 13 tabs total)
Gaim: 30 megs
gnome-terminal: 30 megs
nautilus: 30 megs
apollon: 50 megs
etc..
Now, I understand that linux has a different way of dealing with memory (use it if you got it), but it should be freeing it up when needed, correct? My system used up all my ram and switched to swap causing the sluggishness that I noticed. Is this because they're each trying to load up gnome libs or something like that? _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sun Aug 15, 2004 3:54 pm Post subject: |
|
|
Run
and check the second line of output - that'll give you the actual memory locked by processes, and not used for other things.
Do report back here _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Sun Aug 15, 2004 9:50 pm Post subject: |
|
|
Note that I've had free -m lie to me on new kernels aswell, on completly identical installs (including CFLAGS) seeing 40mb memory usage on my laptop and 150mb on my main box (which has way more memory).
I believe sometimes KDE does it's own preloading aswell, which can also eat up some memory.
But it's all available if you need it |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Mon Aug 16, 2004 12:33 am Post subject: |
|
|
adaptr wrote: | Run
and check the second line of output - that'll give you the actual memory locked by processes, and not used for other things.
Do report back here |
Code: |
dat@grendel dat $ free -m
total used free shared buffers cached
Mem: 503 461 41 0 4 102
-/+ buffers/cache: 354 148
Swap: 494 104 389 |
_________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Mon Aug 16, 2004 11:13 am Post subject: |
|
|
whats your cflags?... |
|
Back to top |
|
|
Evangelion Veteran
Joined: 31 May 2002 Posts: 1087 Location: Helsinki, Finland
|
Posted: Mon Aug 16, 2004 12:51 pm Post subject: |
|
|
dat wrote: | adaptr wrote: | Run
and check the second line of output - that'll give you the actual memory locked by processes, and not used for other things.
Do report back here |
Code: |
dat@grendel dat $ free -m
total used free shared buffers cached
Mem: 503 461 41 0 4 102
-/+ buffers/cache: 354 148
Swap: 494 104 389 |
|
354 megs used, with 148 not used. I don't really see anythig out of the ordinary. _________________ My tech-blog | My other blog |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Mon Aug 16, 2004 12:56 pm Post subject: |
|
|
Evangelion wrote: |
354 megs used, with 148 not used. I don't really see anythig out of the ordinary. |
he's swapping... I got 268mb used right now, but I never swap anything, ever.
Sometimes it'll swap a little, but if he's having problems where it's swapping that much I'm thinking something might leak. |
|
Back to top |
|
|
Evangelion Veteran
Joined: 31 May 2002 Posts: 1087 Location: Helsinki, Finland
|
Posted: Mon Aug 16, 2004 1:03 pm Post subject: |
|
|
neuron wrote: | Evangelion wrote: |
354 megs used, with 148 not used. I don't really see anythig out of the ordinary. |
he's swapping... I got 268mb used right now, but I never swap anything, ever. |
Oh yes, didn't check the swap-usage. Maybe some less-used apps are swapped out? Since he has free RAM, I don't see why it would swap.
Quote: | Sometimes it'll swap a little, but if he's having problems where it's swapping that much I'm thinking something might leak. |
If there's a leak, shouldn't he first fill the RAM before he hits swap? _________________ My tech-blog | My other blog |
|
Back to top |
|
|
electrofreak l33t
Joined: 30 Jun 2004 Posts: 713 Location: Ohio, USA
|
Posted: Mon Aug 16, 2004 1:43 pm Post subject: |
|
|
Code: | echo 0 > /proc/sys/vm/swappiness |
|
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Mon Aug 16, 2004 8:57 pm Post subject: |
|
|
Evangelion wrote: | dat wrote: | adaptr wrote: | Run
and check the second line of output - that'll give you the actual memory locked by processes, and not used for other things.
Do report back here |
Code: |
dat@grendel dat $ free -m
total used free shared buffers cached
Mem: 503 461 41 0 4 102
-/+ buffers/cache: 354 148
Swap: 494 104 389 |
|
354 megs used, with 148 not used. I don't really see anythig out of the ordinary. |
This was after I closed firefox, gnome-terminal, and apollon to make my system more responsive. I will try to recreate the issue again, but I'm sure free -m will just show that all the mem is used. Not sure what good that'll do. _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Mon Aug 16, 2004 10:09 pm Post subject: |
|
|
neuron wrote: | whats your cflags?... |
CFLAGS="-O2 -march=i686 -fomit-frame-pointer" _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Thu Aug 19, 2004 11:22 am Post subject: |
|
|
Here's an updated free -m
Code: |
dat@grendel dat $ free -m
total used free shared buffers cached
Mem: 503 499 3 0 1 32
-/+ buffers/cache: 465 37
Swap: 494 277 216
|
What's running? firefox / gnome-terminal / gaim / gnome / waste via wine <- very low mem usage for wine.
Clearly, this should not be using up so much memory that it dips into swap. _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Aug 19, 2004 1:24 pm Post subject: |
|
|
Indeed it should not - unless you have statically compiled processes running multiple times!
Check how you compiled things like apache and the gnome libraries - I can't imagine why they would be static, but you never know...
Also check out the first 20 lines from top when viewed by memory - that should tell you how much memory each of the hoggers is using. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Thu Aug 19, 2004 1:35 pm Post subject: |
|
|
adaptr wrote: | Indeed it should not - unless you have statically compiled processes running multiple times!
Check how you compiled things like apache and the gnome libraries - I can't imagine why they would be static, but you never know...
Also check out the first 20 lines from top when viewed by memory - that should tell you how much memory each of the hoggers is using. |
I compiled via emerge. What flag would I had to of used to make them static? _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Thu Aug 19, 2004 3:03 pm Post subject: |
|
|
I think something isn't right. For comparison, my kde 3.3 gentoo setup in full use (and a few days uptime):
Code: | sindre@sindre ~ $ free -m
total used free shared buffers cached
Mem: 758 753 5 0 37 538
-/+ buffers/cache: 176 581
Swap: 502 0 501 |
kde 3.3 debian unstable setup (kde loaded, and a day uptime or so):
Code: | ivar@k6-3:~$ free -m
total used free shared buffers cached
Mem: 219 108 110 0 2 52
-/+ buffers/cache: 54 165
Swap: 274 0 274 |
Both using kernel 2.6.8.1 and default swappiness. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Aug 19, 2004 6:03 pm Post subject: |
|
|
dat wrote: | I compiled via emerge. What flag would I had to of used to make them static? |
Erm.. "static" ?
But even that isn't the case - my bad...
If you had compiled everything static then the individual binaries would be slightly bigger, but the kernel would still only load one for each executable, no matter how many processes of that binary are spawned.
Do what I said - run top, note the top memory hoggers and if necessary post them. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Thu Aug 19, 2004 11:10 pm Post subject: |
|
|
adaptr wrote: | dat wrote: | I compiled via emerge. What flag would I had to of used to make them static? |
Erm.. "static" ?
But even that isn't the case - my bad...
If you had compiled everything static then the individual binaries would be slightly bigger, but the kernel would still only load one for each executable, no matter how many processes of that binary are spawned.
Do what I said - run top, note the top memory hoggers and if necessary post them. |
The top mem hoggers, as I mentioned before, are normal programs. For instance:
nautilus - 32.3mb
gedit - 26.0mb
gnome-panel 24.4mb
gaim 20.7mb
gnome-system-monitor - 17.7mb
wnck-applet - 17.7mb
(firefox would be up there too, but I just closed it to free up some mem) _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Fri Aug 27, 2004 3:41 pm Post subject: |
|
|
bump..
I ran into this problem again this morning (happens after about 5 or more days of uptime) where I'm seemingly out of memory and the system skips or runs very slow.
Here's the outputs:
Code: |
bash-2.05b$ free -m
total used free shared buffers cached
Mem: 503 499 3 0 0 20
-/+ buffers/cache: 478 24
Swap: 494 168 325
bash-2.05b$
|
Running: xmms gaim gnome
Memory usage as reported by Gnome-System-Monitor (in MB):
Code: |
xmms 56.6
gaim 49.2
nautilus 43.7
gnome-panel 25.7
gnome-vfs-daemon 24.5
gweather-applet-2 22.6
wnck-applet 19.4
gnome-system-monitor 18.5
mini_commander_applet 17.7
multiload-applet-2 17.4
gnome-settings-daemon 16.8
xvnc 16.4
gnome-session 15.3
metacity 14.6
artsd 10.9
gconfd-2 9.9
gnome-smproxy 8.8
fluxbox 6.5
bonobo-activation-server 5
xscreensaver 3.6
|
Am I the only gentoo linux user that this happens to??? _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
danpixley n00b
Joined: 14 Jun 2004 Posts: 66
|
Posted: Sat Aug 28, 2004 2:06 am Post subject: |
|
|
I don't run my Gentoo desktop machine for more than a day, so I've not had the chance to test this (you mentioned that you've kept your machine on for around 5 days before it started using the swap?).
In any case, I am interested to hear a solution to this. In addition, I am wondering if all there is to using "shared" memory is getting rid of the "static" use flag. I do not have the static use flag, and free -m does not report any usage of shared memory on my system (xorg, gnome, etc.)
Code: |
# free -m
total used free shared buffers cached
Mem: 374 363 10 0 8 76
-/+ buffers/cache: 279 95
Swap: 674 0 674
|
Here is my USE flag in /etc/make.conf:
Code: |
USE="3dnow acl acpi aim alsa -arts audiofile bonobo cdr directfb divx4linux dvd
esd ethereal fbdev firebird gb gd gnome gtk gtk2 -kde gps gstreamer icq imap imagemagick java maildir lcms live matrox mime mozilla msn nas network oscar oss pcmcia perl php pnp pdds -qt rtc samba sse theora tiff trusted usb wxwindows xine
xvid yahoo"
|
(edit: I just found that gnome-system-monitor on my system lists processes as using some shared memory. This is found by selecting a process and clicking the "more info" button. Is this "shared memory" something different than what free reports as "shared"? If not, then why the discrepancy?)
Dan
P.S. Sorry to not add any helpful info, dat. Hope my own question was not out of line to post here. If so, let me know to remove it. Thanks! _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906
My site:
http://danpixley.wordpress.com |
|
Back to top |
|
|
danpixley n00b
Joined: 14 Jun 2004 Posts: 66
|
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Sun Aug 29, 2004 2:52 pm Post subject: |
|
|
danpixley wrote: | Re: dat's memory issue. Could it be a bad-hardware issue? A damaged memory stick perhaps?
Dan |
hmm.. well... with much regret, I switched back to kde because the lag was unbearable. kde so far has been running much quicker and on much less memory.
Code: | dat@grendel dat $ free -m
total used free shared buffers cached
Mem: 503 357 146 0 19 76
-/+ buffers/cache: 261 241
Swap: 494 169 325
dat@grendel dat $
|
It's still using a lot but as long as it doesn't take up all of it, I shouldn't experience any lag. I'll have to give it another couple days though just to make sure. _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
catkfr Guru
Joined: 02 Aug 2004 Posts: 300
|
Posted: Sun Aug 29, 2004 8:00 pm Post subject: |
|
|
Hey, I noticed the exact same behavior for the first time today after 10 hours of up time. The memory hoggs are the same as on your system. A few days back, with the same amount of stuff running, I used about 180Mo of memory (in free -m) and am now at 350Mo.
I would imagine this has something to do with something emerged very recently. Maybe you could check the last things installed on your system and compare with my system.
It looks to me as though this is a gnome related issue and the only significant difference over the past few days has been installing gnome-audio and launching the sound server in gnome...
This is the list of my latest emerges:
Code: |
Tue Aug 24 10:09:05 2004 --> media-gfx/gthumb-2.2.1
Tue Aug 24 10:10:05 2004 --> media-gfx/gtksee-0.5.6
Tue Aug 24 10:15:45 2004 --> dev-lang/tcl-8.4.6
Tue Aug 24 10:16:14 2004 --> dev-java/java-config-1.2.9
Tue Aug 24 10:17:48 2004 --> media-sound/alsa-utils-1.0.6
Tue Aug 24 10:18:22 2004 --> dev-java/commons-logging-1.0.4
Tue Aug 24 11:49:10 2004 --> media-gfx/gtkam-0.1.10-r1
Tue Aug 24 11:58:04 2004 --> app-misc/mmv-1.01b
Tue Aug 24 12:05:44 2004 --> app-misc/mved-0.3.5
Tue Aug 24 12:10:18 2004 --> app-misc/mmv-1.01b
Wed Aug 25 12:13:53 2004 --> dev-lang/tk-8.4.6-r1
Wed Aug 25 12:15:16 2004 --> net-print/libgnomecups-0.1.8
Wed Aug 25 12:17:45 2004 --> net-print/gnome-cups-manager-0.18
Wed Aug 25 12:21:20 2004 --> dev-python/pygtk-2.3.96
Wed Aug 25 12:34:40 2004 --> net-im/gaim-0.81-r5
Wed Aug 25 12:37:01 2004 --> x11-plugins/gaim-encryption-2.29
Wed Aug 25 13:08:24 2004 --> gnome-extra/gdesklets-core-0.26.2
Wed Aug 25 22:28:09 2004 --> x11-wm/enlightenment-0.16.7.1
Wed Aug 25 22:28:32 2004 --> x11-themes/etheme-BrushedMetal-Tigert-0.16.7.1
Wed Aug 25 22:28:57 2004 --> x11-themes/etheme-ShinyMetal-0.16.7.1
Wed Aug 25 22:29:27 2004 --> x11-themes/etheme-Ganymede-0.16.7.1
Wed Aug 25 22:29:52 2004 --> x11-themes/etheme-BlueSteel-0.16.7.1
Wed Aug 25 22:30:06 2004 --> x11-themes/ethemes-0.16.7
Thu Aug 26 12:29:11 2004 --> sys-devel/gcc-config-1.3.6-r1
Thu Aug 26 12:29:33 2004 --> kde-base/kde-env-3-r3
Thu Aug 26 12:30:45 2004 --> media-libs/libmatroska-0.7.3
Fri Aug 27 11:31:37 2004 --> sys-libs/zlib-1.2.1-r3
Fri Aug 27 12:07:36 2004 --> sys-devel/gcc-3.3.4-r1
Fri Aug 27 12:10:41 2004 --> dev-python/pygtk-2.2.0
Sat Aug 28 11:19:56 2004 --> gnome-extra/gnome-audio-2.0.0
Sat Aug 28 11:47:26 2004 --> dev-libs/icu-2.8
Sat Aug 28 11:59:41 2004 --> dev-dotnet/mono-1.0.1-r1
Sat Aug 28 12:03:51 2004 --> x11-libs/gtk-sharp-1.0
Sat Aug 28 12:05:48 2004 --> media-sound/muine-0.6.3
Sat Aug 28 12:38:29 2004 --> media-libs/sdl-net-1.2.5
Sat Aug 28 12:42:54 2004 --> games-emulation/dosbox-0.61
Sat Aug 28 12:46:56 2004 --> media-libs/libmpeg2-0.4.0b
Sat Aug 28 12:56:29 2004 --> games-engines/scummvm-0.6.1b
Sat Aug 28 13:29:31 2004 --> dev-java/ant-1.6.2-r3
Sat Aug 28 13:29:57 2004 --> dev-java/bsh-2.0_beta1
Sat Aug 28 13:33:57 2004 --> dev-java/xerces-2.6.2-r1
Sat Aug 28 13:35:52 2004 --> dev-java/jython-bin-2.1-r4
Sat Aug 28 13:36:24 2004 --> dev-java/oro-2.0.8
Sat Aug 28 13:36:56 2004 --> dev-java/commons-net-1.2.2
Sat Aug 28 13:38:17 2004 --> dev-java/rhino-1.5_rc5
Sat Aug 28 13:38:43 2004 --> dev-java/jzlib-1.0.5
Sat Aug 28 13:39:12 2004 --> dev-java/jsch-0.1.15
Sat Aug 28 13:39:32 2004 --> dev-java/regexp-bin-1.3
Sat Aug 28 13:49:02 2004 --> dev-java/bcel-5.1
Sat Aug 28 13:54:47 2004 --> dev-java/xalan-2.5.2
Sat Aug 28 13:58:49 2004 --> dev-java/antlr-2.7.3
Sat Aug 28 14:00:01 2004 --> dev-java/commons-collections-3.1
Sat Aug 28 14:00:35 2004 --> dev-java/commons-beanutils-1.6.1-r1
Sat Aug 28 14:01:12 2004 --> dev-java/jdepend-2.6
Sat Aug 28 14:02:34 2004 --> dev-java/ant-optional-1.6.2-r2
Sat Aug 28 23:52:47 2004 --> media-sound/easytag-0.31
|
|
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
Posted: Sun Aug 29, 2004 8:42 pm Post subject: |
|
|
electrofreak wrote: | Code: | echo 0 > /proc/sys/vm/swappiness |
|
^IAWTP^
Did you try messing with swappiness?
What kernel are you running? |
|
Back to top |
|
|
dat Apprentice
Joined: 04 Jun 2004 Posts: 186 Location: Location: Location: Location: Location: Location:
|
Posted: Sun Aug 29, 2004 9:21 pm Post subject: |
|
|
aethyr wrote: | electrofreak wrote: | Code: | echo 0 > /proc/sys/vm/swappiness |
|
^IAWTP^
Did you try messing with swappiness?
What kernel are you running? |
Just tried the echo now ( I didn't see it before).
I'm running 2.6.7 _________________ HASH BANG SLASH BIN SLASH BASH
in a world without fences, who needs gates? |
|
Back to top |
|
|
jbro164 n00b
Joined: 16 May 2004 Posts: 3
|
Posted: Mon Sep 20, 2004 11:30 pm Post subject: Same Problem |
|
|
I am having similar problems, TOP is outputting that the most mem is used by NTOP (2.5%), then squid (1.9%), ddClient (0.5%) and all the rest have got less than 0.2%. However the current output for free -m is:
Code: | total used free shared buffers cached
Mem: 470 418 52 0 5 21
-/+ buffers/cache: 391 79
Swap: 251 57 193
|
and even more so, when compiling it was about 12mb free for memory and only about 30mb for swap, and the computer was swapping HEAPS as the CPU time was only about 5-10% and the Disk usage was about 2-3MB/s as shown by gkrellm. This keeps going up until the systems eventually crashes.
This is without gnome running, if it is running then the system is basically unusable
The system was all running fine until I installed gnome about a month ago, with uptimes of aroung 60-70 days , now i have had to reboot it at least every 10 days because it has crashed, or is running realy slow
Any Ideas. I am currently doing the emerge -vuD as described above, but am haveing toruble completeing this because of this problem. I will continue on with it slowly however.
Another question, I haven't played around with the swappiness as i am not sure what this does. Is that somthing that may help or not?
Thanks in adavance to any help that you may be ale to give. |
|
Back to top |
|
|
|