mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Pool allocation classes
Allocation Classes add the ability to have allocation classes in a pool that are dedicated to serving specific block categories, such as DDT data, metadata, and small file blocks. A pool can opt-in to this feature by adding a 'special' or 'dedup' top-level VDEV. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Reviewed-by: Håkan Johansson <f96hajo@chalmers.se> Reviewed-by: Andreas Dilger <andreas.dilger@chamcloud.com> Reviewed-by: DHE <git@dehacked.net> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Gregor Kopka <gregor@kopka.net> Reviewed-by: Kash Pande <kash@tripleback.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #5182
This commit is contained in:
committed by
Brian Behlendorf
parent
cfa37548eb
commit
cc99f275a2
@@ -1719,6 +1719,29 @@ otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
|
||||
Default value: \fB0\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fBzfs_ddt_data_is_special\fR (int)
|
||||
.ad
|
||||
.RS 12n
|
||||
If enabled, ZFS will place DDT data into the special allocation class.
|
||||
.sp
|
||||
Default value: \fB1\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fBzfs_user_indirect_is_special\fR (int)
|
||||
.ad
|
||||
.RS 12n
|
||||
If enabled, ZFS will place user data (both file and zvol) indirect blocks
|
||||
into the special allocation class.
|
||||
.sp
|
||||
Default value: \fB1\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
|
||||
@@ -758,5 +758,27 @@ for the filesystems containing a large number of files.
|
||||
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fB\fBallocation_classes\fR\fR
|
||||
.ad
|
||||
.RS 4n
|
||||
.TS
|
||||
l l .
|
||||
GUID com.intel:allocation_classes
|
||||
READ\-ONLY COMPATIBLE yes
|
||||
DEPENDENCIES none
|
||||
.TE
|
||||
|
||||
This feature enables support for separate allocation classes.
|
||||
|
||||
This feature becomes \fBactive\fR when a dedicated allocation class vdev
|
||||
(dedup or special) is created with zpool create or zpool add. With device
|
||||
removal, it can be returned to the \fBenabled\fR state if all the top-level
|
||||
vdevs from an allocation class are removed.
|
||||
|
||||
.RE
|
||||
|
||||
.SH "SEE ALSO"
|
||||
\fBzpool\fR(8)
|
||||
|
||||
@@ -1522,6 +1522,16 @@ This feature must be enabled to be used
|
||||
.Po see
|
||||
.Xr zpool-features 5
|
||||
.Pc .
|
||||
.It Sy special_small_blocks Ns = Ns Em size
|
||||
This value represents the threshold block size for including small file
|
||||
blocks into the special allocation class. Valid values are zero or a
|
||||
power of two from 512B up to 128K. The default size is 0 which means no
|
||||
small file blocks will be allocated in the special class.
|
||||
.Pp
|
||||
Before setting this property, a special class vdev must be added to the
|
||||
pool. See
|
||||
.Xr zpool 8
|
||||
for more details on the special allocation class.
|
||||
.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
|
||||
Controls the mount point used for this file system.
|
||||
See the
|
||||
|
||||
@@ -278,6 +278,21 @@ However, raidz vdev types are not supported for the intent log.
|
||||
For more information, see the
|
||||
.Sx Intent Log
|
||||
section.
|
||||
.It Sy dedup
|
||||
A device dedicated solely for allocating dedup data.
|
||||
The redundancy of this device should match the redundancy of the other normal
|
||||
devices in the pool. If more than one dedup device is specified, then
|
||||
allocations are load-balanced between devices.
|
||||
.It Sy special
|
||||
A device dedicated solely for allocating various kinds of internal metadata,
|
||||
and optionally small file data.
|
||||
The redundancy of this device should match the redundancy of the other normal
|
||||
devices in the pool. If more than one special device is specified, then
|
||||
allocations are load-balanced between devices.
|
||||
.Pp
|
||||
For more information on special allocations, see the
|
||||
.Sx Special Allocation Class
|
||||
section.
|
||||
.It Sy cache
|
||||
A device used to cache storage pool data.
|
||||
A cache device cannot be configured as a mirror or raidz group.
|
||||
@@ -520,6 +535,29 @@ zfs properties) may be unenforceable while a checkpoint exists, because the
|
||||
checkpoint is allowed to consume the dataset's reservation.
|
||||
Finally, data that is part of the checkpoint but has been freed in the
|
||||
current state of the pool won't be scanned during a scrub.
|
||||
.Ss Special Allocation Class
|
||||
The allocations in the special class are dedicated to specific block types.
|
||||
By default this includes all metadata, the indirect blocks of user data, and
|
||||
any dedup data. The class can also be provisioned to accept a limited
|
||||
percentage of small file data blocks.
|
||||
.Pp
|
||||
A pool must always have at least one general (non-specified) vdev before
|
||||
other devices can be assigned to the special class. If the special class
|
||||
becomes full, then allocations intended for it will spill back into the
|
||||
normal class.
|
||||
.Pp
|
||||
Dedup data can be excluded from the special class by setting the
|
||||
.Sy zfs_ddt_data_is_special
|
||||
zfs module parameter to false (0).
|
||||
.Pp
|
||||
Inclusion of small file blocks in the special class is opt-in. Each dataset
|
||||
can control the size of small file blocks allowed in the special class by
|
||||
setting the
|
||||
.Sy special_small_blocks
|
||||
dataset property. It defaults to zero so you must opt-in by setting it to a
|
||||
non-zero value. See
|
||||
.Xr zfs 8
|
||||
for more info on setting this property.
|
||||
.Ss Properties
|
||||
Each pool has several properties associated with it.
|
||||
Some properties are read-only statistics while others are configurable and
|
||||
|
||||
Reference in New Issue
Block a user