5,337
edits
Line 33: | Line 33: | ||
zfs list -t snapshot | zfs list -t snapshot | ||
</pre> | </pre> | ||
==Caching== | |||
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. | |||
* L2ARC - you can enable additional caching by adding an L2ARC drive for ARC to overflow to. You will need approx. 20 MB of ram per GB of L2ARC assuming 4k record sizes. | |||
===ARC=== | |||
<code>arc_summary</code> or <code>arcstat</code> will show you the memory used by ARC. This does not appear in <code>htop</code>. | |||
If you want to reduce arc memory usage, you can set limits by creating <code>/etc/modprobe.d/zfs.conf</code>: | |||
{{hidden | <code>/etc/modprobe.d/zfs.conf</code> | | |||
<pre> | |||
# Set Max ARC size => 2GB == 2147483648 Bytes | |||
options zfs zfs_arc_max=2147483648 | |||
# Set Min ARC size => 1GB == 1073741824 | |||
options zfs zfs_arc_min=1073741824 | |||
</pre> | |||
}} | |||
==Pros and Cons== | ==Pros and Cons== |