From owner-svn-src-all@freebsd.org Fri Aug 25 18:18:36 2017 Return-Path: Delivered-To: svn-src-all@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 16490DDE398 for ; Fri, 25 Aug 2017 18:18:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 CE9A36A9C6 for ; Fri, 25 Aug 2017 18:18:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id f1so2285372ith.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=MLLIYz4A4/b8AVj4HBrpIClewQHXeNXk6OrL9C1UdX3LZHQLuRS/j6pI9vW4Go3sJJ ise7F8nqk7dAdVTXKEHKhQb99DjR/IbarkLOQj4DoWMXtwl7PBEQYJwSmjOcdBXr6UN9 bjCs0kGqhOe/WJCE1R8cKE+gdCSgjwrBPN7ulHl3WkArCm8r3OtHRrOiL1TDQFXtK4o8 qaxSC9d7BsiTZhwsBEPugV7AGQrN0UaVfqPDGOV0BRkkTPqHnHJNch8q9Z3VtibF7CDJ UFVdhMMdIsr9V5m8PKcOkaqobCapkFVoYVSRz1xtAius0xphlXnPfmuQAYBJBOe4kxfS 5S4w== X-Gm-Message-State: AHYfb5jATG6JcesT9bPlhgccw5kf35KFBKgWRRmse3xRS96bdupWC0VN Fdj0ci9gXYjkGwCDiXxnGrn8x+BCd1yL 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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