From nobody Mon Jun 06 20:08:29 2022 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C44E21BD5F93 for ; Mon, 6 Jun 2022 20:08:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LH4LP3X0Jz59D2 for ; Mon, 6 Jun 2022 20:08:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 520764BAB for ; Mon, 6 Jun 2022 20:08:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 256K8TUB082824 for ; Mon, 6 Jun 2022 20:08:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 256K8Th3082823 for fs@FreeBSD.org; Mon, 6 Jun 2022 20:08:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 209396] ZFS primarycache attribute affects secondary cache as well Date: Mon, 06 Jun 2022 20:08:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bdrewery@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Works As Intended X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654546109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Ry0zL1YXdlAClRB9UBqn9bDrCdlNabC1aOBp6UigNs=; b=nn+u/gl3fMD6H/7RWPy4mhe+OGAswyRX8zVzjh1/EjHHXfjABH4p/H9met3c4NbNpaCcpn GFFEhQnoPeXMpEdJQBXIWOPM9xisQCteA57YtqD0iPb2af7X7UiJbsvqC028GA8F8fTih4 wQC70Wvizvm5GzylyDLXjFYXv8TDhFu9NOKW+GgLpFRGzVDbGV88teUqPN57r+sgnKKooI O21ns2aIilTFMvECIiKd1a5F/MYQDunVUyDusF6aFqzTs6Yyn0WNcpx3YHWJ77RsutrFf8 Ug378YY0ci06sC/atXq070jg7tbRWpc5+7XMI1O9sJH+nbGVhLFwCqao/b5TNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654546109; a=rsa-sha256; cv=none; b=XltmimoD1vnOz6e9cvIuEL4OD3paIjt1XqVd1xh/huRcluV0ESl8pGgeIYYr+Tvmh9hwxS AsnntIzc97DPE2wUER9NPhVQwntl/ngOF8/ndj5f6UZYd6mkk9fujyENH9A0lDx8qE/9NZ +I9oy7uSRiYO5Sik0h0aHw3MbVZLdwttaLmBYGur6bA7aSlhRFqFQAFZ2HcwSvlqqTd0J1 yf904/RorGkncefkoSEadaXb3m8XWTOLrsLURM2zrnEFmQdthIwbhHQdrabqDdRPys0w9V TjuFUVksBIlO4IfKHaMtFkdWxsXPZRYJBiKwRREpXJ2a9HwtH6KUovLtsWog6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209396 Bryan Drewery changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bdrewery@FreeBSD.org Status|New |Closed Resolution|--- |Works As Intended --- Comment #1 from Bryan Drewery --- I didn't realize this until today myself but this is working as intended. L= 2ARC only takes metadata/data from ARC before it is evicted. So if using primarycache=3Dmetadata then data can never make it to L2ARC since it was n= ot in the ARC. https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg45601.html I can't find a great source for this (in a manpage) but the code spells it = out. sys/contrib/openzfs/module/zfs/arc.c * 2. The L2ARC attempts to cache data from the ARC before it is evicted. * It does this by periodically scanning buffers from the eviction-end of * the MFU and MRU ARC lists, copying them to the L2ARC devices if they = are * not already there. It scans until a headroom of buffers is satisfied, * which itself is a buffer for ARC eviction. [...] It also won't cache prefetched data by default. Apparently primarycache=3Dmetadata also effectively disables prefetch (https://github.com/openzfs/zfs/issues/1773) https://github.com/openzfs/zfs/issues/12028 discusses this primary bug's is= sue and the fact that this primary=3Dmetadata,secondary=3Dall setup can lead to= read amplification too. If I've misunderstood and your report is about the fact that already-cached-in-ARC data is not sent to L2arc and you think it should I t= hink a better place to report is https://github.com/openzfs/zfs anyway. I doubt = they would handle that as it's quite a hack to set primarycache=3Dall, cache a b= unch of data, and then change to metadata and expect it to fill up L2arc. Eventu= ally that data would leave the l2arc as well and you would need to manually do t= he hack over again. --=20 You are receiving this mail because: You are the assignee for the bug.=