5,350
edits
Line 37: | Line 37: | ||
ZFS has two read caches: | ZFS has two read caches: | ||
* ARC - this is enabled by default and uses half of your memory. This memory will be released if you approach out of memory. | * ARC - this is enabled by default and uses half of your memory. This memory will be released if you approach out of memory. | ||
* L2ARC - you can enable additional caching by adding an L2ARC drive for ARC to overflow to | * L2ARC - you can enable additional caching by adding an L2ARC drive for ARC to overflow to. | ||
For writes: | For writes: | ||
* SLOG - A separate log, typically an SSD backed mirror to write the ZFS intent log (ZIL). | * SLOG - A separate log, typically an SSD backed mirror to write the ZFS intent log (ZIL). | ||
Line 56: | Line 56: | ||
</pre> | </pre> | ||
}} | }} | ||
===L2ARC=== | |||
L2ARC costs about 80 bytes per record. Historically, this used to be 320 bytes, but now it's mostly negligible.<br> | |||
At the default of 128K record size, 1 GiB has 8196 records, hence requiring approx 656 KiB of memory.<br> | |||
At 4K record size, you will need approx. 20 MB of RAM per GB. | |||
==Pros and Cons== | ==Pros and Cons== |