User Tools

Site Tools


zfs:filesystems:set_properties_for_a_filesystem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zfs:filesystems:set_properties_for_a_filesystem [2021/10/13 13:27] peterzfs:filesystems:set_properties_for_a_filesystem [2021/10/13 22:09] (current) – [Deduplication] peter
Line 5: Line 5:
 ---- ----
  
-==== Compression ====+===== Compression =====
  
 <code bash> <code bash>
Line 11: Line 11:
 </code> </code>
  
-----+<WRAP info> 
 +**NOTE:**  The default Compression is lz4.
  
-==== Deduplication ====+  * lz4 is significantly faster than the other options while still performing well;  
 +  * lz4 is also the safest choice. 
  
-ZFS dedup will discard blocks that are identical to existing blocks and will instead use a reference to the existing block.+The compression level can be changed if required:
  
-  * This saves space on the device but comes at a large cost to memory. +<code bash> 
-  * The dedup in-memory table uses ~320 bytes per block. +sudo zfs set compression=gzip-9 testpool 
-  The greater the table is in size, the slower write performance becomes.+</code> 
 + 
 +The compression type can be changed too:
  
 <code bash> <code bash>
-sudo zfs set dedup=on testpool/projects+sudo zfs set compression=lz4 testpool
 </code> </code>
  
-<WRAP info> +The compression level can be checked:
-**NOTE:**  There are pros and cons to deduping.+
  
-  * Generally, Deduplication is almost never worth the performance penalty. +<code bash> 
 +sudo zfs get compressratio 
 +</code>
  
 </WRAP> </WRAP>
Line 34: Line 39:
 ---- ----
  
-==== Copies / Ditto Blocks ====+===== Copies / Ditto Blocks =====
  
 Ditto blocks create more redundant copies of data to copy, just for more added redundancy. Ditto blocks create more redundant copies of data to copy, just for more added redundancy.
Line 51: Line 56:
 </WRAP> </WRAP>
  
 +----
 +
 +===== Deduplication =====
 +
 +ZFS dedup will discard blocks that are identical to existing blocks and will instead use a reference to the existing block.
 +
 +  * This saves space on the device but comes at a large cost to memory.
 +  * The dedup in-memory table uses ~320 bytes per block.
 +  * The greater the table is in size, the slower write performance becomes.
 +
 +<code bash>
 +sudo zfs set dedup=on testpool/projects
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  There are pros and cons to deduping.
 +
 +  * Generally, De-duplication is almost never worth the performance penalty. 
 +
 +</WRAP>
  
 ---- ----
  
-==== Quota ====+===== Mount Point ===== 
 + 
 +<code bash> 
 +zfs set mountpoint=/test testpool/projects 
 +df -h |grep /test 
 +</code> 
 + 
 +---- 
 + 
 +===== Quota =====
  
 <code bash> <code bash>
Line 62: Line 96:
 <WRAP info> <WRAP info>
 **NOTE:**  This sets a maximum quota of 10 gigabytes. **NOTE:**  This sets a maximum quota of 10 gigabytes.
-</WRAP> 
  
 +  * The Filesystem cannott use more than this amount.
 +
 +</WRAP>
  
 ---- ----
 +
 +===== Reservations =====
 +
 +<code bash>
 +sudo zfs set reservation=200m testpool/tmp
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This much space is reserved for the Filesystem.
 +
 +  * It will not be available to other Filesystems.
 +  * When a Quota is defined first, a reservation cannot be higher than quota.
 +
 +</WRAP>
  
  
zfs/filesystems/set_properties_for_a_filesystem.1634131658.txt.gz · Last modified: 2021/10/13 13:27 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki