Where's all my memory going?

I’m a fairly new openSUSE and linux user, first time posting to these forums, so I apologize in advance if this is the wrong forum, but here goes.

I have noticed my machine is not quite as zippy as I was hoping and noticed strange (to me) patterns in my memory usage. Here’s the output from top:

john@linux-yq5y:~> top
top - 22:56:25 up 1 day, 15:23,  1 user,  load average: 0.63, 0.44, 0.34
Tasks: 111 total,   3 running, 108 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.0%us,  2.3%sy,  0.0%ni, 92.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    449624k total,   286388k used,   163236k free,     8912k buffers
Swap:  2096472k total,   222504k used,  1873968k free,    92780k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20475 john      20   0 76540  19m  13m R  2.7  4.4   0:29.40 konsole
 2108 root      20   0  271m  48m 1832 R  2.3 11.1  67:37.86 Xorg
 2932 john      20   0 85096  23m 2692 S  1.7  5.2  27:39.11 knetworkmanager
 2886 john      20   0  160m 9.9m 4116 S  1.0  2.3  28:58.37 knotify4
 1648 messageb  20   0  2696  896  528 S  0.3  0.2   5:38.38 dbus-daemon
 2810 john      20   0 74768 4708 2372 S  0.3  1.0   2:21.31 kded4
    1 root      20   0   772   64   40 S  0.0  0.0   0:02.74 init
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    4 root      15  -5     0    0    0 S  0.0  0.0   0:01.00 ksoftirqd/0
    5 root      15  -5     0    0    0 S  0.0  0.0   0:09.54 events/0
    6 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    7 root      15  -5     0    0    0 S  0.0  0.0   0:02.42 kblockd/0
    8 root      15  -5     0    0    0 S  0.0  0.0   0:16.72 kacpid
    9 root      15  -5     0    0    0 S  0.0  0.0   0:01.40 kacpi_notify
   10 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue
   11 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
   12 root      15  -5     0    0    0 S  0.0  0.0   0:23.70 kondemand/0
   15 root      15  -5     0    0    0 S  0.0  0.0   0:14.98 kswapd0
   16 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0

If you add up all the memory use, it comes out to 24.2%. As you can see, my total memory is 449624k. 449624k * 24.2% = 108809k. So why is my memory listed as 286388k used?

Also, I realize (after previewing my post) that the top output is pretty tough to read - all the spaces seem to get stripped out by the forum software. If it’s hard to read and you can suggest a way to make it more readable, I can repost it.

Most of the time you should see very little free memory as mostly it is cached

Oh, I’m running openSUSE 11.0, KDE 4.0.4, pretty much an out-of-the-box install.

Pardon my ignorance, but what do you mean by it being cached?

I think used includes memory set aside as buffer memory. You can also use ksysguard to monitor activity which is a lot easier to read with its pretty graphs!

Ick:sick:

Either upgrade that kde4 or use kde3

Stable kde4 upgrade you need to add these repos

Index of /repositories/KDE:/KDE4:/STABLE:/Desktop/openSUSE_11.0

Index of /repositories/KDE:/KDE4:/STABLE:/Extra-Apps/openSUSE_11.0

Index of /repositories/KDE:/KDE4:/Community/openSUSE_11.0_KDE4_STABLE_Desktop

You can install kde3 from Yast -Software Management - Patterns

add
kde3base
kde3desktop

disable auto login and you can choose to use kde3 or kde4 at the login screen

Hope that helps

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For example:

<quote>
ab@ablaptop:~> free
total used free shared buffers cached
Mem: 4043336 2529728 1513608 0 208 1408152

  • -/+ buffers/cache:1121368 2921968
    Swap: 1052216 0 1052216
    </quote>

As you can see from my box I have 1.5 GB free space in RAM… but I
don’t have a whole lot open (a dozen or so user-space apps besides
whatever the system and Gnome load on their own)… so, where has all my
space gone? In the last category you can see I have 1.4 GB cached data,
which means data that are on the filesystem but which is beind held in
excess RAM to speed things up. This is a very good thing since it means
an instance performance boost any time my system needs a file that is
already in cache (libraries, documents, executables, etc.) since there
is no need to go all the way to the super-slow (relatively speaking)
hard drive to fetch the data. Cache is also instantly dumped if an
application needs it for something that can’t be done outside RAM so
there really aren’t any downsides.

Good luck.

suburbancow wrote:
> Pardon my ignorance, but what do you mean by it being cached?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJW3oP3s42bA80+9kRAuRCAJ0T7dEKSiPze3n/VJa/hFmvTDnngACbBzZo
63bAOnQhTcRRH+kdaZtUwI0=
=K2fT
-----END PGP SIGNATURE-----

Thanks for your quick responses, caf4926, nzlbob23, and ab@novell.com. And swerdna, thanks for the formatting help.

caf, I’m installing KDE3 as we speak. This has been a good learning experience, now I’ll see what kind of trouble I can get into playing around with different window managers.

There’s no reason I can’t install, say, KDE3, 4, and, say Xfce and try them all out, right? (Other than obvious disk space limitations.)

**

Quite correct to the above.