Comments on: ZFS Administration, Part IV- The Adjustable Replacement Cache https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/ Linux. GNU. Freedom. Sat, 10 Nov 2018 10:38:34 +0000 hourly 1 https://wordpress.org/?v=5.1-alpha-43678 By: asmo https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-271429 Mon, 07 Aug 2017 23:09:04 +0000 http://pthree.org/?p=2659#comment-271429 Supposed that there are two zpools on one machine, will there be two separate ARC in memory or will the ARC cache data from both pools?

]]>
By: Anonymous https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-253659 Wed, 28 Oct 2015 19:35:54 +0000 http://pthree.org/?p=2659#comment-253659 In the original arc paper, if a block is hit in B1 or B2 are moved to T2, not to T1 and T2 respectively. Am I wrong?

]]>
By: Cousteau https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-239954 Sat, 08 Aug 2015 22:26:11 +0000 http://pthree.org/?p=2659#comment-239954 Hi,

can you tell me please, is there a need for using ashift when adding a cache or a log device?
When I created my pool, i set ashift=12. So what's about the SSDs I do use as cache and log devices? Are their alignments correct?

]]>
By: Aaron Toponce https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-226537 Thu, 29 Jan 2015 12:16:38 +0000 http://pthree.org/?p=2659#comment-226537 The MFU contains pages that are frequently accessed, but not necessarily recent. Using this diagram, if there are only 4 pages for the MRU and 4 pages for the MFU (for simplicity in this explanation), then the MFU could contain pages that have each been access 100 times. However, the MRU could contain pages that have only been accessed once, but more recent than the 4 pages in the MFU.

In other words, just because a page is in the MFU, doesn't necessarily mean its recent.

On the other hand, whenever a MFU page is accessed again, it will most certainly be in the MRU cache, as the access is recent. This is also shown in the diagram.

So, to simplify things:

* If a block is read, it is always added to the MRU.
* If the same block is read again, it is a candidate for the MFU.
* Any page read from the MFU will be added to the MRU.
* A page read in the MRU may or may not be added to the MFU.

Hope that answers your question.

]]>
By: Vivek https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-226527 Thu, 29 Jan 2015 10:50:48 +0000 http://pthree.org/?p=2659#comment-226527 On the 5th Diagram, under "Arc Algorithm", I am finding it a bit difficult to understand the scenario as depicted in the diagram. On point 3, you explained that Block A is read again and is therefore now a Frequently accessed. This block has two links, one in the MRU and another in the MFU. This is clear. However, on diagram 5, there are certain pages / blocks that have a link only to MFU. In what scenario will a block or page be linked only to MFU and not to MRU ? If a block is read once, it has to be on MRU and the second access onwards, it will be linked to MFU. Also, since it is recently touched, it will maintain a link to MRU as well.

Would appreciate if you can clarify this doubt of mine. I am new to this technology and therefore, your explanation would be of great help.

]]>
By: Aaron Toponce https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-226192 Mon, 26 Jan 2015 13:31:50 +0000 http://pthree.org/?p=2659#comment-226192 Nothing is "required" for partitioning. There is nothing about old or modern drives that requires you to put your partition at sector 2048. By doing so, we improve the performance of advanced format drives, but that doesn't mean that it degrades the performance of non-AF drives. It's only moving the partition to the 1MB boundary. If you want to start your partitions at the 2MB boundary, go for it.

But, as mentioned, the reason for the change was for a deterministic and predictable way to align partition boundaries, ensure the performance of AF drives, and let all partitioning software locate use the same starting point, regardless of the geometry of the disk.

]]>
By: John Naggets https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-226185 Mon, 26 Jan 2015 11:36:22 +0000 http://pthree.org/?p=2659#comment-226185 Dear Aaron, first of all thank you for your complete answer!

Now I was wondering, is this required for both "old" hard disks with 512 bytes per sector as well as newer more modern hard disks with 4 kbytes per sector?

and why 2048 and not 4096 as start for the first partition?

]]>
By: Aaron Toponce https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-225859 Fri, 23 Jan 2015 20:19:18 +0000 http://pthree.org/?p=2659#comment-225859 Starting at sector "2048" with 512 bytes per sector means the starting partition starts at the 1MB boundary. This ensures two things:

1. That the partition is aligned on 4KB boundaries for advanced format drives.
2. It is a software standard that partitions align on 1MB boundaries

The previous alignment of partitions was based on the false assumption that all drives had the same cylinder alignment. However, this is horribly false. Regardless, old utilities used track alignment, rather than byte alignment, to create partitions. Of course, this really isn't an issue for your system, unless you've purchased drives that to cylinder alignment differently, at which point, performance will go in the toilet.

You can read more about it here: http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/disc-partition-alignment.html

And yes, you can, and should use this partition alignment, if you plan on partitioning the disks.

]]>
By: John Naggets https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-225851 Fri, 23 Jan 2015 18:47:10 +0000 http://pthree.org/?p=2659#comment-225851 When you run:

parted /dev/sda unit s mklabel gpt mkpart primary zfs 2048 4G mkpart primary zfs 4G 109418255

why do you start your first partition at 2048 and not at 0? any advantages? and can I do the same?

]]>
By: Aaron Toponce : ZFS Administration, Appendix A- Visualizing The ZFS Intent LOG (ZIL) https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-125165 Tue, 23 Apr 2013 13:45:14 +0000 http://pthree.org/?p=2659#comment-125165 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part X- Creating Filesystems https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-124815 Fri, 19 Apr 2013 10:58:05 +0000 http://pthree.org/?p=2659#comment-124815 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part VIII- Zpool Best Practices and Caveats https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-123124 Mon, 14 Jan 2013 16:16:11 +0000 http://pthree.org/?p=2659#comment-123124 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : Install ZFS on Debian GNU/Linux https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-122033 Thu, 20 Dec 2012 15:09:49 +0000 http://pthree.org/?p=2659#comment-122033 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part II- RAIDZ https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-121896 Tue, 18 Dec 2012 19:34:23 +0000 http://pthree.org/?p=2659#comment-121896 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part I- VDEVs https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-121895 Tue, 18 Dec 2012 19:34:08 +0000 http://pthree.org/?p=2659#comment-121895 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part VII- Zpool Properties https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-121819 Thu, 13 Dec 2012 13:06:55 +0000 http://pthree.org/?p=2659#comment-121819 [...] The Adjustable Replacement Cache (ARC) [...]

]]>
By: Aaron Toponce : ZFS Administration, Part V- Exporting and Importing zpools https://pthree.org/2012/12/07/zfs-administration-part-iv-the-adjustable-replacement-cache/#comment-121555 Mon, 10 Dec 2012 13:00:41 +0000 http://pthree.org/?p=2659#comment-121555 [...] Our previous post finished our discussion about VDEVs by going into great detail about the ZFS ARC. Here, we’ll continue our discussion about ZFS storage pools, how to migrate them across systems by exporting and importing the pools, recovering from destroyed pools, and how to upgrade your storage pool to the latest version. [...]

]]>