lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Mar 2017 18:13:40 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Gerhard Wiesinger <lists@...singer.com>
Cc:     lkml@...garu.com, Minchan Kim <minchan@...nel.org>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: Still OOM problems with 4.9er/4.10er kernels

On Fri 17-03-17 17:37:48, Gerhard Wiesinger wrote:
[...]
> Why does the kernel prefer to swapin/out and not use
> 
> a.) the free memory?

It will use all the free memory up to min watermark which is set up
based on min_free_kbytes.

> b.) the buffer/cache?

the memory reclaim is strongly biased towards page cache and we try to
avoid swapout as much as possible (see get_scan_count).
 
> There is ~100M memory available but kernel swaps all the time ...
> 
> Any ideas?
> 
> Kernel: 4.9.14-200.fc25.x86_64
> 
> top - 17:33:43 up 28 min,  3 users,  load average: 3.58, 1.67, 0.89
> Tasks: 145 total,   4 running, 141 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 19.1 us, 56.2 sy,  0.0 ni,  4.3 id, 13.4 wa, 2.0 hi,  0.3 si,  4.7
> st
> KiB Mem :   230076 total,    61508 free,   123472 used,    45096 buff/cache
> 
> procs -----------memory---------- ---swap-- -----io---- -system--
> ------cpu-----
>  r  b   swpd   free   buff  cache   si   so    bi    bo in   cs us sy id wa st
>  3  5 303916  60372    328  43864 27828  200 41420   236 6984 11138 11 47  6 23 14

I am really surprised to see any reclaim at all. 26% of free memory
doesn't sound as if we should do a reclaim at all. Do you have an
unusual configuration of /proc/sys/vm/min_free_kbytes ? Or is there
anything running inside a memory cgroup with a small limit?
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ