第12页
Before starting to use deduplication, there are two issues that need to be investigated:在开始使用重复数据删除之前,有两个问题,需要进行调查:
Is it worth using deduplication on this particular data?是否值得使用这个特定的数据的重复数据删除吗?
Does the server have enough memory installed to undertake deduplication?服务器是否有足够的内存,安装进行重复数据删除呢?
Guidance on these two issues is given below.下面给出这两个问题上的指导。
Is it Worth Using Deduplication on this Particular Data?是否值得使用这个特定的数据的重复数据删除吗?
To determine if your data would benefit from deduplication space savings, use the ZFS debugging tool, zdb .要确定如果您的数据将受益于重复数据删除节省空间,使用ZFS的调试zdb , ZDB。 If your data is not "dedup-able," there is no point in enabling dedup .如果你的数据是不是“dedup能够”有没有使点dedup 。
Deduplication is performed using checksums.重复数据删除是使用校验。 If a block has the same checksum as a block that is already written to the pool, it is considered to be a duplicate and, thus, just a pointer to the already stored block is written to disk.如果一个块具有相同的校验作为一个已经写入池中的块,它被认为是重复的,因此,只是一个指针到已存储的块写入磁盘。
Therefore, the process of trying to deduplicate data that cannot be deduplicated simply wastes CPU resources.因此,试图重复数据删除,不能重复数据删除的过程中,只是浪费CPU资源。 Deduplication in ZFS is in-band.在ZFS中的重复数据删除是在波段。 The deduplication occurs when you write to the disk.当您写入到磁盘的重复数据删除。 This is when the (unnecessary) CPU load will be incurred.这是(不必要的)CPU负载时将发生。
For example, if the estimated deduplication ratio is greater than 2, you might see deduplication space savings.例如,如果估计的重复数据删除比率大于2,你可能会看到重复数据删除节省空间。 In the example shown in Listing 1, the deduplication ratio is less than 2, so enabling dedup is not recommended.在清单1中所示的例子,重复数据删除比率小于2,因此使dedup是不推荐。
Listing 1: Determining the Deduplication Ratio 清单1:确定重复数据删除比率
# zdb -S tank #ZDB小号罐
Simulated DDT histogram:模拟滴滴涕直方图:
bucket allocated referenced斗分配引用
refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE refcnt块LSIZE PSIZE DSIZE块LSIZE PSIZE DSIZE
------ ------ ----- ----- ----- ------ ----- ----- ----- ------ ------ ----- ----- ----- ------ ----- ----- -----
1 2.27M 239G 188G 194G 2.27M 239G 188G 194G 1 2.27M 239G 188G 194G 2.27M 239G 188G 194G
2 327K 34.3G 27.8G 28.1G 698K 73.3G 59.2G 59.9G 2 327K 34.3G 27.8G 28.1G 698K 73.3G 59.2G 59.9G
4 30.1K 2.91G 2.10G 2.11G 152K 14.9G 10.6G 10.6G 4 30.1K 2.91G 2.10G 2.11G 152K 14.9G 10.6G 10.6G
8 7.73K 691M 529M 529M 74.5K 6.25G 4.79G 4.80G 8 7.73K 691M 529M 529M 74.5K 6.25G 4.79G 4.80G
16 673 43.7M 25.8M 25.9M 13.1K 822M 492M 494M 16 673 43.7M 25.8M 25.9M 13.1K 822M 492M 494M
32 197 12.3M 7.02M 7.03M 7.66K 480M 269M 270M 32 197 12.3M 7.02M 7.03M 7.66K 480M 269M 2.7亿
64 47 1.27M 626K 626K 3.86K 103M 51.2M 51.2M 64 47 1.27M 626K 626K 3.86K 103M 51.2M 51.2M
128 22 908K 250K 251K 3.71K 150M 40.3M 40.3M 128 22 908K 250K 251K 3.71K 150M 40.3M 40.3M
256 7 302K 48K 53.7K 2.27K 88.6M 17.3M 19.5M 256 7 302K 48K 53.7K 2.27K 88.6M 17.3M 19.5M
512 4 131K 7.50K 7.75K 2.74K 102M 5.62M 5.79M 512 4 131K 7.50K 7.75K 2.74K 102M 5.62M 5.79M