From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7EF2C282DD for ; Thu, 9 Jan 2020 21:46:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8260220721 for ; Thu, 9 Jan 2020 21:46:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8260220721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengaru.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F9548E0005; Thu, 9 Jan 2020 16:46:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A9BA8E0001; Thu, 9 Jan 2020 16:46:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C0238E0005; Thu, 9 Jan 2020 16:46:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id E82618E0001 for ; Thu, 9 Jan 2020 16:46:06 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id A09D9180AD804 for ; Thu, 9 Jan 2020 21:46:06 +0000 (UTC) X-FDA: 76359429132.21.silk51_35492c8cabd32 X-HE-Tag: silk51_35492c8cabd32 X-Filterd-Recvd-Size: 2826 Received: from shells.gnugeneration.com (shells.gnugeneration.com [66.240.222.126]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Jan 2020 21:46:06 +0000 (UTC) Received: by shells.gnugeneration.com (Postfix, from userid 1000) id 09BEB1A40239; Thu, 9 Jan 2020 13:46:04 -0800 (PST) Date: Thu, 9 Jan 2020 13:46:04 -0800 From: Vito Caputo To: Pavel Machek Cc: Michal Hocko , kernel list , Andrew Morton , linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: OOM killer not nearly agressive enough? Message-ID: <20200109214604.nfzsksyv3okj3ec2@shells.gnugeneration.com> References: <20200107204412.GA29562@amd> <20200109115633.GR4951@dhcp22.suse.cz> <20200109210307.GA1553@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200109210307.GA1553@duo.ucw.cz> User-Agent: NeoMutt/20170113 (1.7.2) X-Bogosity: Ham, tests=bogofilter, spamicity=0.032534, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 09, 2020 at 10:03:07PM +0100, Pavel Machek wrote: > On Thu 2020-01-09 12:56:33, Michal Hocko wrote: > > On Tue 07-01-20 21:44:12, Pavel Machek wrote: > > > Hi! > > > > > > I updated my userspace to x86-64, and now chromium likes to eat all > > > the memory and bring the system to standstill. > > > > > > Unfortunately, OOM killer does not react: > > > > > > I'm now running "ps aux", and it prints one line every 20 seconds or > > > more. Do we agree that is "unusable" system? I attempted to do kill > > > from other session. > > > > Does sysrq+f help? > > May try that next time. > > > > Do we agree that OOM killer should have reacted way sooner? > > > > This is impossible to answer without knowing what was going on at the > > time. Was the system threshing over page cache/swap? In other words, is > > the system completely out of memory or refaulting the working set all > > the time because it doesn't fit into memory? > > Swap was full, so "completely out of memory", I guess. Chromium does > that fairly often :-(. > Have you considered restricting its memory limits a la `ulimit -m`? I've taken to running browsers in nspawn containers for general isolation improvements, but this also makes it easy to set cgroup resource limits like memcg. i.e. --property MemoryMax=2G This prevents the browser from bogging down the entire system, but it doesn't prevent thrashing before FF OOMs within its control group. I do feel there's a problem with the kernel's reclaim algorithm, it seems far too willing to evict file-backed pages that are recently in use. But at least with memcg this behavior is isolated to the cgroup, though it still generates a crapload of disk reads from all the thrashing. Regards, Vito Caputo