From owner-freebsd-arm@freebsd.org Mon Aug 6 15:58:45 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05D01105D0FA for ; Mon, 6 Aug 2018 15:58:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73A6D7D514 for ; Mon, 6 Aug 2018 15:58:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x529.google.com with SMTP id h12-v6so6427759pgs.3 for ; Mon, 06 Aug 2018 08:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2TP0RVwqrN+z8JqXwPPSpHWwobUHO4CHzwZSx6Gq3MQ=; b=PWHwBmmxtP8rbzuZyK69ZCbGmAiStf9fohU2hMywg4mxLMSrjJ2Mxbdd0Zj/nJ3c3l gvB4XqgZYa+x5LrCF3YPH4RVf/C7n1vyvgoGxKqdyzy3+40qjbfSdzkfAlni8xvogpbe 8NG3YYwejtMGSgD3hnCPCEuT0iyPRvgSywrR1cs9/mZRO8kYmI1bc43hEdxvgNMKcQGD 2XsUMrd5WO60szTx7pzaFjeoQHv1hoRflN8E9dZoo4qSn4XWjbw6oDfpUOe8P1K52oaF wnoQSocgiwfDmETyB0wfyEDqNBaLfOOpMb5hV8BNfUIVw+ZsmDdbqldifDS3mW9iG/YW 4caQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=2TP0RVwqrN+z8JqXwPPSpHWwobUHO4CHzwZSx6Gq3MQ=; b=GySrDBW8jLbMGz98sVU2xNyUBMog6RM2Wv2fdsUB5oVyDjpBX4wfwFbbeVlimf+I4c M8Kr9tZ2Gf/XfRDS59S38ImPc1DIEUoF+OJNTYCk6HEbyuAb2uH84uSCRNitH3jYQNs+ lS/zkv19wibJF5xkFe8aJqGyWAI6NKZZrhq3fgXFHOc5l+Zrsx1aA0WAN1jKATYbrZDz /JkA8uTBqlEtB+m3+SLSg3X3GlOXleno/oiriWS9z44TX9tzgNYlBQZP8F8CnDC0/wOs 9H4K0cKtXvM6wu04xlLVGjq35gLmwsLG+NyK0K664FZ74I95ztW+syjdk+jrJDhfYT4G p1VA== X-Gm-Message-State: AOUpUlEgrhselk7XgD6MnrT5lyoE1pVq24XdZi8CIdLrRVbnERGEgo1g qFCC/d/Rx/ctsXnpBDiV5JE= X-Google-Smtp-Source: AAOMgpdp3F0xDy5ASvB6GZdu3EmmIzaIpaf4qSrsY11nN10t436EO36xtJgDzpsMcBaRuXuuXz3jpQ== X-Received: by 2002:a63:f45:: with SMTP id 5-v6mr15390566pgp.447.1533571123349; Mon, 06 Aug 2018 08:58:43 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-239.dsl.bell.ca. [70.52.224.239]) by smtp.gmail.com with ESMTPSA id p17-v6sm12080955pgv.26.2018.08.06.08.58.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 08:58:42 -0700 (PDT) Sender: Mark Johnston Date: Mon, 6 Aug 2018 11:58:37 -0400 From: Mark Johnston To: Mark Millard Cc: bob prohaska , freebsd-arm@freebsd.org Subject: Re: RPI3 swap experiments ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"] Message-ID: <20180806155837.GA6277@raichu> References: <20180731191016.GD94742@www.zefox.net> <23793AAA-A339-4DEC-981F-21C7CC4FE440@yahoo.com> <20180731231912.GF94742@www.zefox.net> <2222ABBD-E689-4C3B-A7D3-50AECCC5E7B2@yahoo.com> <20180801034511.GA96616@www.zefox.net> <201808010405.w7145RS6086730@donotpassgo.dyslexicfish.net> <6BFE7B77-A0E2-4FAF-9C68-81951D2F6627@yahoo.com> <20180802002841.GB99523@www.zefox.net> <20180802015135.GC99523@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 15:58:45 -0000 On Wed, Aug 01, 2018 at 09:27:31PM -0700, Mark Millard wrote: > [I have a top-posted introduction here in reply > to a message listed at the bottom.] > > Bob P. meet Mark J. Mark J. meet Bob P. I'm > hopinh you can help Bob P. use a patch that > you once published on the lists. This was from: > > https://lists.freebsd.org/pipermail/freebsd-current/2018-June/069835.html > > Bob P. has been having problems with an rpi3 > based buildworld ending up with "was killed: > out of swap space" but when the swap partitions > do not seem to be heavily used (seen via swapinfo > or watching top). > > > The patch to report OOMA information did its job, very tersely. The console reported > > v_free_count: 5439, v_inactive_count: 1 > > Aug 1 18:08:25 www kernel: pid 93301 (c++), uid 0, was killed: out of swap space > > > > The entire buildworld.log and gstat output are at > > http://www.zefox.net/~fbsd/rpi3/swaptests/r336877M/ > > > > It appears that at 18:08:21 a write to the USB swap device took 530.5 ms, > > next top was killed and ten seconds later c++ was killed, _after_ da0b > > was no longer busy. My suspicion, based on the high latency, is that this is a consequence of r329882, which lowered the period of time that the page daemon will sleep while waiting for dirty pages to be cleaned. If a certain number of consecutive wakeups and queue scans occur without making progress, the OOM killer is triggered. That number is vm.pageout_oom_seq - could you try increasing it by a factor of 10 and retry your test? > > This buildworld stopped a quite a bit earlier than usual; most of the time > > the buildworld.log file is close to 20 MB at the time OOMA acts. In this case > > it was around 13 MB. Not clear if that's of significance. > > > > If somebody would indicate whether this result is informative, and any possible > > improvements to the test, I'd be most grateful. If the above suggestion doesn't help, the next thing to try would be to revert the oom_seq value to the default, apply this patch, and see if the problem continues to occur. If this doesn't help, please try applying both measures, i.e., set oom_seq to 120 _and_ apply the patch. diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index fb56bdf2fdfc..29a16060253f 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -74,7 +74,7 @@ struct vm_pagequeue { } __aligned(CACHE_LINE_SIZE); #ifndef VM_BATCHQUEUE_SIZE -#define VM_BATCHQUEUE_SIZE 7 +#define VM_BATCHQUEUE_SIZE 1 #endif struct vm_batchqueue {