Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, is there a way to free up unused memory? I don't know why, but I've been having this problem for the past few days... check this out: Code: # ...
  1. #1
    Just Joined! SnagaDuath's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    52

    Unhappy Memory issue

    Hi,

    is there a way to free up unused memory? I don't know why, but I've been having this problem for the past few days... check this out:

    Code:
    # free
                 total       used       free     shared    buffers     cached
    Mem:       2075180    1996692      78488          0     585040    1041496
    -/+ buffers/cache:     370156    1705024
    Swap:     16466616         36   16466580
    Code:
    # ps -e v
      PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
        1 ?        Ss     0:01      6   535   236   324  0.0 init [5]
        2 ?        S<     0:00      0     0     0     0  0.0 [kthreadd]
        3 ?        S<     0:00      0     0     0     0  0.0 [migration/0]
        4 ?        S<     0:00      0     0     0     0  0.0 [ksoftirqd/0]
        5 ?        S<     0:00      0     0     0     0  0.0 [migration/1]
        6 ?        S<     0:00      0     0     0     0  0.0 [ksoftirqd/1]
        7 ?        S<     0:01      0     0     0     0  0.0 [events/0]
        8 ?        S<     0:00      0     0     0     0  0.0 [events/1]
        9 ?        S<     0:00      0     0     0     0  0.0 [khelper]
       10 ?        S<     0:00      0     0     0     0  0.0 [kblockd/0]
       11 ?        S<     0:00      0     0     0     0  0.0 [kblockd/1]
       12 ?        S<     0:00      0     0     0     0  0.0 [kacpid]
       13 ?        S<     0:00      0     0     0     0  0.0 [kacpi_notify]
       14 ?        S<     0:00      0     0     0     0  0.0 [cqueue]
       15 ?        S<     0:00      0     0     0     0  0.0 [kseriod]
       16 ?        S<     0:10      0     0     0     0  0.0 [kondemand/0]
       17 ?        S<     0:01      0     0     0     0  0.0 [kondemand/1]
       18 ?        S      0:00      0     0     0     0  0.0 [pdflush]
       19 ?        S      0:00      0     0     0     0  0.0 [pdflush]
       20 ?        S<     0:00      0     0     0     0  0.0 [kswapd0]
       21 ?        S<     0:00      0     0     0     0  0.0 [aio/0]
       22 ?        S<     0:00      0     0     0     0  0.0 [aio/1]
       23 ?        S<     0:00      0     0     0     0  0.0 [kpsmoused]
       70 ?        S<     0:01      0     0     0     0  0.0 [ata/0]
       71 ?        S<     0:00      0     0     0     0  0.0 [ata/1]
       72 ?        S<     0:00      0     0     0     0  0.0 [ata_aux]
       75 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_0]
       76 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_1]
       77 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_2]
       78 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_3]
       82 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_4]
       83 ?        S<     0:00      0     0     0     0  0.0 [scsi_eh_5]
      286 ?        S<     0:00      0     0     0     0  0.0 [ksuspend_usbd]
      340 ?        S<     0:00      0     0     0     0  0.0 [khubd]
      577 ?        S<     0:00      0     0     0     0  0.0 [kjournald]
      641 ?        S<s    0:00      0    72  2451  1196  0.0 /sbin/udevd --daemon
     1134 ?        S<     0:00      0     0     0     0  0.0 [khpsbpkt]
     1222 ?        S<     0:00      0     0     0     0  0.0 [btaddconn]
     1224 ?        S<     0:00      0     0     0     0  0.0 [btdelconn]
     1255 ?        S<     0:00      0     0     0     0  0.0 [knodemgrd_0]
     1464 ?        S<s    0:00     10   264  3067  1756  0.0 /usr/sbin/hcid -x -s -f
     1486 ?        S<     0:00      0     0     0     0  0.0 [krfcommd]
     1513 ?        S<     0:00      0     0     0     0  0.0 [kauditd]
     1527 ?        S<     0:00      0     0     0     0  0.0 [kstriped]
     1633 ?        Ss     1:19      0    33  2450  1192  0.0 /sbin/mount.ntfs-3g /de
     1636 ?        Ss     0:01      0    33  2606  1220  0.0 /sbin/mount.ntfs-3g /de
     1639 ?        Ss     0:00      0    33  2450  1000  0.0 /sbin/mount.ntfs-3g /de
     1957 ?        Ss     0:00      0   268  2143  1016  0.0 /bin/dbus-daemon --syst
     1970 ?        Ss     0:00      0    29  1886   672  0.0 /sbin/resmgrd
     1984 ?        Ss     0:00      0   127  2072   736  0.0 /sbin/syslog-ng
     1987 ?        Ss     0:00      0    22  1777   588  0.0 /sbin/klogd -c 1 -x
     1997 ?        Ss     0:00      0    15  1648   572  0.0 /sbin/acpid
     2012 ?        Ssl    0:00      0   108  7643  2388  0.1 /usr/sbin/console-kit-d
     2208 ?        Ss     0:00     23   319  6008  4332  0.2 /usr/sbin/hald --daemon
     2209 ?        S      0:00      0    11  3208  1104  0.0 hald-runner
     2330 ?        S      0:01      1    14  3317  1080  0.0 hald-addon-input: Liste
     2346 ?        S      0:00      1    26  3317  1248  0.0 /usr/lib/hal/hald-addon
     2347 ?        S      0:00      0     8  2195   948  0.0 hald-addon-acpi: listen
     2358 ?        S      0:06      1    17  3318  1180  0.0 hald-addon-storage: pol
     2915 ?        Ss     0:00      0   140  3447   696  0.0 /usr/bin/kdm
     2945 tty7     SLs+  28:59      1  1647 141344 62664  3.0 /usr/bin/Xorg -br -nol
     2950 ?        S      0:00      0   140  4095  1716  0.0 -:0
     2965 ?        Ss     0:00      0    13  1682   452  0.0 /sbin/portmap
     2981 ?        Ss     0:00      2  1890  6317  1712  0.0 /usr/sbin/nmbd -D -s /e
     3213 ?        Ss     0:00      0   623  3636  1488  0.0 /bin/sh /opt/kde3/bin/s
     3323 ?        S<sl   0:00      0    99 10148   712  0.0 /sbin/auditd -s disable
     3325 ?        S<sl   0:00      1    68  9935   716  0.0 /sbin/audispd
     3362 ?        Ss     0:00      0    99  3176  1640  0.0 avahi-daemon: running [
     3477 ?        Ss     0:00      6   374  7213  3008  0.1 /usr/sbin/cupsd
     3503 ?        Ss     0:00      0   399  5929  1104  0.0 /usr/sbin/sshd -o PidFi
     3507 ?        Ss     0:00      0    11  1812   572  0.0 /usr/sbin/avahi-dnsconf
     3509 ?        S      0:00      0   161  4438  1664  0.0 /usr/sbin/powersaved -d
     3527 ?        Ss     0:00     12  5707  9196  3144  0.1 /usr/sbin/smbd -D -s /e
     3591 ?        S      0:00      0     4  1511   148  0.0 start_kdeinit --new-sta
     3604 ?        Ss     0:00      1    39 25500  6084  0.2 kdeinit Running...
     3612 ?        S      0:00      0    39 24752  2756  0.1 dcopserver [kdeinit] --
     3624 ?        S      0:00     42    39 27832  6336  0.3 klauncher [kdeinit] --n
     3626 ?        S      0:00      0    87  8432  1768  0.0 /usr/sbin/libvirtd -d
     3627 ?        Ss     0:00      0    27  6524  1768  0.0 /usr/lib/postfix/master
     3648 ?        S      0:00      0  5707  9152  1028  0.0 /usr/sbin/smbd -D -s /e
     3651 ?        S      0:00      1    50  6345  1736  0.0 qmgr -l -t fifo -u
     3653 ?        Ss     0:00      0    37  2022   608  0.0 /usr/sbin/cron
     3669 ?        S      0:01     34    39 34816 14604  0.7 kded [kdeinit] --new-st
     3772 ?        S      0:00      0   259  3096   716  0.0 /usr/sbin/smartd
     3975 ?        S      0:00      0     8  1643   368  0.0 kwrapper ksmserver
     3978 ?        S      0:00      3    39 27724  8300  0.3 ksmserver [kdeinit]
     4018 tty1     Ss+    0:00      0    15  2136   652  0.0 /sbin/mingetty --noclea
     4019 tty2     Ss+    0:00      0    15  2136   632  0.0 /sbin/mingetty tty2
     4020 tty3     Ss+    0:00      1    15  2136   628  0.0 /sbin/mingetty tty3
     4026 tty4     Ss+    0:00      0    15  2136   628  0.0 /sbin/mingetty tty4
     4030 tty5     Ss+    0:00      0    15  2136   624  0.0 /sbin/mingetty tty5
     4035 tty6     Ss+    0:00      0    15  2136   624  0.0 /sbin/mingetty tty6
     4118 ?        S      0:03     28    39 34716 14904  0.7 kdesktop [kdeinit]
     4120 ?        S      0:16     36    39 38396 17400  0.8 kicker [kdeinit]
     4128 ?        Rl    33:05     14   143 151236 55036  2.6 amarokapp -session 101
     4130 ?        S      0:00     13     1 86554 14212  0.6 /usr/bin/python /usr/bi
     4142 ?        S      0:00      1    39 45676  9864  0.4 knotify [kdeinit]
     4144 ?        S      0:00      1     1 28362 15128  0.7 python /usr/share/scree
     4145 ?        SNl    0:14    124  1872 73387 25764  1.2 beagled /usr/lib/beagle
     4151 ?        S      0:01      0    39 28728  9504  0.4 klipper [kdeinit]
     4153 ?        S      0:00      0    39 30944 12256  0.5 kmix [kdeinit] -autosta
     4156 ?        S      0:00      1    39 30644 10680  0.5 kpowersave [kdeinit]
     4163 ?        S      0:00      1   165 28494 11980  0.5 kbluetooth
     4264 ?        S      0:00      0    20  3299   752  0.0 dbus-launch --autolaunc
     4265 ?        Ss     0:00      0   268  2223   600  0.0 /bin/dbus-daemon --fork
     4272 ?        SL     5:55      1   204 48603 33680  1.6 compiz --replace --sm-d
     4281 ?        Ss     0:21      2    73 18286 10088  0.4 emerald --replace
     4291 ?        S      0:00      0     1  3822  2296  0.1 ruby /opt/kde3/share/ap
     8059 ?        S      0:14     20    39 62528 44496  2.1 konqueror [kdeinit] -mi
     8199 ?        S      0:00      1    39 31540 11316  0.5 kio_uiserver [kdeinit]
     8703 ?        S      0:08     34    39 64708 32328  1.5 konqueror [kdeinit] -mi
     8710 ?        S      0:00      0    39 25900  4820  0.2 kio_file [kdeinit] file
     8817 ?        S      0:00      0     7  5828  1804  0.0 pickup -l -t fifo -u
     9297 ?        Ssl    0:14      2   538 64357 16348  0.7 ksysguard --showprocess
     9298 ?        S      0:06      0   112  3699  1540  0.0 ksysguardd
     9313 ?        S      0:00      0    39 25924  4816  0.2 kio_file [kdeinit] file
     9315 ?        S      0:00      0    39 25792  4760  0.2 kio_file [kdeinit] file
     9319 ?        SN     0:00      0    39 30444  9332  0.4 kio_thumbnail [kdeinit]
     9345 ?        S      0:00      0   623  3372  1376  0.0 /bin/sh /usr/bin/firefo
     9350 ?        Sl     0:14      0    24 172427 78824  3.7 /usr/lib/firefox/firef
     9352 ?        S      0:00      0    48  5151  2324  0.1 /usr/lib/GConf/2/gconfd
     9377 ?        Sl     0:00      0    92 65519 10224  0.4 /usr/lib/nspluginwrappe
     9407 ?        S      0:00      0    39 33436 14124  0.6 konsole [kdeinit] --typ
     9408 pts/1    Ss     0:00      0   623  4108  2120  0.1 bash
     9416 pts/1    S      0:00      0    25  3766  1500  0.0 su
     9419 pts/1    S      0:00      0   623  3848  2076  0.1 bash
     9430 ?        S      0:00      0    39 25924  4784  0.2 kio_file [kdeinit] file
     9438 pts/1    R+     0:00      0    98  2269   792  0.0 ps -e v
    Why does it say 2GB of memory is being used if no process is using it??

    here's more info if you need it:

    # cat /proc/meminfo
    MemTotal: 2075180 kB
    MemFree: 78028 kB
    Buffers: 585100 kB
    Cached: 1041488 kB
    SwapCached: 36 kB
    Active: 513332 kB
    Inactive: 1378564 kB
    HighTotal: 1179584 kB
    HighFree: 1736 kB
    LowTotal: 895596 kB
    LowFree: 76292 kB
    SwapTotal: 16466616 kB
    SwapFree: 16466580 kB
    Dirty: 76 kB
    Writeback: 0 kB
    AnonPages: 265372 kB
    Mapped: 100400 kB
    Slab: 67028 kB
    SReclaimable: 51272 kB
    SUnreclaim: 15756 kB
    PageTables: 3916 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    CommitLimit: 17504204 kB
    Committed_AS: 599828 kB
    VmallocTotal: 110584 kB
    VmallocUsed: 64940 kB
    VmallocChunk: 39412 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB

    # uname -r
    2.6.25.5-1.1-pae

    # uptime
    6:47pm up 17:46, 3 users, load average: 0.60, 0.55, 0.33

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Code:
    # free
                 total       used       free     shared    buffers     cached
    Mem:       2075180    1996692      78488          0     585040    1041496
    -/+ buffers/cache:     370156    1705024
    Swap:     16466616         36   16466580
    You are using ~360MB (370156 KB). The rest is cache and buffers. You can Google for how Linux uses RAM to increase performance through cache/buffers. Most *Nixes have done this for a long time - MSFT has changed memory management in Vista and 2008 to do the same as well.

  3. #3
    Just Joined! SnagaDuath's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    52
    Hi, thanks for replying.

    Ok, that makes sense, but It's quite irritating though because videos in mplayer stutter a bit when there's no RAM left.

    Anyways, I ran the following commands to free the cache (I know it's probably stupid):

    #sync
    #echo 3 > /proc/sys/vm/drop_caches

    that sorts the mplayer problem without restarting, so I'm happy.

    Thanks again!

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Have you tried another player? I like Kaffine. Generally I have no problem with this since Linux allocates and deallocates caches as needed. Linux will use most memory available for caches.

  5. #5
    Just Joined! SnagaDuath's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    52
    I'll try kaffeine next time I have this problem. thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...