-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds two new pool properties: - dedup_table_size, the total size of all DDTs on the pool; and - dedup_table_quota, the maximum possible size of all DDTs in the pool When set, quota will be enforced by checking when a new entry is about to be created. If the pool is over its dedup quota, the entry won't be created, and the corresponding write will be converted to a regular non-dedup write. Note that existing entries can be updated (ie their refcounts changed), as that reuses the space rather than requiring more. dedup_table_quota can be set to 'auto', which will set it based on the size of the devices backing the "dedup" allocation device. This makes it possible to limit the DDTs to the size of a dedup vdev only, such that when the device fills, no new blocks are deduplicated. Sponsored-by: iXsystems, Inc. Sponsored-By: Klara Inc. Co-authored-by: Rob Wing <[email protected]> Co-authored-by: Sean Eric Fagan <[email protected]> Co-authored-by: Allan Jude <[email protected]> Signed-off-by: Rob Norris <[email protected]> Signed-off-by: Don Brady <[email protected]>
- Loading branch information
1 parent
a076382
commit bc82d39
Showing
20 changed files
with
567 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
.\" Copyright (c) 2021, Colm Buckley <[email protected]> | ||
.\" Copyright (c) 2023, Klara Inc. | ||
.\" | ||
.Dd January 2, 2024 | ||
.Dd January 14, 2024 | ||
.Dt ZPOOLPROPS 7 | ||
.Os | ||
. | ||
|
@@ -73,6 +73,8 @@ The amount of storage used by cloned blocks. | |
Percentage of pool space used. | ||
This property can also be referred to by its shortened column name, | ||
.Sy cap . | ||
.It Sy dedup_table_size | ||
Total on-disk size of the deduplication table. | ||
.It Sy expandsize | ||
Amount of uninitialized space within the pool or device that can be used to | ||
increase the total capacity of the pool. | ||
|
@@ -348,6 +350,20 @@ See | |
and | ||
.Xr zpool-upgrade 8 | ||
for more information on the operation of compatibility feature sets. | ||
.It Sy dedup_table_quota Ns = Ns Ar number Ns | Ns Sy none Ns | Ns Sy auto | ||
This property sets a limit on the on-disk size of the pool's dedup table. | ||
Entries will not be added to the dedup table once this size is reached; | ||
if a dedup table already exists, and is larger than this size, they | ||
will not be removed as part of setting this property. | ||
Existing entries will still have their reference counts updated. | ||
The actual size limit of the table may be above or below the quota, | ||
depending on the actual on-disk size of the entries (which may be | ||
approximated for purposes of calculating the quota). That is, setting a | ||
quota size of 1M may result in the maximum size being slightly below, | ||
or slightly above, that value. | ||
Set to 'none' to disable. | ||
In automatic mode, the size of a dedicated dedup vdev is used as the quota | ||
limit. | ||
.It Sy dedupditto Ns = Ns Ar number | ||
This property is deprecated and no longer has any effect. | ||
.It Sy delegation Ns = Ns Sy on Ns | Ns Sy off | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
* Copyright 2011 Nexenta Systems, Inc. All rights reserved. | ||
* Copyright (c) 2012, 2018 by Delphix. All rights reserved. | ||
* Copyright (c) 2021, Colm Buckley <[email protected]> | ||
* Copyright (c) 2021, Klara Inc. | ||
* Copyright (c) 2021, 2023, Klara Inc. | ||
*/ | ||
|
||
#include <sys/zio.h> | ||
|
@@ -125,6 +125,9 @@ zpool_prop_init(void) | |
zprop_register_number(ZPOOL_PROP_BCLONERATIO, "bcloneratio", 0, | ||
PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if cloned>", | ||
"BCLONE_RATIO", B_FALSE, sfeatures); | ||
zprop_register_number(ZPOOL_PROP_DEDUP_TABLE_SIZE, "dedup_table_size", | ||
0, PROP_READONLY, ZFS_TYPE_POOL, "<size>", "DDTSIZE", B_FALSE, | ||
sfeatures); | ||
|
||
/* default number properties */ | ||
zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION, | ||
|
@@ -133,6 +136,9 @@ zpool_prop_init(void) | |
zprop_register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_DEFAULT, | ||
ZFS_TYPE_POOL, "<ashift, 9-16, or 0=default>", "ASHIFT", B_FALSE, | ||
sfeatures); | ||
zprop_register_number(ZPOOL_PROP_DEDUP_TABLE_QUOTA, "dedup_table_quota", | ||
0, PROP_DEFAULT, ZFS_TYPE_POOL, "<size>", "DDTQUOTA", B_FALSE, | ||
sfeatures); | ||
|
||
/* default index (boolean) properties */ | ||
zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1, | ||
|
Oops, something went wrong.