[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Memory Leaks or Mem. being misreported



nito@dismail.de wrote: 
> after upgrading my hardware I started to notice what seemed like memory leaks. 

Did this cause a problem, or are you chasing a number you don't
like?


> 650MiB(with MATE) of RAM are being used and after extended use, when closing all
> gui-programs except a terminal, based on prior experience I would expect the 
> RAM usage to not be more than +120MiB compared to after booting. I am *not* 
> counting file cache/buffers in this (or I severely misunderstand how to read
> free's and top's output).

Why would you think this?

Is this causing a problem for you?

> Or maybe I'm just stupid and misreading top's and free's output.

You are probably reading them correctly but misinterpreting what
the system is doing.

> Also this seems to be hardware specific.

What different hardware have you tried?


> $ free -h
>               total        used        free      shared  buff/cache   available
> Mem:           31Gi       397Mi        30Gi        11Mi       314Mi        30Gi
> Swap:         6,0Gi          0B       6,0Gi
> 
> --After using and closing Firefox
> --(no processes using that much RAM are listed in htop):
> $ free -h
>               total        used        free      shared  buff/cache   available
> Mem:           31Gi       1,1Gi       2,4Gi        13Mi        27Gi        29Gi
> Swap:         6,0Gi          0B       6,0Gi
> 
> 
> --After Backing up which "filled" RAM with file caches:
> $ free -h
>               total        used        free      shared  buff/cache   available
> Mem:           31Gi       471Mi       328Mi        13Mi        30Gi        30Gi
> Swap:         6,0Gi          0B       6,0Gi

This all looks fine. You are barely using your memory. See the
available number at the end? That's what would be available for
programs that want to use it.

> After that (h)top and free are disagreeing on how much memory is being used
> (see SWAP).
> --After Firefox (htop,top and free report more or less the same):
> $ free -h
>               total        used        free      shared  buff/cache   available
> Mem:           31Gi       1,5Gi        27Gi        92Mi       2,7Gi        29Gi
> Swap:         6,0Gi          0B       6,0Gi
> 
> -- After allocating 30GiB and then exiting:
> $ top -b -n 1 | grep "^MiB"
> MiB Mem :  32092,0 total,  27747,1 free,    744,3 used,   3600,6 buff/cache
> MiB Swap:   6144,0 total,   6143,5 free,      0,5 used.  30458,0 avail Mem
> $ free -h
>               total        used        free      shared  buff/cache   available
> Mem:           31Gi       743Mi        27Gi        93Mi       3,5Gi        29Gi
> Swap:         6,0Gi       0,0Ki       6,0Gi
 
That's an insignificant difference caused by rounding methods. 

-dsr-


Reply to: