Results 1 to 5 of 5

Thread: Can someone explain memory for me, or "where did my memory go"

  1. #1
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    90

    Default Can someone explain memory for me, or "where did my memory go"

    OK. So I am trying to troubleshoot tvheadend 4.7.0 that has been running fine on OpenSUSE 13.2 for months and now suddenly throws fits. Usually the process just dies and becomes a zombie. When I look at memory:

    Code:
    top - 13:03:48 up 19:23,  2 users,  load average: 1.00, 1.01, 1.03
    Tasks: 195 total,   1 running, 194 sleeping,   0 stopped,   0 zombie
    %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem:   3927980 total,  3474872 used,   453108 free,     2168 buffers
    KiB Swap:  2104316 total,        0 used,  2104316 free.  3145152 cached Mem
    
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
     1616 gdm       20   0 1306764 106576  55560 S 0.000 2.713   0:17.38 gnome-shell
     2445 dalton    20   0 1417356  43100  11324 S 0.000 1.097   1:43.41 tvheadend
     1351 gdm       20   0  946812  30580  24112 S 0.000 0.779   0:01.37 gnome-settings-
     1768 gdm       20   0  688780  29152  22724 S 0.000 0.742   0:00.02 goa-daemon
      566 root      20   0   59824  24676  24252 S 0.000 0.628   0:03.70 systemd-journal
     1164 polkitd   20   0  520592  22496   9008 S 0.000 0.573   0:00.80 polkitd
     1184 root      20   0  139736  20776  10960 S 0.000 0.529   0:00.93 Xorg
     1623 colord    20   0  300408  18860   7592 S 0.000 0.480   0:00.16 colord
     1753 gdm       20   0  332084  15904  13940 S 0.000 0.405   0:00.02 ibus-x11
    Question is: I only have 453108 bytes left, so somehing has eaten 90% of my memory, but what as the two top memory consumers just att up to 3%, or am I not understanding the output from top?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,889
    Blog Entries
    3

    Default Re: Can someone explain memory for me, or "where did my memory go"

    Here's what I am seeing with the "free" command:
    Code:
    % free             total       used       free     shared    buffers     cached
    Mem:       8044892    7839668     205224     233528     310232    2010748
    -/+ buffers/cache:    5518688    2526204
    Swap:     20971516       1124   20970392
    As you can see, most of memory and a tiny bit of swap is in use.

    Linux follows the principle that you paid good money for that memory, so it might as well be use (instead of leaving it idle). So memory contains data or code that has been recently used, just in case it will be used again soon. But if the system is tight on memory, it can quickly free up some of that.

    What you are probably seeing, is evidence that your system is using memory very efficiently.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,235
    Blog Entries
    15

    Default Re: Can someone explain memory for me, or "where did my memory go"

    On Sat 09 Apr 2016 03:06:01 PM CDT, nrickert wrote:

    Here's what I am seeing with the "free" command:

    Code:
    --------------------
    % free total used free shared
    buffers cached Mem: 8044892 7839668 205224
    233528 310232 2010748 -/+ buffers/cache: 5518688 2526204
    Swap: 20971516 1124 20970392

    --------------------

    As you can see, most of memory and a tiny bit of swap is in use.

    Linux follows the principle that you paid good money for that memory, so
    it might as well be use (instead of leaving it idle). So memory
    contains data or code that has been recently used, just in case it will
    be used again soon. But if the system is tight on memory, it can
    quickly free up some of that.

    What you are probably seeing, is evidence that your system is using
    memory very efficiently.


    Hi
    I'm running tvheadend (4.0.9) on 2GB of RAM.... no desktop or epg
    running...
    Code:
    free
    total       used       free     shared    buffers cached
    Mem:       1754544     443608    1310936       2168 1628     310356
    -/+ buffers/cache:     131624    1622920
    Swap:      2097148          0    2097148

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.53-60.30-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  4. #4
    Join Date
    Oct 2015
    Location
    N60 E20
    Posts
    90

    Default Re: Can someone explain memory for me, or "where did my memory go"

    OK. Thanks

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,483
    Blog Entries
    2

    Default Re: Can someone explain memory for me, or "where did my memory go"

    I wrote the following which explains how to read the memory parameters you see in top and free
    https://en.opensuse.org/User:Tsu2/free_tool

    You'll find that the second line is actually possibly more useful than the first line everybody reads.
    Note that if you are changing workloads and want to purge memory buffers, I've provided a command to do that rather than rebooting the system.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Tags for this Thread

Posting Permissions

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