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

Re: Inexplicable memory usage after move to Debian9



	Hi.

On Fri, Apr 27, 2018 at 12:26:11PM +0000, Eduardo M KALINOWSKI wrote:
> On sex, 27 abr 2018, Simon Beirnaert wrote:
> > The bottom line for me is that I when I shut down everything I install
> > and manage on the system, it's still conuming about half a gig more
> > than a system running the exact same base image right after use, without
> > the extra memory being accounted for by monitoring tools.
> 
> How are you determining what you call "consumed memory"?

OP's original e-mail mentioned free(1), vmstat(1) and smem(1).
All three lie :).


> Keep in mind that the kernel will by default use almost all free memory (not
> actually used by processes and libraries) as cache space, because it makes
> no sense to leave memory just laying around. However, once it's really
> needed, the caches will be dropped. Thus "free" memory is usually reported
> as low. Compare with "available" memory as reported by free.

The free's 'available' value is computed without taking "SUnreclaim"
(unreclaimable kernel slabs) value from /proc/meminfo.
The difference is not that great, usually, but for NFS server it can
lead to funny things like "I have plenty of free swap and OOM killer was
invoked, despite 'available' telling me there's plenty of free RAM".
Can happen with Java too, as OP e-mail shows us.

Happened to me with kernel 4.9.0-5, continued with kernel 4.9.0-6, seems
to be solved by upgrading to backported kernel version 4.14.

Reco


Reply to: