LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-23-2009, 11:45 AM   #1
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Rep: Reputation: 38
Does anyone what is happening to all my memory?


Hi guys,
Most of the time more than half of my memory is being used at all times. I have 2 GBs of RAM. I just run a fairly standard KDE desktop. What am I missing here? I do not understand what is happening...

$ free
Code:
             total       used       free     shared    buffers     cached
Mem:       2073460    1120388     953072          0     180392     608596
-/+ buffers/cache:     331400    1742060
Swap:      1004052          0    1004052
$ ps aux
Code:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0    772   300 ?        Ss   Mar22   0:00 init [4]
root         2  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S<   Mar22   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S<   Mar22   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   Mar22   0:00 [migration/1]
root         6  0.0  0.0      0     0 ?        S<   Mar22   0:00 [ksoftirqd/1]
root         7  0.0  0.0      0     0 ?        S<   Mar22   0:00 [events/0]
root         8  0.0  0.0      0     0 ?        S<   Mar22   0:00 [events/1]
root         9  0.0  0.0      0     0 ?        S<   Mar22   0:00 [khelper]
root        67  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kblockd/0]
root        68  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kblockd/1]
root        70  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kacpid]
root        71  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kacpi_notify]
root       155  0.0  0.0      0     0 ?        S<   Mar22   0:04 [ata/0]
root       156  0.0  0.0      0     0 ?        S<   Mar22   0:05 [ata/1]
root       157  0.0  0.0      0     0 ?        S<   Mar22   0:00 [ata_aux]
root       158  0.0  0.0      0     0 ?        S<   Mar22   0:00 [ksuspend_usbd]
root       164  0.0  0.0      0     0 ?        S<   Mar22   0:00 [khubd]
root       167  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kseriod]
root       185  0.0  0.0      0     0 ?        S<   Mar22   0:01 [kondemand/0]
root       186  0.0  0.0      0     0 ?        S<   Mar22   0:01 [kondemand/1]
root       209  0.0  0.0      0     0 ?        S    Mar22   0:00 [pdflush]
root       210  0.0  0.0      0     0 ?        S    Mar22   0:00 [pdflush]
root       211  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kswapd0]
root       255  0.0  0.0      0     0 ?        S<   Mar22   0:00 [aio/0]
root       256  0.0  0.0      0     0 ?        S<   Mar22   0:00 [aio/1]
root       963  0.0  0.0      0     0 ?        S<   Mar22   0:00 [scsi_tgtd/0]
root       964  0.0  0.0      0     0 ?        S<   Mar22   0:00 [scsi_tgtd/1]
root       971  0.0  0.0      0     0 ?        S<   Mar22   0:08 [scsi_eh_0]
root       974  0.0  0.0      0     0 ?        S<   Mar22   0:08 [scsi_eh_1]
root       998  0.0  0.0      0     0 ?        S<   Mar22   0:00 [scsi_eh_2]
root      1001  0.0  0.0      0     0 ?        S<   Mar22   0:00 [scsi_eh_3]
root      1035  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kstriped]
root      1044  0.0  0.0      0     0 ?        S<   Mar22   0:00 [kjournald]
root      1098  0.0  0.0   2372   972 ?        S<s  Mar22   0:00 /sbin/udevd --daemon
root      2419  0.0  0.0   2460  1044 ?        Ss   Mar22   0:00 /sbin/mount.ntfs-3g /dev/sda2 /dd -v -o rw,umask=000
root      2462  0.0  0.0   1748   624 ?        Ss   Mar22   0:00 /usr/sbin/syslogd
root      2466  0.0  0.0   1704   424 ?        Ss   Mar22   0:00 /usr/sbin/klogd -c 3 -x
root      2590  0.0  0.0   1740   524 ?        Ss   Mar22   0:00 /usr/sbin/inetd
root      2597  0.0  0.0   1696   564 ?        Ss   Mar22   0:00 /usr/sbin/acpid
81        2608  0.0  0.0   2292   876 ?        Ss   Mar22   0:00 /usr/bin/dbus-daemon --system
82        2613  0.0  0.2   6424  4436 ?        Ss   Mar22   0:00 /usr/sbin/hald --daemon=yes
root      2614  0.0  0.0   3076  1044 ?        S    Mar22   0:00 hald-runner
root      2648  0.0  0.0   3172  1024 ?        S    Mar22   0:00 hald-addon-input: Listening on /dev/input/event4 /dev/input/event3 /dev/input/event2 /dev/input/event1 /dev/input/event6
root      2653  0.0  0.0   3184   984 ?        S    Mar22   0:00 /usr/libexec/hald-addon-cpufreq
82        2654  0.0  0.0   2228   940 ?        S    Mar22   0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
root      2660  0.0  0.0   3172  1016 ?        S    Mar22   0:09 hald-addon-storage: polling /dev/sr0 (every 2 sec)
root      2662  0.0  0.0   3172  1016 ?        S    Mar22   0:09 hald-addon-storage: polling /dev/sr1 (every 2 sec)
root      2664  0.0  0.0   3172   996 ?        S    Mar22   0:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
root      2674  0.0  0.0   1912   640 ?        S    Mar22   0:00 /usr/sbin/crond -l10
daemon    2676  0.0  0.0   1912   416 ?        Ss   Mar22   0:00 /usr/sbin/atd -b 15 -l 1
root      2717  0.0  0.0   1704   528 tty6     Ss+  Mar22   0:00 /sbin/agetty 38400 tty6 linux
root      2718  0.0  0.0   3168   884 ?        Ss   Mar22   0:00 /usr/bin/kdm -nodaemon
root      2722  0.8  3.4  80460 71904 tty7     Ss+  Mar22   6:45 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-WdUbMY
root      2723  0.0  0.0   3472  1172 ?        S    Mar22   0:00 -:0
root      2731  0.0  3.4  80460 71904 tty7     S+   Mar22   0:00 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-WdUbMY
kiki      2744  0.0  0.0   3252  1604 ?        Ss   Mar22   0:00 /bin/sh /usr/bin/startkde
root      2788  0.0  0.0   1548   148 ?        S    Mar22   0:00 start_kdeinit --new-startup +kcminit_startup
kiki      2789  0.0  0.3  24748  7996 ?        Ss   Mar22   0:00 kdeinit Running...
kiki      2792  0.0  0.1  24236  3340 ?        S    Mar22   0:00 dcopserver [kdeinit] --nosid
kiki      2794  0.0  0.4  26404  8828 ?        S    Mar22   0:00 klauncher [kdeinit] --new-startup
kiki      2796  0.0  0.7  32124 16040 ?        S    Mar22   0:02 kded [kdeinit] --new-startup
kiki      2798  0.0  0.0   3184  1480 ?        S    Mar22   0:00 /usr/libexec/gam_server
kiki      2803  0.0  0.0   1684   364 ?        S    Mar22   0:00 kwrapper ksmserver
kiki      2805  0.0  0.4  25472  9968 ?        S    Mar22   0:00 ksmserver [kdeinit]
kiki      2806  0.0  0.8  38800 17356 ?        S    Mar22   0:06 kwin [kdeinit] -session 10d9cad7d3000123711186400000030370
kiki      2808  0.0  0.7  30860 16132 ?        S    Mar22   0:04 kdesktop [kdeinit]
kiki      2810  0.1  1.7  48608 35672 ?        S    Mar22   0:56 kicker [kdeinit]
kiki      2815  0.0  0.9  71204 20004 ?        S    Mar22   0:17 artsd -F 10 -S 4096 -s 60 -m artsmessage -c drkonqi -l 3 -f
kiki      2817  0.0  0.4  25784 10004 ?        S    Mar22   0:00 kaccess [kdeinit]
kiki      2821  0.0  0.7  33608 15432 ?        S    Mar22   0:00 korgac --miniicon korganizer
kiki      2822  0.0  0.6  34512 13408 ?        S    Mar22   0:00 knotify [kdeinit]
kiki      3087  0.0  0.6  29336 13212 ?        S    00:31   0:00 kio_uiserver [kdeinit]
root     25221  0.0  0.0      0     0 ?        S<   06:55   0:00 [scsi_eh_6]
root     25222  0.0  0.0      0     0 ?        S<   06:55   0:00 [usb-storage]
kiki     26055  0.0  0.3  25032  7732 ?        S    10:38   0:00 kio_file [kdeinit] file /tmp/ksocket-kiki/klauncherL7XMsa.
root     26786  0.0  0.0   1872   268 ?        Ss   11:13   0:00 /sbin/dhcpcd -d -t 30 eth0
kiki     26850  0.0  0.0   3252  1584 ?        S    11:13   0:00 /bin/sh /usr/bin/firefox
kiki     26862  0.0  0.0   3304  1648 ?        S    11:13   0:00 /bin/sh /usr/lib/firefox-3.0.7/run-mozilla.sh /usr/lib/firefox-3.0.7/firefox-bin
kiki     26868  1.8  4.2 223220 88560 ?        Sl   11:13   0:20 /usr/lib/firefox-3.0.7/firefox-bin
kiki     27010  0.3  0.7  31504 15280 ?        S    11:30   0:00 konsole [kdeinit] --ls
kiki     27011  0.0  0.0   3628  2000 pts/1    Ss   11:30   0:00 -bash
kiki     27029  0.0  0.0   2564   940 pts/1    R+   11:31   0:00 ps aux
kiki     27030  0.0  0.0   2364   816 pts/1    R+   11:31   0:00 less
$ cat /proc/meminfo
Code:
MemTotal:      2073460 kB
MemFree:        952304 kB
Buffers:        180524 kB
Cached:         608616 kB
SwapCached:          0 kB
Active:         505012 kB
Inactive:       471408 kB
HighTotal:     1178496 kB
HighFree:       375348 kB
LowTotal:       894964 kB
LowFree:        576956 kB
SwapTotal:     1004052 kB
SwapFree:      1004052 kB
Dirty:              44 kB
Writeback:           0 kB
AnonPages:      187224 kB
Mapped:          71140 kB
Slab:            68480 kB
SReclaimable:    59724 kB
SUnreclaim:       8756 kB
PageTables:       1644 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   2040780 kB
Committed_AS:   377636 kB
VmallocTotal:   114680 kB
VmallocUsed:     18304 kB
VmallocChunk:    96204 kB
DirectMap4k:     40960 kB
DirectMap4M:    876544 kB
 
Old 03-23-2009, 11:49 AM   #2
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
This is normal in Linux and is actually one of many benefits of Linux over quite a few other operating systems. It "uses" available memory for cache buffers etc so that it doesn't have to page in/out as frequently, resulting in smoother and better performance both to end-users and applications.
 
Old 03-23-2009, 11:52 AM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You're reading the wrong line in 'free'. You're using 331MB of RAM, and you've got 1742MB free.
The 'missing' memory is being used as filesystem cache, and will be made available as and when it's needed by an application.

Dave
 
Old 03-23-2009, 11:56 AM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
Quote:
total used free shared buffers cached
Mem: 2073460 1120388 953072 0 180392 608596
When you look at this you will find that off the 1.1GB that are used around 600MB are used for caching, another 180 for buffers.
That means that just around 320MB are actually used by running processes, which is okay I'd say.

Linux loves caching, a lot. But will release that memory if necessary.

Check my output:
Quote:
total used free shared buffers cached
Mem: 8196920 8152660 44260 0 954076 3482544
I have 8GB, roughly 3.5 are used for caching, 950MB for buffers. That means that I'm effectively using like 3.5GB of my memory, which is also okay considering that I'm currently running 2 VMs which each have 1GB of RAM assigned.

I once saw a rough 6GB of my RAM used for caches, that's 75% of my total memory.

As said, Linux loves caching.
 
Old 03-23-2009, 12:30 PM   #5
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Original Poster
Rep: Reputation: 38
Thanks so much to all three of you. I was a bit worried there for a second. I feel like an idiot now lol DX
 
Old 03-23-2009, 12:52 PM   #6
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
Quote:
Originally Posted by amiga32 View Post
Thanks so much to all three of you. I was a bit worried there for a second. I feel like an idiot now lol DX
You're most welcome - if you don't ask, you won't learn, so no need to feel like an idiot :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why is this happening!!! Slopey Linux - Hardware 5 11-21-2008 05:44 PM
What is of the happening? crazyness003 LinuxQuestions.org Member Intro 2 12-29-2007 03:50 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
What's Happening? demonfi General 4 08-16-2003 01:40 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration