Source string Read only

(itstool) path: sect3/para
635/6350
Context English State
Forcing 4 KB blocks is also useful on pools where disk upgrades are planned. Future disks are likely to use 4 KB sectors, and <varname>ashift</varname> values cannot be changed after a pool is created.
In some specific cases, the smaller 512-byte block size might be preferable. When used with 512-byte disks for databases, or as storage for virtual machines, less data is transferred during small random reads. This can provide better performance, especially when using a smaller <acronym>ZFS</acronym> record size.
<emphasis><varname>vfs.zfs.prefetch_disable</varname></emphasis> - Disable prefetch. A value of <literal>0</literal> is enabled and <literal>1</literal> is disabled. The default is <literal>0</literal>, unless the system has less than 4 GB of <acronym>RAM</acronym>. Prefetch works by reading larger blocks than were requested into the <link linkend="zfs-term-arc"><acronym>ARC</acronym></link> in hopes that the data will be needed soon. If the workload has a large number of random reads, disabling prefetch may actually improve performance by reducing unnecessary reads. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.vdev.trim_on_init</varname></emphasis> - Control whether new devices added to the pool have the <literal>TRIM</literal> command run on them. This ensures the best performance and longevity for <acronym>SSD</acronym>s, but takes extra time. If the device has already been secure erased, disabling this setting will make the addition of the new device faster. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.vdev.max_pending</varname></emphasis> - Limit the number of pending I/O requests per device. A higher value will keep the device command queue full and may give higher throughput. A lower value will reduce latency. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.top_maxinflight</varname></emphasis> - Maxmimum number of outstanding I/Os per top-level <link linkend="zfs-term-vdev">vdev</link>. Limits the depth of the command queue to prevent high latency. The limit is per top-level vdev, meaning the limit applies to each <link linkend="zfs-term-vdev-mirror">mirror</link>, <link linkend="zfs-term-vdev-raidz">RAID-Z</link>, or other vdev independently. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.l2arc_write_max</varname></emphasis> - Limit the amount of data written to the <link linkend="zfs-term-l2arc"><acronym>L2ARC</acronym></link> per second. This tunable is designed to extend the longevity of <acronym>SSD</acronym>s by limiting the amount of data written to the device. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.l2arc_write_boost</varname></emphasis> - The value of this tunable is added to <link linkend="zfs-advanced-tuning-l2arc_write_max"><varname>vfs.zfs.l2arc_write_max</varname></link> and increases the write speed to the <acronym>SSD</acronym> until the first block is evicted from the <link linkend="zfs-term-l2arc"><acronym>L2ARC</acronym></link>. This <quote>Turbo Warmup Phase</quote> is designed to reduce the performance loss from an empty <link linkend="zfs-term-l2arc"><acronym>L2ARC</acronym></link> after a reboot. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.scrub_delay</varname></emphasis> - Number of ticks to delay between each I/O during a <link linkend="zfs-term-scrub"><command>scrub</command></link>. To ensure that a <command>scrub</command> does not interfere with the normal operation of the pool, if any other <acronym>I/O</acronym> is happening the <command>scrub</command> will delay between each command. This value controls the limit on the total <acronym>IOPS</acronym> (I/Os Per Second) generated by the <command>scrub</command>. The granularity of the setting is determined by the value of <varname>kern.hz</varname> which defaults to 1000 ticks per second. This setting may be changed, resulting in a different effective <acronym>IOPS</acronym> limit. The default value is <literal>4</literal>, resulting in a limit of: 1000 ticks/sec / 4 = 250 <acronym>IOPS</acronym>. Using a value of <replaceable>20</replaceable> would give a limit of: 1000 ticks/sec / 20 = 50 <acronym>IOPS</acronym>. The speed of <command>scrub</command> is only limited when there has been recent activity on the pool, as determined by <link linkend="zfs-advanced-tuning-scan_idle"><varname>vfs.zfs.scan_idle</varname></link>. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.resilver_delay</varname></emphasis> - Number of milliseconds of delay inserted between each I/O during a <link linkend="zfs-term-resilver">resilver</link>. To ensure that a resilver does not interfere with the normal operation of the pool, if any other I/O is happening the resilver will delay between each command. This value controls the limit of total <acronym>IOPS</acronym> (I/Os Per Second) generated by the resilver. The granularity of the setting is determined by the value of <varname>kern.hz</varname> which defaults to 1000 ticks per second. This setting may be changed, resulting in a different effective <acronym>IOPS</acronym> limit. The default value is 2, resulting in a limit of: 1000 ticks/sec / 2 = 500 <acronym>IOPS</acronym>. Returning the pool to an <link linkend="zfs-term-online">Online</link> state may be more important if another device failing could <link linkend="zfs-term-faulted">Fault</link> the pool, causing data loss. A value of 0 will give the resilver operation the same priority as other operations, speeding the healing process. The speed of resilver is only limited when there has been other recent activity on the pool, as determined by <link linkend="zfs-advanced-tuning-scan_idle"><varname>vfs.zfs.scan_idle</varname></link>. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.scan_idle</varname></emphasis> - Number of milliseconds since the last operation before the pool is considered idle. When the pool is idle the rate limiting for <link linkend="zfs-term-scrub"><command>scrub</command></link> and <link linkend="zfs-term-resilver">resilver</link> are disabled. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<emphasis><varname>vfs.zfs.txg.timeout</varname></emphasis> - Maximum number of seconds between <link linkend="zfs-term-txg">transaction group</link>s. The current transaction group will be written to the pool and a fresh transaction group started if this amount of time has elapsed since the previous transaction group. A transaction group my be triggered earlier if enough data is written. The default value is 5 seconds. A larger value may improve read performance by delaying asynchronous writes, but this may cause uneven performance when the transaction group is written. This value can be adjusted at any time with <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<acronym>ZFS</acronym> on i386
Some of the features provided by <acronym>ZFS</acronym> are memory intensive, and may require tuning for maximum efficiency on systems with limited <acronym>RAM</acronym>.
Memory
As a bare minimum, the total system memory should be at least one gigabyte. The amount of recommended <acronym>RAM</acronym> depends upon the size of the pool and which <acronym>ZFS</acronym> features are used. A general rule of thumb is 1 GB of RAM for every 1 TB of storage. If the deduplication feature is used, a general rule of thumb is 5 GB of RAM per TB of storage to be deduplicated. While some users successfully use <acronym>ZFS</acronym> with less <acronym>RAM</acronym>, systems under heavy load may panic due to memory exhaustion. Further tuning may be required for systems with less than the recommended RAM requirements.
Kernel Configuration
Due to the address space limitations of the <trademark>i386</trademark> platform, <acronym>ZFS</acronym> users on the <trademark>i386</trademark> architecture must add this option to a custom kernel configuration file, rebuild the kernel, and reboot:
options KVA_PAGES=512
This expands the kernel address space, allowing the <varname>vm.kvm_size</varname> tunable to be pushed beyond the currently imposed limit of 1 GB, or the limit of 2 GB for <acronym>PAE</acronym>. To find the most suitable value for this option, divide the desired address space in megabytes by four. In this example, it is <literal>512</literal> for 2 GB.
Loader Tunables
The <filename>kmem</filename> address space can be increased on all FreeBSD architectures. On a test system with 1 GB of physical memory, success was achieved with these options added to <filename>/boot/loader.conf</filename>, and the system restarted:
vm.kmem_size="330M"
vm.kmem_size_max="330M"
vfs.zfs.arc_max="40M"
vfs.zfs.vdev.cache.size="5M"
For a more detailed list of recommendations for <acronym>ZFS</acronym>-related tuning, see <link xlink:href="https://wiki.freebsd.org/ZFSTuningGuide"/>.
Additional Resources
<link xlink:href="http://open-zfs.org">OpenZFS</link>
<link xlink:href="https://wiki.freebsd.org/ZFSTuningGuide">FreeBSD Wiki - <acronym>ZFS</acronym> Tuning</link>
<link xlink:href="http://docs.oracle.com/cd/E19253-01/819-5461/index.html">Oracle Solaris <acronym>ZFS</acronym> Administration Guide</link>
<link xlink:href="https://calomel.org/zfs_raid_speed_capacity.html">Calomel Blog - <acronym>ZFS</acronym> Raidz Performance, Capacity and Integrity</link>
<acronym>ZFS</acronym> Features and Terminology
<acronym>ZFS</acronym> is a fundamentally different file system because it is more than just a file system. <acronym>ZFS</acronym> combines the roles of file system and volume manager, enabling additional storage devices to be added to a live system and having the new space available on all of the existing file systems in that pool immediately. By combining the traditionally separate roles, <acronym>ZFS</acronym> is able to overcome previous limitations that prevented <acronym>RAID</acronym> groups being able to grow. Each top level device in a pool is called a <emphasis>vdev</emphasis>, which can be a simple disk or a <acronym>RAID</acronym> transformation such as a mirror or <acronym>RAID-Z</acronym> array. <acronym>ZFS</acronym> file systems (called <emphasis>datasets</emphasis>) each have access to the combined free space of the entire pool. As blocks are allocated from the pool, the space available to each file system decreases. This approach avoids the common pitfall with extensive partitioning where free space becomes fragmented across the partitions.

Loading…

User avatar None

New source string

FreeBSD Doc / books_handbookEnglish

New source string 7 months ago
Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect3/para
Flags
read-only
Source string location
book.translate.xml:40869
String age
7 months ago
Source string age
7 months ago
Translation file
books/handbook.pot, string 6675