From owner-svn-src-head@freebsd.org Fri Aug 25 18:18:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E8B5DDE399 for ; Fri, 25 Aug 2017 18:18:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (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 E1BBC6A9C7 for ; Fri, 25 Aug 2017 18:18:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id 77so2943609itj.0 for ; Fri, 25 Aug 2017 11:18:35 -0700 (PDT) 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=8jl1rNuaRq9ley1VKQr4UgsPu9IBV13XJG/BNyOeoBQ=; b=PJTKc8pDt/N7z7MPQ6IW3MYldjqXVeEiezmP6M8SpTIYMfroJtoq0ynU7Q0frC3j28 JW+cvgvxz7W9SoFrv1Hgk6OCNMA1Nq/fJwYn/CKzVKnQQKtTJAx2+jvdrvSnZ7ErnEz6 JUoovP8c2/a1YEYQIGGDrITC8iP+OldLWACFI67T3PlCOinac1Qftc2YWbPJXlwYPhFR jAM3Jvp6nNsFkHbz41KLblu3qnJFSVcsSTQfltCToTCByp6B5JLxxQ7JHwd5Tv6RqDJt gnqzuhRj4ybG8eXOVya/awKu7/aCpmYYKsjp/DYWmJW9p7fdP8CfGkwA8O2rypF+aKma Mq7g== 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=8jl1rNuaRq9ley1VKQr4UgsPu9IBV13XJG/BNyOeoBQ=; b=F4gMLPJuhoi5gLi8cCbqFcEuhpsUPCY7olkXlDnNNNA3RKayv0bCdjaJmuqImrwUav u9QZhZpeatyiT8CM9p6tvDVlMpPdgmUlD8dQ4f0nAUBPpYqHOQbp+GUJH/UOF/Dz6sxV Ef+dFopwKrnDfJC+XWrZXX2kCW+mn0XU9OAYjpn/MNh395r7B+yKs5OhBh6RXpV+JB6+ obdLhPvolQl/ydmLmwZXg9+rXzBeJpPpwoROzUGmMgzeX5L0M/+7Tt9rq56JDCJ6sGlD 5b6c1xVa3vGqcfUDhSpehMA1fUGsa4MCZ3fyyGQxqcqU/Os2EN2V6BHNi0Wj8TSsvsqW 28EQ== X-Gm-Message-State: AHYfb5iC8pjTVrpEyJYQ9XaJkOHAzYMf4Nr7C6KVbgPfugnQbzMrypOP /L2dee2XJnddx2SyrDQNjdQkbbvVGsNM X-Received: by 10.36.159.194 with SMTP id c185mr283271ite.31.1503685115228; Fri, 25 Aug 2017 11:18:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Fri, 25 Aug 2017 11:18:34 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <201708251759.v7PHxKPD070178@pdx.rh.CN85.dnsmgr.net> References: <201708251759.v7PHxKPD070178@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 25 Aug 2017 12:18:34 -0600 X-Google-Sender-Auth: XwYtFIJgetQN2osBrZcJ8DpLBE4 Message-ID: Subject: Re: svn commit: r322863 - head/sys/cam To: "Rodney W. Grimes" Cc: Slawa Olhovchenkov , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 18:18:36 -0000 On Fri, Aug 25, 2017 at 11:59 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > On Fri, Aug 25, 2017 at 7:35 AM, Slawa Olhovchenkov > wrote: > > > > > On Thu, Aug 24, 2017 at 10:11:10PM +0000, Warner Losh wrote: > > > > > > > Author: imp > > > > Date: Thu Aug 24 22:11:10 2017 > > > > New Revision: 322863 > > > > URL: https://svnweb.freebsd.org/changeset/base/322863 > > > > > > > > Log: > > > > Expand the latency tracking array from 1.024s to 8.192s to help > track > > > > extreme outliers from dodgy drives. Adjust comments to reflect > this, > > > > and make sure that the number of latency buckets match in the two > > > > places where it matters. > > > > > > May be up to 1min? > > > > > > > I'm not sure what additional data you'll get between "totally sucks, at > > least 8s latency" and "totally sucks, at least 32s." or "totally sucks, > at > > least 64s" though the latter isn't possible with the default timeouts... > > > > I'm planning on adding a 'max' latency that's self-resetting instead of > > expanding the bucket upwards. I'm also contemplating expanding it down to > > 100us or even 10us since nda serves nvme drives which easily can be sub > > 100us. > > > > Warner > > What about using a log2/log10 engineering style binning of > 1, 2, 4, 8 us > 10, 20, 40, 80 us > 100, 200, 400, 800 us > ... > 10000000, 20000000, 40000000, 80000000 us > > This would give you a fairly fine grain in the high speed > area and cource grain in the not very likely areas, and > it all fits in a nice 32 ints. > I don't like that at all. it's the worst of both worlds. 1/2/5 makes more sense because the difference between 8 and 10 is tiny, and there's an extra bin per 1000 with your proposal. However, powers of two is completely sufficient to get the data out of the system and is optimal for fitting the fewest bins. Doing either your suggestion or 1/2/5 makes the bins non-uniform, which makes the P99 estimates I'm making from these numbers less accurate mathematically. More bins makes this more expensive since this is a linear search which we do on each I/O. Power of two matches dtrace (though ms instead of us, which I may change). So I'm not inclined to make arbitrary changes here based on aesthetics. I don't see a good reason to do so, and I see only extra costs (including retooling code that I've written to consume this) for changing. Warner