Enabling the object heatmap policy
Use this procedure to enable the object heatmap policy.
- Create a file named file_heat_policy and 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 utilization. Frequently accessed objects are placed in the gold pool until it reaches 75% capacity utilization.
Note:The temporary files 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 created by Swift in unified file and object access. The filename prefix
is configured in object-server-sof.conf and can be fetched:
grep tempfile_prefix /etc/swift/object-server-sof.conf tempfile_prefix = .ibmtmp_
- 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
- Create a heat based migration rule by creating the following in a 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, thereby avoiding unnecessary data movement.
- To test the policy, run the following command:
mmapplypolicy fs1 -P object_heat_policy -I test[I] GPFS Current Data Pool Utilization in KB and %Pool_Name KB_Occupied KB_Total Percent_Occupiedgold 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 UTCParsed 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_ChosenKB_Ill Rule0 1 0 1 00 RULE 'Rebalance' MIGRATE FROM POOL 'TIERS' WEIGHT(.) TO POOL 'TIERS' FORFILESET(.) 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_Occupiedgold 169462784 6836715520 2.478716330%silver 136192 13673431040 0.000996034%system 8990720 13673431040 0.065753211%
- If there are no errors, run the following command:
mmapplypolicy fs1 -P object_file_heat -I yes
Parent topic: Managing object storage