SSD上にあるデータだけでも重複排除は効かないか
こんにちは、のんピ(@non____97)です。
皆さんはAmazon FSx for NetApp ONTAP(以降FSxN)のキャパシティプールストレージ上のデータとSSD上のデータ間で重複排除は効くのか気になったことはありますか? 私はあります。
TSSEはFabric Poolのlocal tier(= FSxNの場合SSD)でのみサポートしています。
Temperature-sensitive storage efficiency
Beginning in ONTAP 9.8, temperature-sensitive storage efficiency (TSSE) is available. TSSE uses temperature scans to determine how hot or cold data is and compresses larger or smaller blocks of data accordingly — making storage efficiency more efficient.
Beginning in ONTAP 9.10.1, TSSE is supported on volumes located on FabricPool-enabled local tiers (storage aggregates). TSSE compression-based storage efficiencies are preserved when tiering to cloud tiers. Although more efficient, smaller blocks will require smaller GETs, reducing GET performance from the cloud tier.
そのため、キャパシティプールストレージに階層化すると、キャパシティプールストレージ上で重複排除を効かせることはできません。
では、キャパシティプールストレージ上のデータとSSD上のデータ間でデータが重複している場合は重複排除は効くのでしょうか。
キャパシティプールストレージに階層化したデータのChange logを保持しているのであれば、SSD上のデータに対して重複排除が効きそうな予感はします。
実際に確認してみました。
いきなりまとめ
- キャパシティプールストレージ上のデータとSSD上のデータ間でポストプロセス重複排除は効かない
- つまりはポストプロセス重複排除は実行時にSSD上にあるデータ間でしか動作しない
やってみる
インライン重複排除の無効化
マネジメントコンソールからStorage Efficincyが有効なボリュームを用意しました。
::> set diag
Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y
::*> volume efficiency show -volume vol2 -fields state, policy, storage-efficiency-mode, inline-compression, inline-dedupe, compression, data-compaction, auto-adaptive-compression-savings, auto-adaptive-compression-existing-volume, using-auto-adaptive-compression
vserver volume state policy compression inline-compression storage-efficiency-mode inline-dedupe data-compaction auto-adaptive-compression-savings using-auto-adaptive-compression auto-adaptive-compression-existing-volume
------- ------ ------- ------ ----------- ------------------ ----------------------- ------------- --------------- --------------------------------- ------------------------------- -----------------------------------------
svm vol2 Enabled auto false true efficient true true true true false
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:30:28 Sat Jan 20 13:05:57 2024 Sat Jan 20 13:05:57 2024 0B 0% 0B 316KB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ----- ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 30.40GB 32GB 30.40GB 316KB 0% 0B 0% 0B 316KB 0% 316KB 0% - 316KB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 316KB 0%
Footprint in Performance Tier 2.13MB 100%
Footprint in FSxFabricpoolObjectStore 0B 0%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 1.82MB 0%
File Operation Metadata 4KB 0%
Total Footprint 109.6MB 0%
Effective Total Footprint 109.6MB 0%
デフォルトではインライン重複排除が有効です。
重複排除を効くようなファイルを用意する際に、ボリュームに書き込んだファイルのコピーを作成します。
インライン重複排除はメモリバッファキャッシュ上のデータと比較をして重複排除を行います。そのため、現時点でデータがSSDにあるのかキャパシティプールストレージ上にあるのかは関係ありません。
コピーする際にインライン重複排除が効くと、正確な結果が得られないので事前にインライン重複排除を無効にしておきます。
::*> volume efficiency modify -volume vol2 -inline-dedupe false
::*> volume efficiency show -volume vol2 -fields state, policy, storage-efficiency-mode, inline-compression, inline-dedupe, compression, data-compaction, auto-adaptive-compression-savings, auto-adaptive-compression-existing-volume, using-auto-adaptive-compression
vserver volume state policy compression inline-compression storage-efficiency-mode inline-dedupe data-compaction auto-adaptive-compression-savings using-auto-adaptive-compression auto-adaptive-compression-existing-volume
------- ------ ------- ------ ----------- ------------------ ----------------------- ------------- --------------- --------------------------------- ------------------------------- -----------------------------------------
svm vol2 Enabled auto false true efficient false true true true false
ファイルの書き込み
ボリュームをマウントして、ファイルを書き込みます。
$ sudo mount -t nfs svm-0a7c58a5f3a47283c.fs-012f5aba611482f32.fsx.us-east-1.amazonaws.com:/vol2 /mnt/fsxn/vol2
sh-5.2$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0a7c58a5f3a47283c.fs-012f5aba611482f32.fsx.us-east-1.amazonaws.com:/vol2 nfs4 31G 320K 31G 1% /mnt/fsxn/vol2
$ sudo dd if=/dev/urandom of=/mnt/fsxn/vol2/random_pattern_binary_block_4GiB bs=1M count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 28.3162 s, 152 MB/s
$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0a7c58a5f3a47283c.fs-012f5aba611482f32.fsx.us-east-1.amazonaws.com:/vol2 nfs4 31G 4.1G 27G 14% /mnt/fsxn/vol2
書き込み後のStorage Efficiencyとボリュームの情報は以下のとおりです。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:37 Sat Jan 20 13:38:18 2024 Sat Jan 20 13:38:26 2024 3.64GB 1% 3.57MB 4.08GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 26.32GB 32GB 30.40GB 4.08GB 13% 0B 0% 0B 4.08GB 13% 4.08GB 13% - 4.08GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.08GB 0%
Footprint in Performance Tier 4.08GB 100%
Footprint in FSxFabricpoolObjectStore 0B 0%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 21.88MB 0%
Deduplication 21.88MB 0%
Delayed Frees 5.49MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.21GB 0%
Effective Total Footprint 4.21GB 0%
last-op-size
が0Bから3.64GBになっていることからStorage Efficiencyが実行されたようです。
ただし、書き込んだファイルが/dev/urandom
から生成したランダムなデータブロックのバイナリファイルであるため重複排除は効いていません。
また、現時点ではTiering PolicyをNoneにしているのでキャパシティプールストレージへの階層化は行われていません。
Tiering PolicyをAllに変更
Tiering PolicyをAllに変更して、キャパシティプールストレージに階層化します。
::*> volume modify -volume vol2 -tiering-policy all
Volume modify successful on volume vol2 of Vserver svm.
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.08GB 0%
Footprint in Performance Tier 4.08GB 100%
Footprint in FSxFabricpoolObjectStore 0B 0%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 21.88MB 0%
Deduplication 21.88MB 0%
Delayed Frees 5.63MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.21GB 0%
Effective Total Footprint 4.21GB 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.08GB 0%
Footprint in Performance Tier 103.9MB 2%
Footprint in FSxFabricpoolObjectStore
4GB 98%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 21.88MB 0%
Deduplication 21.88MB 0%
Delayed Frees 23.84MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.23GB 0%
Effective Total Footprint 4.23GB 0%
4GBのデータがキャパシティプールストレージに階層化されました。
階層化後のStorage Efficiencyとボリュームの情報は以下のとおりです。特に変わりありません。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:03:18 Sat Jan 20 13:38:18 2024 Sat Jan 20 13:38:26 2024 3.64GB 1% 3.63MB 4.08GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 26.32GB 32GB 30.40GB 4.08GB 13% 0B 0% 0B 4.08GB 13% 4.08GB 13% - 4.08GB - -
Tiering PolicyをNoneに変更
コピーしたファイルがキャパシティプールストレージに階層化されないようにTiering PolicyをNoneに変更します。
また、cloud-retrieval-policy
をnever
に変更して、ファイルをコピーする際にキャパシティプールストレージ上のデータがSSDに書き戻されないようにします。
::*> volume modify -volume vol2 -tiering-policy none -cloud-retrieval-policy ?
default Retrieve tiered data based on the tiering policy
on-read Retrieve tiered data on data reads
never Never retrieve tiered data
promote Retrieve all eligible tiered data automatically during the next scheduled scan. If the tiering policy is 'snapshot-only', the only data brought back is the data
in the AFS
::*> volume modify -volume vol2 -tiering-policy none -cloud-retrieval-policy never
Volume modify successful on volume vol2 of Vserver svm.
変更後SSDへの書き戻しが発生していないことを確認します。
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.08GB 0%
Footprint in Performance Tier 104.2MB 2%
Footprint in FSxFabricpoolObjectStore
4GB 98%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 21.88MB 0%
Deduplication 21.88MB 0%
Delayed Frees 24.11MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.23GB 0%
Effective Total Footprint 4.23GB 0%
ファイルのコピー
ファイルをコピーします。コピー後コピーされた分が重複排除されたか確認します。
$ sudo cp /mnt/fsxn/vol2/random_pattern_binary_block_4GiB /mnt/fsxn/vol2/random_pattern_binary_block_4GiB_copy
$ ls -l /mnt/fsxn/vol2
total 8421656
-rw-r--r--. 1 root root 4294967296 Jan 20 13:38 random_pattern_binary_block_4GiB
-rw-r--r--. 1 root root 4294967296 Jan 20 13:45 random_pattern_binary_block_4GiB_copy
$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0a7c58a5f3a47283c.fs-012f5aba611482f32.fsx.us-east-1.amazonaws.com:/vol2 nfs4 31G 8.2G 23G 27% /mnt/fsxn/vol2
Storage Efficiencyの状態を確認します。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- --------------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 1071384 KB (31%) Done Sat Jan 20 13:38:18 2024 Sat Jan 20 13:38:26 2024 3.64GB 5% 53.82MB 8.14GB
Storage Efficiencyが実行されていますね。
しばらく待ってから再度Storage Efficinecyとボリュームの情報を確認します。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:14 Sat Jan 20 13:44:55 2024 Sat Jan 20 13:47:24 2024 3.61GB 12% 39.96MB 8.20GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 22.23GB 32GB 30.40GB 8.17GB 26% 36.13MB 0% 36.13MB 8.17GB 26% 8.20GB 27% - 8.20GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.17GB 1%
Footprint in Performance Tier 4.20GB 51%
Footprint in FSxFabricpoolObjectStore
4GB 49%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 24.06MB 0%
Deduplication 24.06MB 0%
Delayed Frees 30.12MB 0%
File Operation Metadata 4KB 0%
Total Footprint 8.32GB 1%
Effective Total Footprint 8.32GB 1%
36.13MBしか重複排除されていません。
手動でStorage Efficiencyを実行
手動でStorage Efficiencyを実行してみます。
::*> volume efficiency start -volume vol2
The efficiency operation for volume "vol2" of Vserver "svm" has started.
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ------------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 8388600 KB Searched Sat Jan 20 13:44:55 2024 Sat Jan 20 13:47:24 2024 3.61GB 0% 40MB 8.20GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:16 Sat Jan 20 13:49:14 2024 Sat Jan 20 13:49:23 2024 4GB 2% 7.50MB 8.15GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 22.26GB 32GB 30.40GB 8.14GB 26% 12.50MB 0% 12.50MB 8.14GB 25% 8.15GB 27% - 8.15GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.14GB 1%
Footprint in Performance Tier 4.17GB 51%
Footprint in FSxFabricpoolObjectStore
4GB 49%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 43.59MB 0%
Deduplication 43.59MB 0%
Delayed Frees 32.18MB 0%
File Operation Metadata 4KB 0%
Total Footprint 8.32GB 1%
Effective Total Footprint 8.32GB 1%
重複排除量は増えませんでした。むしろ36.13MBから12.50MBに減少しました。
以下記事で以前のポストプロセス重複排除でスキャン済みのデータブロックとの重複排除が効くことは確認しています。
キャパシティプールストレージ上のデータとの重複排除を効かせることはできないのでしょうか。
-scan-old-data
オプションを付与して再度チャレンジします。
::*> volume efficiency start -volume vol2 -scan-old-data
Warning: This operation scans all of the data in volume "vol2" of Vserver "svm". It might take a significant time, and degrade performance during that time.
Do you want to continue? {y|n}: y
The efficiency operation for volume "vol2" of Vserver "svm" has started.
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-endvserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ------------------ ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 2981888 KB Scanned Sat Jan 20 13:49:14 2024 Sat Jan 20 13:49:23 2024 4GB 0% 0B 8.05GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:10 Sat Jan 20 13:51:30 2024 Sat Jan 20 13:51:48 2024 4GB 0% 0B 8.08GB
::*> date show -fields date
(cluster date show)
node date
------------------------- -------------------------
FsxId012f5aba611482f32-01 1/20/2024 13:52:05 +00:00
FsxId012f5aba611482f32-02 1/20/2024 13:52:05 +00:00
2 entries were displayed.
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:17 Sat Jan 20 13:51:30 2024 Sat Jan 20 13:51:48 2024 4GB 0% 0B 8.08GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ---- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 32GB 22.32GB 32GB 30.40GB 8.08GB 26% 0B 0% 0B 8.08GB 25% 8.08GB 27% - 8.08GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.08GB 1%
Footprint in Performance Tier 4.11GB 51%
Footprint in FSxFabricpoolObjectStore
4GB 49%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 24.06MB 0%
Deduplication 24.06MB 0%
Delayed Frees 34.20MB 0%
File Operation Metadata 4KB 0%
Total Footprint 8.24GB 1%
Effective Total Footprint 8.24GB 1%
重複排除量が12.50MBから0Bに減少しました。last-op-size
は4GBであることからSSD上のデータのみをスキャンして、スキャンしたデータ上間で重複排除を効かせようとしたのではないかと考えます。
Change logにオリジナルのファイルとコピーしたファイルが含まれるようにしてStorage Efficiencyを実行
インライン重複排除の無効化
次にChange logにオリジナルのファイルとコピーしたファイルが含まれるようにしてStorage Efficiencyを実行します。
先ほどの検証ではオリジナルのファイルを作成した際や、ファイルをコピーしたタイミングでStorage Efficiencyが実行されてしまいました。
では、ファイルのコピーが完了したタイミングでStorage Efficiencyを実行した場合はどうでしょうか。Change log間で一致したデータブロックであれば重複排除が効くような気もします。
以下記事で紹介しているとおり、ポストプロセス重複排除はChange log が閾値(デフォルト20%)を超えたタイミングで実行されます。
Change logの閾値の絶対値はボリュームサイズによって変わります。
ボリュームサイズを128TiBとすることで、オリジナルのファイルを作成した際や、ファイルをコピーしたタイミングで自動でStorage Efficiencyがかかることを防ぎます。
まず、インライン重複排除を無効にします。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:17:22 Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 0B 300KB
::*> volume efficiency modify -volume vol2 -inline-dedupe false
::*> volume efficiency show -volume vol2 -fields state, policy, storage-efficiency-mode, inline-compression, inline-dedupe, compression, data-compaction, auto-adaptive-compression-savings, auto-adaptive-compression-existing-volume, using-auto-adaptive-compression
vserver volume state policy compression inline-compression storage-efficiency-mode inline-dedupe data-compaction auto-adaptive-compression-savings using-auto-adaptive-compression auto-adaptive-compression-existing-volume
------- ------ ------- ------ ----------- ------------------ ----------------------- ------------- --------------- --------------------------------- ------------------------------- -----------------------------------------
svm vol2 Enabled auto false true efficient false true true true false
ファイルの書き込み
4GiBのファイルを書き込みます。
$ sudo mount -t nfs svm-0990278eb1cb2cc93.fs-00df4b333bf8d9a59.fsx.us-east-1.amazonaws.com:/vol2 /mnt/fsxn/vol2
sh-5.2$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0990278eb1cb2cc93.fs-00df4b333bf8d9a59.fsx.us-east-1.amazonaws.com:/vol2 nfs4 122T 121T 861G 100% /mnt/fsxn/vol2
$ sudo dd if=/dev/urandom of=/mnt/fsxn/vol2/random_pattern_binary_block_4GiB bs=1M count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 28.29 s, 152 MB/s
$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0990278eb1cb2cc93.fs-00df4b333bf8d9a59.fsx.us-east-1.amazonaws.com:/vol2 nfs4 122T 121T 857G 100% /mnt/fsxn/vol2
書き込み後のStorage Efficiencyとボリュームの情報は以下のとおりです。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:21:47 Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 39.96MB 4.06GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ----- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 128TB 856.6GB 128TB 121.6TB 4.06GB 0% 0B 0% 0B 4.06GB 0% 4.06GB 0% - 4.06GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.06GB 0%
Footprint in Performance Tier 4.06GB 100%
Footprint in FSxFabricpoolObjectStore 0B 0%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 4.58MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.17GB 0%
Effective Total Footprint 4.17GB 0%
Storage Efficiencyは実行されていないですね。
Tiering PolicyをAllに変更
Tiering PolicyをAllに変更して、キャパシティプールストレージに階層化します。
::*> volume modify -volume vol2 -tiering-policy all
Volume modify successful on volume vol2 of Vserver svm.
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.06GB 0%
Footprint in Performance Tier 4.06GB 100%
Footprint in FSxFabricpoolObjectStore 0B 0%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 4.72MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.17GB 0%
Effective Total Footprint 4.17GB 0%
::*> volume show -volume vol2 -fields tiering-policy, cloud-retrieval-policy
vserver volume tiering-policy cloud-retrieval-policy
------- ------ -------------- ----------------------
svm vol2 all default
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.06GB 0%
Footprint in Performance Tier 81.00MB 2%
Footprint in FSxFabricpoolObjectStore
4GB 98%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 22.91MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.18GB 0%
Effective Total Footprint 4.18GB 0%
Tiering PolicyをNoneに変更
Tiering PolicyをNoneに変更します。
::*> volume modify -volume vol2 -tiering-policy none -cloud-retrieval-policy never
Volume modify successful on volume vol2 of Vserver svm.
::*> volume show -volume vol2 -fields tiering-policy, cloud-retrieval-policy
vserver volume tiering-policy cloud-retrieval-policy
------- ------ -------------- ----------------------
svm vol2 none never
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 4.06GB 0%
Footprint in Performance Tier 81.30MB 2%
Footprint in FSxFabricpoolObjectStore
4GB 98%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 23.19MB 0%
File Operation Metadata 4KB 0%
Total Footprint 4.18GB 0%
Effective Total Footprint 4.18GB 0%
ファイルのコピー
ボリューム上のファイルのコピーを作成します。
$ sudo cp /mnt/fsxn/vol2/random_pattern_binary_block_4GiB /mnt/fsxn/vol2/random_pattern_binary_block_4GiB_copy
sh-5.2$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0990278eb1cb2cc93.fs-00df4b333bf8d9a59.fsx.us-east-1.amazonaws.com:/vol2 nfs4 122T 121T 857G 100% /mnt/fsxn/vol2
コピー後のStorage Efficiencyとボリュームの情報は以下のとおりです。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:27:35 Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 79.96MB 8.11GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ----- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 128TB 856.5GB 128TB 121.6TB 8.11GB 0% 0B 0% 0B 8.11GB 0% 8.11GB 0% - 8.11GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.11GB 1%
Footprint in Performance Tier 4.14GB 51%
Footprint in FSxFabricpoolObjectStore
4GB 49%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Delayed Frees 25.93MB 0%
File Operation Metadata 4KB 0%
Total Footprint 8.24GB 1%
Effective Total Footprint 8.24GB 1%
このタイミングでもStorage Efficiencyは実行されていません。
手動でStorage Efficiencyを実行
手動でStorage Efficiencyを実行します。
::*> volume efficiency start -volume vol2
The efficiency operation for volume "vol2" of Vserver "svm" has started.
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-endvserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- -------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 0 KB (0%) Done Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 80MB 8.11GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- --------------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 1469008 KB (35%) Done Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 93.95MB 8.13GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- --------------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 3731288 KB (88%) Done Mon Jan 22 02:19:00 2024 Mon Jan 22 02:19:00 2024 0B 0% 115.5MB 8.15GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:05 Mon Jan 22 02:47:46 2024 Mon Jan 22 02:48:09 2024 8GB 0% 39.96MB 8.18GB
last-op-end
が4GBではなく8GBです。期待が持てます。
Storage Efficiency実行完了後のボリュームの情報は以下のとおりです。
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ----- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 128TB 856.4GB 128TB 121.6TB 8.18GB 0% 0B 0% 0B 8.18GB 0% 8.18GB 0% - 8.18GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.18GB 1%
Footprint in Performance Tier 4.20GB 51%
Footprint in FSxFabricpoolObjectStore
4GB 49%
Volume Guarantee 0B 0%
Flexible Volume Metadata 107.5MB 0%
Deduplication Metadata 24.06MB 0%
Deduplication 24.06MB 0%
Delayed Frees 27.23MB 0%
File Operation Metadata 4KB 0%
Total Footprint 8.33GB 1%
Effective Total Footprint 8.33GB 1%
残念ながら重複排除は行われていませんでした。
やはり、SSDとキャパシティプール間で重複排除を効かせることはできないことが分かりました。
おまけ : SSD上のデータ間では重複排除が効くことを確認する
おまけです。
SSD上のデータ間では重複排除が効くことを確認します。
コピーファイルを作成します。
$ sudo cp /mnt/fsxn/vol2/random_pattern_binary_block_4GiB /mnt/fsxn/vol2/random_pattern_binary_block_4GiB_copy_2
$ df -hT -t nfs4
Filesystem Type Size Used Avail Use% Mounted on
svm-0990278eb1cb2cc93.fs-00df4b333bf8d9a59.fsx.us-east-1.amazonaws.com:/vol2 nfs4 122T 121T 853G 100% /mnt/fsxn/vol2
コピー作成後のStorage Efficiencyとボリュームの情報は以下のとおりです。
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:03:52 Mon Jan 22 02:47:46 2024 Mon Jan 22 02:48:09 2024 8GB 0% 79.98MB 12.23GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ----- --------- --------------- ------- ------- ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 128TB 852.2GB 128TB 121.6TB 12.23GB 0% 0B 0% 0B 12.23GB 0% 12.23GB 0% - 12.23GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 12.23GB 1%
Footprint in Performance Tier 8.26GB 67%
Footprint in FSxFabricpoolObjectStore
4GB 33%
Volume Guarantee 0B 0%
Flexible Volume Metadata 214.9MB 0%
Deduplication Metadata 24.06MB 0%
Deduplication 24.06MB 0%
Delayed Frees 29.99MB 0%
File Operation Metadata 4KB 0%
Total Footprint 12.49GB 1%
Effective Total Footprint 12.49GB 1%
Storage Efficiencyを実行します。
::*> volume efficiency start -volume vol2
The efficiency operation for volume "vol2" of Vserver "svm" has started.
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-endvserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- -------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled 0 KB (0%) Done Mon Jan 22 02:47:46 2024 Mon Jan 22 02:48:09 2024 8GB 0% 80MB 12.23GB
::*> volume efficiency show -volume vol2 -fields changelog-usage, changelog-size, logical-data-size, state, progress, last-op-size, last-op-begin, last-op-end
vserver volume state progress last-op-begin last-op-end last-op-size changelog-usage changelog-size logical-data-size
------- ------ ------- ----------------- ------------------------ ------------------------ ------------ --------------- -------------- -----------------
svm vol2 Enabled Idle for 00:00:33 Mon Jan 22 02:52:21 2024 Mon Jan 22 02:53:01 2024 8GB 0% 0B 12.17GB
::*> volume show -volume vol2 -fields available, filesystem-size, total, used, percent-used, performance-tier-inactive-user-data, performance-tier-inactive-user-data-percent, size, dedupe-space-saved, dedupe-space-saved-percent, dedupe-space-shared,logical-used, logical-used-percent,logical-used-by-afs, logical-available, physical-used, physical-used-percent
vserver volume size available filesystem-size total used percent-used dedupe-space-saved dedupe-space-saved-percent dedupe-space-shared physical-used physical-used-percent logical-used logical-used-percent logical-available logical-used-by-afs performance-tier-inactive-user-data performance-tier-inactive-user-data-percent
------- ------ ----- --------- --------------- ------- ------ ------------ ------------------ -------------------------- ------------------- ------------- --------------------- ------------ -------------------- ----------------- ------------------- ----------------------------------- -------------------------------------------
svm vol2 128TB 852.2GB 128TB 121.6TB 8.16GB 0% 4.01GB 33% 4.01GB 8.16GB 0% 12.17GB 0% - 12.17GB 0B 0%
::*> volume show-footprint -volume vol2
Vserver : svm
Volume : vol2
Feature Used Used%
-------------------------------- ---------- -----
Volume Data Footprint 8.16GB 1%
Footprint in Performance Tier 8.20GB 67%
Footprint in FSxFabricpoolObjectStore
4GB 33%
Volume Guarantee 0B 0%
Flexible Volume Metadata 214.9MB 0%
Deduplication Metadata 48.11MB 0%
Deduplication 48.11MB 0%
Delayed Frees 4.05GB 0%
File Operation Metadata 4KB 0%
Total Footprint 12.46GB 1%
Effective Total Footprint 12.46GB 1%
4.01GBの重複排除が効いていますね。
キャパシティプールストレージ上のデータとSSD上のデータ間でポストプロセス重複排除は効かない
キャパシティプールストレージ上のデータとSSD上のデータ間で重複排除は効くのか確認してみました。
結論、キャパシティプールストレージ上のデータとSSD上のデータ間で重複排除は効きません。Tiering PolicyをNone以外にしている場合は留意しておくと良いでしょう。
この記事が誰かの助けになれば幸いです。
以上、AWS事業本部 コンサルティング部の のんピ(@non____97)でした!