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

Re: Need help analyzing (kernel?) memory usage and reclaiming RAM (Debian Stretch)



Reco <recoverym4n@enotuniq.net> writes:

Hi Reco,

> On Tue, Apr 16, 2019 at 04:39:32PM +0200, Peter Wiersig wrote:
>> VSZ is the Virtual Memory Size. (...),
>>including memory that is swapped out,
>> memory that is allocated, but not used,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> and memory that is from shared libraries.""
>
> Given this:
>
> == cut ==
>
> One can expect the process to "consume" 4Gb of VSZ, and about 700kb of
> RSS.
>
> Do you really suggest to treat all this VSZ as a "used memory"? A hint -
> compile the sample, run it a hundred times.

No, but that is all in the explanation above albeit tersely. I
underlined the part which comes into play with your example code.

If Martin wants to find out what's using his memory during timespans
with degraded performance, it will not be helpful to list the processes
and sort by thenot swapped amount.  If the system is thrashing due to
swapping in and out, I always look at the VSZ values to find out where I
should direct my attention to.

If Martin or if you want, I can explode the the previous sentence about
what VSZ is but you'd probably find better answers if you read about
that.

Feel free to ask, I think I can explain more, but not better than
stackexchange answers or for example LWN kernel article series.

Have fun,
Peter


Reply to: