DDOS 物理容量测量或物理容量报告常见问题
Summary: Data Domain 操作系统 (DD OS) 物理容量测量 (PCM) 或物理容量报告 (PCR) 常见问题。
Instructions
Data Domain 操作系统 (DD OS) 5.7 版引入了称为物理容量测量 (PCM) 或物理容量报告 (PCR) 的新功能。
本文介绍有关此功能的常见用例和问题。PCM 和 PCR 在本文档中可互换使用。
什么是物理容量测量 (PCM)?
PCM 是 DD OS 5.7 及更高版本中支持的一项新功能,它允许通过目录树、目录树集合、mtree 或 MTree 集合来计算准确的硬盘利用率。
这与以前版本的 DDOS 中的功能有何不同?
在 DDR 上接收文件时,我们会记录有关该文件的各种统计信息。其中一个这样的统计信息是“LC 后字节数”或文件写入系统时所占用的物理空间量。我们可以查看文件或目录树的 LC 后字节,使用 filesys show compression 命令 — 例如:
sysadmin@dd9500# filesys show compression /data/col1/jf1 Total files: 4; bytes/storage_used: 1.3 Original Bytes: 4,309,378,324 Globally Compressed: 3,242,487,836 Locally Compressed: 3,293,594,658 Meta-data: 13,897,112
这表示上述目录树包含四个文件,这些文件在接收时总共使用了 3,293,594,658 字节 (3.07 Gb) 的物理空间。
PCM 旨在避免因上述统计信息过时而导致不一致的结果。由于 PCM 可以生成特定时间点的硬盘利用率报告,因此上述限制不再适用,并且保证结果更加准确。
是否有任何已知的事实或设置,其中已知 PCM 计算的结果不是最佳准确度?
PCM 执行采样以计算路径集中的文件使用的磁盘空间。这意味着某些文件可能会被排除在唯一段的枚举之外,因为出于性能原因,小于给定大小的文件不会被考虑在内。PCM 作业考虑枚举的路径集中各个文件(以及它考虑用于磁盘空间的文件)的最小大小取决于平均文件系统段大小:
- 如果平均段大小为 4 K,则 PCM 将忽略 4 MB 及更小的文件
- 如果平均段大小为 8 K,则 PCM 将忽略 8 MB 及更小的文件
- 如果平均段大小为 12 K,则 PCM 将忽略 12 MB 及更小的文件
实际客户数据显示,在最常见的使用情形中,平均数据段大小徘徊在 9 KB 左右,因此,当 PCM 计算已用磁盘空间时,不考虑的文件的近似数字是小于 9 MB 的文件。
PCM 是否需要额外的许可证?
否 — PCM 不是许可功能,因此使用 PCM 不需要额外的许可。
是否所有平台都支持 PCM?
否 — PCM 在所有硬件和虚拟 Data Domain 数据保护专用存储设备 (DDVE) 上受支持,对象存储 (ATOS) DDVE 上的活动层除外。
PCM 仅测量和枚举活动层上的文件:位于云单元中的文件(对于传统延期保留,则为归档器单元中的文件)不在 PCM 作业的大小计算中。
在使用 PCM 之前,是否还需要满足任何其他前提条件?
默认情况下,PCM 在 DDOS 5.7 中处于禁用状态。在使用它之前,必须启用它并初始化其缓存,如下所示:
sysadmin@dd9500# compression physical-capacity-measurement enable and-initialize physical-capacity-measurement enabled. Initialization started.
提醒:PCM 缓存用于加速未来的 PCM 作业,缓存的初始化可能需要相当长的时间。尽管如此,在初始化 PCM 缓存时,PCM 作业可能会开始排队。
PCM 如何计算使用总计?
PCM 使用 mtree 快照来确定一组文件的物理利用率。因此,当 PCM 作业启动时,会发生以下情况:
- 针对底层 MTree 创建 mtree 快照。
sysadmin@dd9500# snapshot list mtree /data/col1/jf2 Snapshot Information for MTree: /data/col1/jf2 ---------------------------------------------- Name Pre-Comp (GiB) Create Date Retain Until Status --------------------------------- -------------- ----------------- ----------------- ------- pcr_snap_1440284055_1440360259_19 6.0 Aug 23 2015 13:04 Dec 31 1969 16:00 expired --------------------------------- -------------- ----------------- ----------------- -------
- PCM 从快照中查找将在 PCM 作业中(即在指定的路径集或 MTree 中)的文件。
- PCM 遍历这些文件的段树,以实质上构建所有文件引用的唯一段指纹的列表。
- PCM 随后在磁盘上(容器集中)查找相应的段,并计算这些段的大小之和。
-
这些分段的大小总和表示相应文件的当前硬盘利用率。
- 除上述内容外,还可以从相应的文件元数据中找到文件集的预压缩大小。
- PCM 作业完成后,底层 PCM 快照将过期,以便以后删除。
PCM 作业如何工作?
PCM 作业由用户(或按计划)提交并添加到 PCM 工作队列。根据系统工作负载,PCM 作业可能会从队列中选取并立即启动,或者可能会推迟一段时间。
PCM 作业可能被推迟的原因示例如下所示:
- 系统上正在运行活动层清理 — PCM 作业和活动层清理不能并行运行。因此,在活动层清理正在运行时排队的 PCM 作业会推迟到活动层清理完成。
- 已经有一些 PCM 作业针对底层 MTree 运行 — PCM 使用 mtree 快照,并且对于给定用户在给定时间可以针对单个 mtree 创建的 PCM 快照数量有严格的限制。如果新的 PCM 作业超出了这些限制,则作业将推迟到现有作业完成。
是否可以控制系统上 PCM 使用的资源?
PCM 使用类似于活动层清理所用的限制机制,即 PCM 限制可以从 0(非主动)设置为 100(主动)。显然,限制越高,PCM 使用的资源就越多,PCM 作业可能对系统上的其他工作负载产生的影响就越大。
默认情况下,PCM 限制设置为 20,即:
sysadmin@dd9500# compression physical-capacity-measurement throttle show Throttle is set to 20 percent (default).
可以按如下方式修改 PCM 限制,并立即更改限制(即,PCM 不需要重新启动 DDFS 以获取新的限制设置):
sysadmin@dd9500# compression physical-capacity-measurement throttle set 50 Throttle set to 50 percent.
什么是路径集?
PCM 作业可以通过两种方式运行,即:
- 针对预定义的“路径集”(即用户指定的目录集合)
- 针对单个 mtree
在针对给定路径集运行作业之前,必须按如下所示创建或定义路径集:
sysadmin@dd9500# compression physical-capacity-measurement pathset create jfall paths /data/col1/jf1,/data/col1/jf2 Pathset "jfall" created.可以按如下方式在现有路径集中添加或删除特定目录:
sysadmin@dd9500# compression physical-capacity-measurement pathset del jfall paths /data/col1/jf2 Path(s) deleted from pathset "jfall". sysadmin@dd9500# compression physical-capacity-measurement pathset add jfall paths /data/col1/jf2 Path(s) added to pathset "jfall".
创建的所有路径集显示如下:
sysadmin@dd9500# compression physical-capacity-measurement pathset show list Pathset Number of paths Measurement-retention (days) --------------- --------------- ---------------------------- jf1 1 180 jf2 1 180 jfall 2 180 phys-gandhi3 1 180 phys-gandhi5-fc 1 180 phys-gandhi5 1 180 phys2-gandhi3 2 180 --------------- --------------- ---------------------------- 7 pathset(s) found.
要查看路径集中定义的特定路径,请 pathset show detailed 使用命令:
sysadmin@dd9500# compression physical-capacity-measurement pathset show detailed jfall Pathset: jfall Number of paths: 2 Measurement-retention: 180 day(s) Paths: /data/col1/jf1 /data/col1/jf2 sysadmin@dd9500#
要删除路径,请将 pathset destroy 可以使用以下命令:
sysadmin@dd9500# compression physical-capacity-measurement pathset destroy jfall
提醒:这将删除给定路径集的所有历史记录。
如何启动 PCM 作业?
新的 PCM 作业将使用 sample start 命令,即:
sysadmin@dd9500# compression physical-capacity-measurement sample start pathsets jfall Measurement task(s) submitted and will begin as soon as resources are available.
在上面的示例中,使用了预定义的路径集。要针对单个 mtree 提交 PCM 作业,需要指定 mtree,即:
sysadmin@dd9500# compression physical-capacity-measurement sample start mtrees /data/col1/backup Measurement task(s) submitted and will begin as soon as resources are available.
默认情况下,PCM 作业以“正常”优先级提交。也可以指定紧急优先级:
sysadmin@dd9500# compression physical-capacity-measurement sample start pathsets jf1 priority urgent Measurement task(s) submitted and will begin as soon as resources are available.
优先级为“紧急”的作业排在优先级为“正常”的作业之前(这意味着优先接收和处理优先级为“正常”的任何已提交作业)。
使用 显示已提交或正在运行的作业的列表 sample show current 命令,例如:
sysadmin@dd9500# compression physical-capacity-measurement sample show current Task ID Type Name User State Creation Time Measurement Time Start Time Priority Percent (Submitted Time) Done ----------- ---- ----- -------- --------- ------------------- ------------------- ---------- -------- -------- 47244640259 PS jf2 sysadmin Scheduled 2015/08/23 12:24:12 2015/08/23 12:24:12 -- Urgent 0 47244640258 PS jf1 sysadmin Scheduled 2015/08/23 12:24:09 2015/08/23 12:24:09 -- Urgent 0 47244640257 PS jfall sysadmin Scheduled 2015/08/23 12:23:06 2015/08/23 12:23:06 -- Normal 0 ----------- ---- ----- -------- --------- ------------------- ------------------- ---------- -------- -------- sysadmin@dd9500#
是否可以计划 PCM 作业?
是 — 如果必须定期运行特定 PCM 作业,则计划它会根据需要自动运行。例如:
sysadmin@dd9500# compression physical-capacity-measurement schedule create jf_sched pathsets jfall,jf1,jf2 time 1400 Schedule "jf_sched" created.
提醒:创建计划是为了每天、在一周中的特定日子或每月的特定日子运行。
使用 修改现有计划 schedule modify 命令:
sysadmin@dd9500# compression physical-capacity-measurement schedule modify jf_sched priority urgent time 1700 day Wed,Fri Schedule "jf_sched" modified.
此外,现有计划可以添加或删除路径集,如下所示:
sysadmin@dd9500# compression physical-capacity-measurement schedule del jf_sched pathsets jf2 Schedule "jf_sched" modified. sysadmin@dd9500# compression physical-capacity-measurement schedule add jf_sched pathsets jf2 Schedule "jf_sched" modified.
提醒:计划不能只包含路径集或 MTree(即,两者不能混用):
sysadmin@dd9500# compression physical-capacity-measurement schedule create jf_sched2 mtrees /data/col1/backup time 1400 Schedule "jf_sched2" created. sysadmin@dd9500# compression physical-capacity-measurement schedule add jf_sched2 pathsets jfall **** Failed to add: this schedule is only for mtrees.
要查看现有计划的详细信息,请 schedule show all 命令,例如:
sysadmin@dd9500# compression physical-capacity-measurement schedule show all Name: jf_sched Status: enabled Priority: urgent Frequency: weekly on Wed, Fri Time: 17:00 Pathset(s): jfall jf1 jf2 Name: jf_sched2 Status: enabled Priority: normal Frequency: daily Time: 14:00 MTree(s): /data/col1/backup
现有计划可以立即禁用或启用,即:
sysadmin@dd9500# compression physical-capacity-measurement schedule disable jf_sched2 Schedule "jf_sched2" disabled. sysadmin@dd9500# compression physical-capacity-measurement schedule enable jf_sched2 Schedule "jf_sched2" enabled.
在以下情况下,计划也可能被销毁:
sysadmin@dd9500# compression physical-capacity-measurement schedule destroy jf_sched2 Schedule "jf_sched2" destroyed.
提醒:这不会删除相应 mtree/pathset 的历史记录(这意味着不会自动计划新的 PCM 作业)。
计划作业是如何开始的?
添加并启用 PCM 计划时,这会导致相应的条目添加到 /etc/crontab那是:
# # collection.1.crontab.pcr.jf_sched.0 # 00 17 * * Wed,Fri root /ddr/bin/ddsh -a compression physical-capacity-measurement sample start force priority urgent objects-from-schedule jf_sched
提醒:将从以下位置删除 cron 作业
/etc/crontab 计划被禁用或销毁。
我是否可以停止运行 PCM 作业?
是— 可以使用任务 ID 或路径集/mtree 名称中止正在运行的 PCM 作业。例如,我们看到有两个 PCM 作业排队:
SE@dd9500## compression physical-capacity-measurement sample show current Task ID Type Name User State Creation Time Measurement Time Start Time Priority Percent (Submitted Time) Done ------------ ---- ----- -------- --------- ------------------- ------------------- ---------- -------- -------- 124554051585 PS jfall sysadmin Scheduled 2015/08/30 16:00:48 2015/08/30 16:00:48 -- Normal 0 124554051586 PS jfall sysadmin Scheduled 2015/08/30 16:01:55 2015/08/30 16:01:55 -- Normal 0 ------------ ---- ----- -------- --------- ------------------- ------------------- ---------- -------- --------
可以使用 task-id 中止这些作业(以停止单个作业):
SE@dd9500## compression physical-capacity-measurement sample stop task-id 124554051585 ** This will abort any submitted or running compression physical-capacity-measurement sampling tasks. Do you want to proceed? (yes|no) [no]: yes 1 task(s) aborted.
给我们留下一个正在运行的作业:
SE@dd9500## compression physical-capacity-measurement sample show current Task ID Type Name User State Creation Time Measurement Time Start Time Priority Percent (Submitted Time) Done ------------ ---- ----- -------- --------- ------------------- ------------------- ---------- -------- -------- 124554051586 PS jfall sysadmin Scheduled 2015/08/30 16:01:55 2015/08/30 16:01:55 -- Normal 0 ------------ ---- ----- -------- --------- ------------------- ------------------- ---------- -------- --------
或路径集名称:
SE@dd9500## compression physical-capacity-measurement sample stop pathsets jfall ** This will abort any submitted or running compression physical-capacity-measurement sampling tasks. Do you want to proceed? (yes|no) [no]: yes 1 task(s) aborted.
让我们没有工作:
SE@dd9500## compression physical-capacity-measurement sample show current No measurement tasks found.
如何显示已完成作业的详细信息?
已完成作业的详细信息可通过 sample show history 相同名称。例如,要显示单个路径集的详细信息,请执行以下操作:
SE@dd9500## compression physical-capacity-measurement sample show history pathset jfall Pathset: jfall Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/23 12:23:06 7.0 4.2 1.70x 0.98x 1.67x (40.24%) 2015/08/23 13:04:20 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/26 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/27 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/28 14:00:02 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/29 14:00:02 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/30 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) ------------------- ------------ ------------- ----------- ---------- -------------- Total number of measurements retrieved = 7.
detailed-history 参数还显示每个作业的开始和结束时间:
SE@dd9500## compression physical-capacity-measurement sample show detailed-history pathset jfall Pathset: jfall Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp Task ID Task Start Time Task End Time (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- ------------ ------------------- ------------------- 2015/08/23 12:23:06 7.0 4.2 1.70x 0.98x 1.67x (40.24%) 47244640257 2015/08/23 12:25:19 2015/08/23 12:25:23 2015/08/23 13:04:20 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 51539607553 2015/08/23 13:05:45 2015/08/23 13:05:48 2015/08/26 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 77309411329 2015/08/26 14:02:50 2015/08/26 14:02:50 2015/08/27 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 85899345921 2015/08/27 14:03:06 2015/08/27 14:03:06 2015/08/28 14:00:02 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 94489280513 2015/08/28 14:02:50 2015/08/28 14:02:51 2015/08/29 14:00:02 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 103079215105 2015/08/29 14:01:40 2015/08/29 14:01:41 2015/08/30 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 115964116993 2015/08/30 14:04:12 2015/08/30 14:04:12 ------------------- ------------ ------------- ----------- ---------- -------------- ------------ ------------------- ------------------- Total number of measurements retrieved = 7.
提醒:可以修改任一命令以仅检索特定时间段内的结果:
SE@dd9500## compression physical-capacity-measurement sample show history pathset jfall last 2days Pathset: jfall Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/29 14:00:02 10.0 6.2 1.63x 0.98x 1.61x (37.84%) 2015/08/30 14:00:01 10.0 6.2 1.63x 0.98x 1.61x (37.84%) ------------------- ------------ ------------- ----------- ---------- -------------- Total number of measurements retrieved = 2.
或在特定日期或时间之间:
SE@dd9500## compression physical-capacity-measurement sample show history pathset jfall start 08231010 end 08231400 Pathset: jfall Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/23 12:23:06 7.0 4.2 1.70x 0.98x 1.67x (40.24%) 2015/08/23 13:04:20 10.0 6.2 1.63x 0.98x 1.61x (37.84%) ------------------- ------------ ------------- ----------- ---------- -------------- Total number of measurements retrieved = 2.
特定路径集/mtree 的特定历史记录会保留多长时间?
默认情况下,每个 PCM 路径集的结果将保留 180 天。这可以通过修改相应的路径集来更改:
SE@dd9500## compression physical-capacity-measurement pathset modify jfall measurement-retention 14 Measurement-retention changed to 14 day(s).
PCM 历史记录保存在系统历史数据库中。因此,如果历史数据库丢失或损坏,所有 PCM 历史记录的详细信息也会丢失。
使用 PCM 时是否有任何注意事项?
如果系统的可用空间少于 10%,PCM 作业将暂停。
当清理周期运行时,PCM 作业会暂停。
如前所述,PCM 是一种用于按一组特定的目录/mtree 计算物理利用率的工具。在计算特定路径集或 MTree 集的结果时,PCM 仅计算一次路径集或 MTree 集使用的每个唯一数据段的大小。
因此,如果针对相同数据进行重复数据消除的文件处于多个不同的PCM作业中,则组成文件的每个段可被计数多次(由每个PCM作业计数一次)。这意味着,虽然每个单独的 PCM 作业的结果都是准确的,但无法将多个 PCM 作业的结果相加,以提供作业中路径集/mtree 总和的准确物理利用率。
由于 PCM 作业的组合方式,磁盘上使用的路径集或 MTree 压缩后空间:
- PCM 作业不考虑无效数据(已删除文件使用的磁盘空间,磁盘上的空间可能尚未通过运行 GC 回收)。
- PCM 不考虑为所测量的 MTree 或路径集创建的快照中锁定的任何数据。
例如,我有一个 mtree,名为 /data/col1/jf1 我在其中创建了三个 1Gb 文件,即:
!!!! dd9500 YOUR DATA IS IN DANGER !!!! # for i in 1 2 3 ; do
> dd if=/dev/urandom of=/data/col1/jf1/${i} bs=1024k count=1024
> done
然后,我将这些文件复制到第二个 mtree (/data/col1/jf2):
!!!! dd9500 YOUR DATA IS IN DANGER !!!! # cp /data/col1/jf1/1 /data/col1/jf2/4 !!!! dd9500 YOUR DATA IS IN DANGER !!!! # cp /data/col1/jf1/2 /data/col1/jf2/5 !!!! dd9500 YOUR DATA IS IN DANGER !!!! # cp /data/col1/jf1/3 /data/col1/jf2/6
最后,我在 /data/col1/jf2:
!!!! dd9500 YOUR DATA IS IN DANGER !!!! # dd if=/dev/urandom of=/data/col1/jf2/7 bs=1024k count=1024 1024+0 records in 1024+0 records out
如果不考虑数据的本地压缩,只考虑重复数据消除,很明显,每个 mtree 在写入文件时都使用了以下物理空间量:
/data/col1/jf1:3Gb
/data/col1/jf2:1 Gb(对于新文件,拷贝的文件会针对现有数据消除重复,因此占用的物理空间极少)。
因此,物理空间利用率的总和 /data/col1/jf1 和 /data/col1/jf2 应该在 4Gb 左右。
创建了三个 PCM 路径集:
包含 /data/col1/jf1
的 jf1、包含 /data/col1/jf2
的 jf2、包含 data/col1/jf1 和 /data/col1/jf2 的 JF1
PCM 作业将运行并提供输出,如下所示:
Pathset: jf1 Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/23 12:24:09 3.0 3.2 0.96x 0.98x 0.94x (-6.21%) ------------------- ------------ ------------- ----------- ---------- -------------- Pathset: jf2 Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/23 12:24:12 4.0 4.2 0.98x 0.98x 0.96x (-4.14%) ------------------- ------------ ------------- ----------- ---------- --------------
这些值是正确的,因为每个 PCM 作业仅查看其相应路径集中的文件引用的物理数据。这意味着已复制文件的数据将计数两次(每个 PCM 作业一次)。
通过以下方式获得总物理利用率似乎是合理的 /data/col1/jf1 和 /data/col1/jf2 MTree,我们可以从上述输出中对“物理使用”的值求和。
要获得 /data/col1/jf1 和 /data/col1/jf2,则必须运行涵盖这两个 MTree 的单个 PCM 作业(即使用 jfall)。这可确保重复数据段仅计数一次,而不会像上面的示例那样计数两次,即:
Pathset: jfall Measurement Time Logical Used Physical Used Global-Comp Local-Comp Total-Comp (Pre-Comp) (Post-Comp) Factor Factor Factor (GiB) (GiB) (Reduction %) ------------------- ------------ ------------- ----------- ---------- -------------- 2015/08/23 12:23:06 7.0 4.2 1.70x 0.98x 1.67x (40.24%) ------------------- ------------ ------------- ----------- ---------- --------------
总之,无法对多个 PCM 作业的输出相加来提供一组路径集/mtree 的准确物理利用率。相反,应定义涵盖所有必需的 mtree/目录的单个 PCM 路径集,因为这可确保重复数据仅计数一次。例如,如果未完成此操作,并且要为系统上的每个 mtree 运行单独的 PCM 作业,那么结果汇总后,使用的总物理容量完全有可能超过系统的原始容量。
PCM 作业只能由 DDSH 命令行或者也可以使用 UI 吗?
在本文档中,Data Domain 命令行界面 (DDSH) 用于配置、提交和查看 PCM 作业。