On 9/5/19 1:27 PM, Stefan Priebe - Profihost AG wrote: > Hello all, > > i hope you can help me again to understand the current MemAvailable > value in the linux kernel. I'm running a 4.19.52 kernel + psi patches in > this case. > > I'm seeing the following behaviour i don't understand and ask for help. > > While MemAvailable shows 5G the kernel starts to drop cache from 4G down > to 1G while the apache spawns some PHP processes. After that the PSI > mem.some value rises and the kernel tries to reclaim memory but > MemAvailable stays at 5G. > > Any ideas? PHP seems to use madvise(MADV_HUGEPAGE), so if it's a NUMA machine it might be worth trying to cherry-pick these two commits: 92717d429b38 ("Revert "Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask""") a8282608c88e ("Revert "mm, thp: restore node-local hugepage allocations"") > Thanks! > > Greets, > Stefan > >