From owner-freebsd-hackers@freebsd.org Tue Jul 5 17:35:14 2016 Return-Path: Delivered-To: freebsd-hackers@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 264E9B73113 for ; Tue, 5 Jul 2016 17:35:14 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (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 D131617E2 for ; Tue, 5 Jul 2016 17:35:13 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-qt0-x22e.google.com with SMTP id c34so104445492qte.0 for ; Tue, 05 Jul 2016 10:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jnvYUDvcX2tBjz/VzmuPZ861AVn6KjURI8n5MId/F6I=; b=RmLU+AsQD2KGtVn22pW5mYwDHbUvoap4cVNPkQRXsCmEghE2Z2n/Pcv6suEJZNjgqE gWwXIVlQVAictZYBGKa/Vbyt/CRlcSFet6XpEvS2vn/vmoKXuovj/q0ff6dmlhGFMPIq Q5icKwweiJE8N1IHi4Gvnz2gT/bXgJkh/3BFvvy7UtmFh1R8bF6Gv5Uf6X3ouBlWzzZR Uhygu4p1G5kfzozHLOaAZMf33k1lniOaZLTnmY0BJl1DTerJHTv8uPdfCqqi6tZr60fI SS6PKmgkJtKghdyIHkc4m8oIrfreWu/hHdV87DlBsFnLniwSJnbPa3oeiAguuaYPuGj/ bGWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jnvYUDvcX2tBjz/VzmuPZ861AVn6KjURI8n5MId/F6I=; b=MyzLwKNccu/2bmMT54hAP5wMKrhPUIZH2m5ztG58FbvCCSI9x/E1ACuJg4k6SqfFhy levqIBF1Qc3mVyNtxPFfOSQFh8j+aC18p+YbYPel94StVaB/bUqg0NgozHixxxPUveRx qL8+e8xIf3h2maXJxRb1IxSNhYlXRsHCEmtp72VnK7g1yPHKnqr+IkmZRT2HaNsHxmv7 uYey2C1I5eGWTaefcHMJMv8VWMLnDGaSC5xJUJvTJL6e7FtQPZ060KKc90Mbq436GFBb xmr9MeRWoRXhmiX831DaI3m9JaV8Za1QImDiv3Zfo6H6PMajB5CGkDEdyRql3sJ35Y6A 8wHg== X-Gm-Message-State: ALyK8tLEJ91rC1DNAhGpIkZgv3OERrk/Y0sxu5y6/rZjSgcbk25gX7O2QA5u2pSPMqlkXNrvYKGGeym0gX2S0A== X-Received: by 10.200.52.197 with SMTP id x5mr28376658qtb.41.1467740112904; Tue, 05 Jul 2016 10:35:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.56.93 with HTTP; Tue, 5 Jul 2016 10:35:12 -0700 (PDT) In-Reply-To: <155bc1260e6.12001bf18198857.6272515207330027022@nextbsd.org> References: <20160630140625.3b4aece3@splash.akips.com> <20160703123004.74a7385a@splash.akips.com> <155afb8148f.c6f5294d33485.2952538647262141073@nextbsd.org> <45865ae6-18c9-ce9a-4a1e-6b2a8e44a8b2@denninger.net> <155b84da0aa.ad3af0e6139335.8627172617037605875@nextbsd.org> <7e00af5a-86cd-25f8-a4c6-2d946b507409@denninger.net> <155bc1260e6.12001bf18198857.6272515207330027022@nextbsd.org> From: Freddie Cash Date: Tue, 5 Jul 2016 10:35:12 -0700 Message-ID: Subject: Re: ZFS ARC and mmap/page cache coherency question To: Matthew Macy Cc: Karl Denninger , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 17:35:14 -0000 On Tue, Jul 5, 2016 at 10:19 AM, Matthew Macy wrote: > ---- On Mon, 04 Jul 2016 19:26:06 -0700 Karl Denninger < > karl@denninger.net> wrote ---- > > On 7/4/2016 18:45, Matthew Macy wrote: > > > ---- On Sun, 03 Jul 2016 08:43:19 -0700 Karl Denninger < > karl@denninger.net> wrote ---- > > > > > > > > On 7/3/2016 02:45, Matthew Macy wrote: > > > > > > > > > > Cedric greatly overstates the intractability of > resolving it. Nonetheless, since the initial import very little has been > done to improve integration, and I don't know of anyone who is up to the > task taking an interest in it. Consequently, mmap() performance is likely > "doomed" for the foreseeable future.-M---- > > > > > > > > Wellllll.... > > > > > > > > I've done a fair bit of work here (see > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D187594) and t= he > > > > political issues are at least as bad as the coding ones. > > > > > > Strictly speaking, the root of the problem is the ARC. Not ZFS per > se. Have you ever tried disabling MFU caching to see how much worse LRU > only is? I'm not really convinced the ARC's benefits justify its cost. > > > > The ARC is very useful when it gets a hit as it avoid an I/O that woul= d > > otherwise take place. > > > > Where it sucks is when the system evicts working set to preserve ARC. > > That's always wrong in that you're trading a speculative I/O (if the > > cache is hit later) for a *guaranteed* one (to page out) and maybe *tw= o* > > (to page back in.) > > The question wasn't ARC vs. no-caching. It was LRU only vs LRU + MFU. > There are a lot of issues stemming from the fact that ZFS is a > transactional object store with a POSIX FS on top. One is that it caches > disk blocks as opposed to file blocks. However, if one could resolve that > and have the page cache manage these blocks life would be much much bette= r. > However, you'd lose MFU. Hence my question. > =E2=80=8BAre you confusing terms here? Pretty sure the ARC uses MRU (Most Recently Used) and MFU (Most Frequently Used) caches. Not LRU (Least Recently Used). Or am I misunderstanding what you're trying to say? =E2=80=8B --=20 Freddie Cash fjwcash@gmail.com