[zfs-discuss] Relation between L2ARC and RAM size

Amir Christopher Najmi amir.c.najmi at gmail.com
Thu Feb 8 18:08:33 EST 2018


I think that’s backwards from how you should be thinking about it.

IF you choose to add an l2arc, it will consume/reserve about 1/50th of its total capacity from the ARC. Your ARC should probably be considerably larger than the space l2arc metadata requires .

> On Feb 8, 2018, at 4:49 PM, Rick Dicaire <kritek at gmail.com> wrote:
> 
> Hi, so if I understand correctly, in my case my ARC size is ~24GB, I'd want an l2arc of ~24GBx50?
> 
>> On Wed, Feb 7, 2018 at 9:36 AM, Amir Christopher Najmi via zfs-discuss <zfs-discuss at list.zfsonlinux.org> wrote:
>> Oops! Good catch thanks! :)
>> 
>> On Feb 7, 2018, at 6:48 AM, Edward Ned Harvey (zfsonlinux) <zfsonlinux at nedharvey.com> wrote:
>> 
>> >> From: zfs-discuss [mailto:zfs-discuss-bounces at list.zfsonlinux.org] On Behalf
>> >> Of Amir Christopher Najmi via zfs-discuss
>> >>
>> >> Every record in the l2arc consumes 70 Bytes of space in the ARC.
>> >>
>> >> Generally, the l2arc attempts to cache only random IO, so as a first cut on size
>> >> you might try assuming all of the records are 4K.
>> >>
>> >> 1TB drive = 10^9 Bytes ( decimal power!)
>> >>
>> >> (10^9 Bytes / 4096 kB per record) * (70 Bytes per Record) * ( 1/1024 Bytes per
>> >> kB) * (1/1024 Bytes per MB) = 16.3 MB of memory
>> >>
>> >> Without accounting for any of the details of things like kernel page sizing etc.
>> >
>> > That's the hard way to calculate it. Who needs to be that precise?   ;-)
>> >
>> > The easy way is: Just assume 1/50. Of course it will vary some based on your usage patterns, but it's a pretty good estimate. If you have 1TB L2ARC, assume it will consume 20GB ram. How does that compare with Richard's lower bound estimate of 16.3GB plus kernel page and other stuff?  ;-)  (He wrote the wrong unit of MB on there; he meant GB; the actual flaw is 1TB = 10^12 bytes). It's pretty close. The 50:1 rule of thumb actually works pretty well.
>> _______________________________________________
>> zfs-discuss mailing list
>> zfs-discuss at list.zfsonlinux.org
>> http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20180208/6a556a10/attachment.html>


More information about the zfs-discuss mailing list