From owner-freebsd-arm@freebsd.org Sun Mar 4 18:35:14 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 765ADF25C6F for ; Sun, 4 Mar 2018 18:35:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B17968B7A for ; Sun, 4 Mar 2018 18:35:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id c11so6938272ith.4 for ; Sun, 04 Mar 2018 10:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Ba/purXlbLnwcXfHK8yDOR2jkzCsYAHREfqAOVVcR5U=; b=aS/BQMdOuUQ1qoLYq6CsUlapWMhr2H3S5l+e4SUCCt7lOP1HHEKS9EM7xaNv4BAdsS TfICPPAv11jy3MeeROJpYekECVjNEwSco2XZ+CXmuwyp/m2jpvnfHpmaEvgiiol4LPPS PVWzCJBzrQVN0g5fi7/HPiyFLu0c2JhBNVE9Q9mhjoLXodPb5rY4NMI5q84ci3fABcez w1VDkMGj6UVymxPzYO4l8/zahk1dqGCrGW4VW0xzYfw1F5tzVVd5VUsQ0zw1e/B2nW7M ybgO8k/ISrQYoed+ipD6+wo6DpfZ+qr/Q8ZnilUwsdkArS3WcV+Ewzz5QybMxOCB2aqy gzIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Ba/purXlbLnwcXfHK8yDOR2jkzCsYAHREfqAOVVcR5U=; b=ufAqpclD99RutbEO8jjz91YDTElbfm6o4t2xwSb2mFjEduqqvrPTPEauAYU8m5L7wm bSfHUSdnduIoqGocOWU7Gv5miVMxJLFdKNhrh2LTGBYi6yrv94wAKnFWna9eItN9QEtu 0ONx3bnjVIHrfpGp3ngzs3z53HGQoM+8u7taOHNdrlZ3uRhYYWlyb9CyyLSqA4LKzQaK nZRBnLPM/jyNAEJK4tBNY6Q3j2X7lCJQCsEaEp8n0Zf9Io382PoRZFQg0ZhKZoO63sXH ndyW9pmoMn7efLB5YVuHqPiQk25XCz+Iq575DnqRb2DJifWvPUix2zdvSKdrDb7huTfS 8BHg== X-Gm-Message-State: AElRT7HW+Z7fzZEvRhAF422WcljdxEfVYtWUTtz8QrBuwPZtyqlEHB7/ yfPbiRkTL93/5DxEqz7G5+hkX0cTpPEXLTdnk7+NAw== X-Google-Smtp-Source: AG47ELvYc5gUd2Kt2AKdsOkS8832LIpW/Q6xZut/k6tlioLig2AEQvhB+s5L6Raw8LGjgC3bPnUPI8XlxrniaIq6WBE= X-Received: by 10.36.179.8 with SMTP id e8mr11000607itf.36.1520188513206; Sun, 04 Mar 2018 10:35:13 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Sun, 4 Mar 2018 10:35:12 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20180304182831.GA44154@www.zefox.net> References: <20180228170311.GA26187@www.zefox.net> <20180228185517.GB26187@www.zefox.net> <8f422161-885e-aa91-eacd-018540222d65@mgm51.com> <20180228214301.GA29481@www.zefox.net> <20180303162605.GA41874@www.zefox.net> <20180304182831.GA44154@www.zefox.net> From: Warner Losh Date: Sun, 4 Mar 2018 11:35:12 -0700 X-Google-Sender-Auth: BFAkSE7xZeOYK2QkOUvC7qEio8s Message-ID: Subject: Re: Is maximum swap usage tunable? To: bob prohaska Cc: Mike , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:35:14 -0000 On Sun, Mar 4, 2018 at 11:28 AM, bob prohaska wrote: > On Sat, Mar 03, 2018 at 08:26:05AM -0800, bob prohaska wrote: > > > > Is there some sort of experiment which can distinguish hardware delays > > from software delays? For example, would logging gstat output shed any > > light? > > > For lack of any better ideas, I tried running > make -j2 -DNO_CLEAN buildworld > buildworld.log && make -j2 -DNO_CLEAN > KERNCONF= > ZEFOX buildkernel > buildkernel.log > > while also running > gstat -a -B -I 10s > j2_gstat.log & in another ssh session > > In due course the console reported > > FreeBSD/arm64 (www.zefox.org) (ttyu0) > > login: Mar 4 09:28:30 www kernel: pid 9310 (c++), uid 0, was killed: out > of swap space > > as expected. > > However, a grep of j2_gstat revealed a maximum write delay of 30ms/w > for swap on microSD. > > Swap on USB flash is slower, but still generally under 100 ms. > Only a handful of widely spaced delays exceeded 200 ms/w. > gstat doesn't tell you the worst-case. It tells you the average of the requests. This can (and does) hide very long outlier behavior which drives the crazy delayed swap messages. The worst-case events were > dT: 10.002s w: 10.000s > L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name > > 0 6 0 0 0.0 6 113 14.6 3.3 da0b > 0 4 0 0 0.0 4 48 29.0 3.1 da0b > 0 9 5 79 3.0 5 47 7.9 2.6 da0b > 4 8 0 0 0.0 8 99 67.5 32.5 da0b > 0 1 0 13 5.6 1 28 5674 88.3 da0b > 0 0 0 0 0.0 0 38 18.6 0.3 da0b > 0 1 1 9 2.8 0 0 0.0 0.2 da0b > 0 1 1 26 5.1 0 0 0.0 0.4 da0b > 0 0 0 3 2.6 0 0 0.0 0.1 da0b > 0 1 1 9 161.8 0 0 0.0 14.3 da0b > > No "indefinite delay" warnings were presented on the console. > uname -a reports r329893, sources are at 330383. > > I hope this is useful information, > Despite my quibble over what you're measuring (I look at this stuff all the time for Netflix), I think this is quite useful.... Thanks! Warner