Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2496894ybl; Thu, 9 Jan 2020 13:53:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwhEDxUxs50pEZVDSurYXYdy5dgLfPm4B+qMHqCKAtjeHW3aHrGRSdyEOtKcU1WgdIDxICZ X-Received: by 2002:aca:110a:: with SMTP id 10mr5090975oir.130.1578606838590; Thu, 09 Jan 2020 13:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578606838; cv=none; d=google.com; s=arc-20160816; b=gFF/ptBFcXVCbMI9awh/AuINChP7lp0to3j3PebZIcKTgo3MrDWTzDhIu80uqMHDQK 5um6/DHxam4XMqkA7V5astAsnLU/YPNN7myzZhwHXvQ77SC45G8SdA8vSl7q0iLS8oML cx8+UbKDGyuyQ6HcB1KhRX58l6XdqiVB1LCoKdp9qmU4o8appjUw/5gZnI2grRoxZBt+ 0gryXx1b3iFwiZpAv+GXaf1Z3XAw5saVr1UAMhARHyYYsxPteFPoDA7aZxvNpNyeergD 3rbt12gsOU/ncS6ne8+/38jfEpNza0mgdQtoCAxnc3H32Iwolup7Y1U3vqe9wbf+fyyg Pdjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nuxoIPGqTXdMmZkuB7EXz/fBahn3T5favW3dJLyXucg=; b=dxqg6K+dk1B2L9b2Rq58EIHsrf9NH36S/OK06DmKSaCguO4ooFK6eappLFc5rsWaK9 QG4LWoq62NmrISTDN/Em/QDQgussEofn+O8022Wcy8alnU1MCK18DinXmHAbMBrnwCj8 WEeUFiZvqVzwIapJ1MuOOjkUDx2yw9gkjz/pIRsP99VLlxq+Zi8mraNoVyBVIlxOYcXM gDmyRAY6t8A7uXow6hZFRhEDkl9FrpeNDuiRqBayrsahc+I7TpmHtum7gRhVNBE7eYUC gOdXoRXOfF9yoGAhhH+WQt3fkyP2QLdpex1SnNQ1tuR/MYdZaof752hfYFdPfEmg43EJ v0Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p62si4321658oig.101.2020.01.09.13.53.46; Thu, 09 Jan 2020 13:53:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728126AbgAIVwp (ORCPT + 99 others); Thu, 9 Jan 2020 16:52:45 -0500 Received: from shells.gnugeneration.com ([66.240.222.126]:60058 "EHLO shells.gnugeneration.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbgAIVwp (ORCPT ); Thu, 9 Jan 2020 16:52:45 -0500 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Jan 2020 16:52:45 EST 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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