Hi everyone. I’ve just got 11.2 installed and started making my usual tweaks and installations to get things how I like them. I put some system monitoring graphs on the panel at the bottom of the screen and I noticed that it looked like quite a bit of RAM was being used. I’ve always used used these monitoring graphs so I know that, by default, they render themselves useless by having a variable vertical scale. I looked for the options to fix the scale to the size of my RAM (1GB), but found that they’ve been helpfully been removed since KDE 4.x. So to be sure, I opened a terminal and entered cat /proc/meminfo. It showed that after having only Firefox open with 3 tabs (all pages of this forum so no Flash objects etc.) and Ktorrent finishing two small downloads, so much RAM had been used that my swap was starting to be used.
To check this out I shut the PC down completely, switched it back on and booted into run level 3. Entering cat /proc/meminfo immediately after login showed 1,021,516 KB of RAM available to Linux and that 422,724 KB of this 1,021,516 KB (41.4%) had been consumed. I did the same thing again, but this time booted into the full run level 5 desktop and cat /proc/meminfo showed that 546,252 KB (51.8%) had been consumed.
Is there some way I can find out what is eating up so much of my RAM before I even get to my desktop? I always make sure to chuck out that kerry/beagle stuff when I first install a new Suse because I don’t like resources being eaten up by stuff I don’t like and will never find useful.
Have you checked how much of it is just cache?
11.2 eating too much memory - openSUSE Forums
You can type “top” in a terminal to see what’s using the most memory. If you have two computers and you can log in through ssh, boot in runlevel 3, ssh from the other computer and type “top” in your ssh terminal, then type “init 5” on the computer you want to monitor. Or you can start X on several different ways, by typing “gdm”, “xdm”, “kdm” or even “startx”.
ktorrent has extremely inefficient memory management. It doesn’t even support caching and I’ve found that even with 2GB of RAM, when downloading a bit larger torrents (4-7GB) it will ALWAYS eat up all RAM and then begin to swap… this combined with it crashing when you leave it running during the night and freezing the entire desktop for up to a minute during start when one has enabled IP block filters (bz2 format), just did it for me so I moved back to Vuze… A lot say Vuze is a memory hog, but compare it to ktorrent, and you’ll see it’ll never swap (not even when downloading 4 big torrents at the same time)
I suspect that much of it may be cached memory, but I’m not sure yet. As well as allowing you to set its scale, the graph that I used to have in KDE 3 showed what memory was actually being used and what was just cache. Like most of the stuff I used to use in KDE3, it seems that the KDE4 equivelants are either crippled or just gone. The memory graph in KDE4 now is just a single-colour blob.
Surely if most of it was just cache, though, I wouldn’t be having to start eating into my swap so soon. I think I’ve only ever significantly eaten into my swap memory 4 simes since I started using Suse (at version 9.0). Now, my first time on 11.2 with just two programs running and I’m immediately eating into swap. I’ve never had any problems with Ktorrent before, but I don’t have any programs running when I’m checking out the memory usage anyway.
I don’t have much time to test anything out today, but I’ll hopefully post back tomorrow with some more info.
This is a valid point, depending of course on how the modern kernel decides to allocate stuff. I’m not actually sure that it refuses to use swap when memory is available - it may decide that swap is more suited to some tasks. You can of course change its behaviour with ‘swappiness’.
Run ‘free -tm’ to get a good idea of how much memory is actually free (as in not in use as cache) - second row, third column.
I had the exact same issue. I found with ‘top’ that python consumed 15-20% of my CPU time. The reason was ‘screenlets’. I removed screenlets and things are fine now.
Forgive my ignorance, but what is ‘screenlets?’ What does it do and is it needed?
Screenlets is a gnome widget layer - and it won’t be installed unless you deliberately installed it.
on my desktop, with 11.2,
Got 4 GB of RAM used up to 91%
plus 4 GB of swap, randomly used to 20%
on my Laptop, also with 11.2
Got 2GB of RAM used up to 96%
Got 2.4GB of swap randomly used to 12%
Looks like 11.2 go easy on RAM mangement and use whatever is available …
It swaps unnecessary pages to the disk. It’s “by design” and it’s not a deficiency or “Linux using too much memory waa”.
The tests in [Phoronix] Chromium OS, Moblin, Ubuntu Netbook Remix Benchmarks](http://www.phoronix.com/scan.php?page=article&item=chromium_moblin_benchmarks&num=1) suggest there may be a memory leak in openSUSE.
I really dont think such benchmarks are 100% accurate though, as for the OP’s memory issues i think he is relying too much on sysinfo and KDE’s system monitor as both have issues reading memory correctly.
To check out the memory usage, I’ve been using
cat /proc/meminfo | grep -iE '(mem|swap)(total|free)|(swap)?cached|buffers'
to get the information. I couldn’t find any one thing that would always cause swap to get used instead of RAM. It just seems to gradually build up. My main suspicion was that maybe there was a problem with the NVidia driver I’d installed. The only other time I’ve had a system-based problem with Suse was when I had a bad kernel module installed for my wireless card.
I decided to just nuke the whole thing and do a complete re-installation with only the packages that are selected for installation by default. The only exceptions were selecting to not install Open JDK, and marking Kerry and all Beagle components as Taboo. I figured if it was something that I installed then I could hopefully find out what was causing it by starting from scratch and slowly building back up to the system I’d normally have.
After performing a fresh installation I booted into the standard KDE desktop for the first time, opened a terminal window to run top and just left it for a moment whilst prepare_preload and man_db finished running. Once top showed that everything had finished I ran cat /proc/meminfo | grep -iE ‘(mem|swap)(total|free)|(swap)?cached|buffers’ and found that 1.5 MB of swap had been used even though I hadn’t really done anything and there were hundreds of MB of cached RAM available for use. There was even still free RAM that wasn’t even cached.
Surely this can’t be right? Are there any test I can run that might produce some meaningful data that I could pass on to someone that knows a lot more about this stuff than I do?
The kernel uses swap ALWAYS when it’s available - as I stated before this is BY DESIGN, not a flaw in the system.
If you’re not happy about it, adjust swappiness.