Enabling the object heatmap policy
Use this procedure to enable the object heatmap policy.
Understand how to use a file heat policy.
-
Run the following command to create a file that is named
file_heat_policy
and also add the following policy:RULE 'DefineTiers' GROUP POOL 'TIERS' IS 'system' LIMIT(70) THEN 'gold' LIMIT(75) THEN 'silver' RULE 'Rebalance' MIGRATE FROM POOL 'TIERS' TO POOL 'TIERS' WEIGHT(FILE_HEAT) FOR FILESET('Object_Fileset') WHERE NAME LIKE '%.data'
This policy places the most frequently accessed objects in the SSD-backed system pool until the system pool reaches 70% of its capacity usage. Frequently accessed objects are placed in the gold pool until it reaches 75% capacity usage.
Note:The temporary files that are generated by Swift are not moved between storage tiers because they are all eventually replaced with permanent files that have the .data extension. Moving temporary files to system, gold, or silver storage pools results in unnecessary data movement.
-
To enable the object heatmap policy for unified file and object access, identify the filename
prefix for temporary files that are created by Swift in unified file and object access. The file
name prefix is configured in the object-server-sof.conf directory. Run the
following command to fetch the file name prefix:
grep tempfile_prefix /etc/swift/object-server-sof.conf tempfile_prefix = .ibmtmp_
-
Run the following command to determine the filesets that are enabled for unified file and
object access:
mmobj policy list Index Name Default Deprecated Fileset Functions ---------------------------------------------------------------------------------------- 0 SwiftDefault yes obj_fset 1317160 Sof obj_Sof file-and-object-access
-
Run the following command to create a heat-based migration rule by creating the following
file:
RULE 'DefineTiers' GROUP POOL 'TIERS' IS 'system' LIMIT(70) THEN 'gold' LIMIT(75) THEN 'silver' RULE 'Rebalance' MIGRATE FROM POOL 'TIERS' TO POOL 'TIERS' WEIGHT(FILE_HEAT) FOR FILESET('obj_Sof') WHERE NAME NOT LIKE '.ibmtmp_%'
Note:- The fileset name is derived from Step 3. Multiple fileset names can be separated by comma.
- The filename prefix in the
WHERE
clause is derived from Step 2. By using this filter, the migration of temporary files is skipped - which avoids unnecessary data movement.
-
Run the following command to test the policy:
mmapplypolicy fs1 -P object_heat_policy -I test [I] GPFS Current Data Pool Utilization in KB and % Pool_Name KB_Occupied KB_Total Percent_Occupied gold 169462784 6836715520 2.478716330% silver 136192 13673431040 0.000996034% system 8990720 13673431040 0.065753211% [I] 6050 of 42706176 inodes used: 0.014167%.[I] Loaded policy rules from object_heat_policy. Evaluating policy rules with CURRENT_TIMESTAMP = 2015-11-22@02:30:19 UTC Parsed 2 policy rules. RULE 'DefineTiers' GROUP POOL 'TIERS' IS 'system' LIMIT(70)THEN 'gold' LIMIT(75)THEN 'silver' RULE 'Rebalance' MIGRATE FROM POOL 'TIERS' TO POOL 'TIERS' WEIGHT(computeFileHeat (CURRENT_TIMESTAMP-ACCESS_TIME,xattr('gpfs.FileHeat'), KB_ALLOCATED))FOR FILESET('Object_Fileset') WHERE NAME LIKE '%.data' [I] 2015-11-22@02:30:20.045 Directory entries scanned: 1945. [I] Directories scan: 1223 files, 594 directories, 128 other objects, 0 'skipped' files and/or errors. [I] 2015-11-22@02:30:20.050 Sorting 1945 file list records. [I] Inodes scan: 1223 files, 594 directories, 128 other objects, 0 'skipped'files and/or errors. [I] 2015-11-22@02:30:20.345 Policy evaluation. 1945 files scanned. [I] 2015-11-22@02:30:20.350 Sorting 1 candidate file list records. [I] 2015-11-22@02:30:20.437 Choosing candidate files. 1 records scanned. [I] Summary of Rule Applicability and File Choices: Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule 0 98080572 3353660160 39384107 1328389120 292416 RULE 'Clean' MIGRATE FROM POOL 'TIERS' WEIGHT(.) TO POOL 'TIERS' FOR FILESET(.) WHERE(.) [I] Filesystem objects with no applicable rules: 1944. [I] GPFS Policy Decisions and File Choice Totals: Chose to migrate 0KB: 1 of 1 candidates; Predicted Data Pool Utilization in KB and %: Pool_Name KB_Occupied KB_Total Percent_Occupied gold 169462784 6836715520 2.478716330% silver 136192 13673431040 0.000996034% system 8990720 13673431040 0.065753211%
-
Run the following command when you have no errors:
mmapplypolicy fs1 -P object_file_heat -I yes
For more information, see File heat: Tracking file access temperature.