To optimize the performance of your GraphQL filters, run a procedure to update your Content Fragments.
After updating your Content Fragments, you can follow the recommendations for Optimizing GraphQL Queries.
There are prerequisites for this task:
Ensure that you have a minimum of the 2023.1.0 release of AEM as a Cloud Service.
Ensure that the user performing the task has the required permissions:
Deployment Manager
role in Cloud Manager is required.Enable the update by setting the following variables for your instance using the Cloud Manager UI:
The available variables are:
Name | Value | Default Value | Service | Applied | Type | Notes | |
---|---|---|---|---|---|---|---|
1 | `CF_MIGRATION_ENABLED` | `1` | `0` | All | Variable | Enables(!=0) or disables(0) triggering of Content Fragment migration job. | |
2 | `CF_MIGRATION_ENFORCE` | `1` | `0` | All | Variable | Enforce (!=0) remigration of Content Fragments. Setting this flag to 0 does an incremental migration of CFs. This means, if the job is terminated for any reason, then the next run of the job starts migration from the point where it got terminated. The first migration is recommended for enforcement (value=1). |
|
3 | `CF_MIGRATION_BATCH` | `50` | `50` | All | Variable | Size of the batch for saving the number of Content Fragments after migration. This is relevant to how many CFs are saved to the repository in one batch, and can be used to optimize the number of writes to the repository. |
|
4 | `CF_MIGRATION_LIMIT` | `1000` | `1000` | All | Variable | Max number of Content Fragments to process at a time. See also notes for `CF_MIGRATION_INTERVAL`. |
|
5 | `CF_MIGRATION_INTERVAL` | `60` | `600` | All | Variable | Interval (seconds) to process the remaining Content Fragments up until the next Limit This interval is also considered as both a wait-time before starting the job, and a delay between processing of each subsequent CF_MIGRATION_LIMIT number of CFs. (*) |
(*)
The value of CF_MIGRATION_INTERVAL
can also help to approximate the total execution time of the migration job.
For example:
This is only the minimum time required to complete the job, and does not include the I/O time. The actual time taken could be more than this estimation.
Monitor the progress and completion of the update.
To do this, monitor the logs on author and golden-publish from:
com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob
Author logs; for example:
23.01.2023 13:13:45.926 *INFO* [sling-threadpool-09cbdb47-4d99-4c4c-b6d5-781b635ee21b-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob This instance<dd9ffdc1-0c28-4d04-9a96-5d4d223e457e> is the leader, will schedule the upgrade schedule job.
...
23.01.2023 13:13:45.941 *INFO* [sling-threadpool-09cbdb47-4d99-4c4c-b6d5-781b635ee21b-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob Scheduling content fragments upgrade from version 0 to 1, slingJobId: 2023/1/23/13/13/50e1a575-4cd7-497b-adf0-62cb5768eedb_0, enforce: true, limit: 1000, batch: 50, interval: 60s
23.01.2023 13:20:40.960 *INFO* [sling-threadpool-09cbdb47-4d99-4c4c-b6d5-781b635ee21b-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob Finished content fragments upgrade in 6m, slingJobId: 2023/1/23/13/13/50e1a575-4cd7-497b-adf0-62cb5768eedb_0, status: MaintenanceJobStatus{jobState=SUCCEEDED, statusMessage='Upgrade to version '1' succeeded.', errors=[], successCount=3781, failedCount=0, skippedCount=0}
Golden-publish logs; for example:
23.01.2023 12:35:05.150 *INFO* [sling-threadpool-8abcc1bb-cdcb-46d4-8565-942ad8a73209-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob This instance<ad1b399e-77be-408e-bc3f-57097498fddb> is the leader, will schedule the upgrade schedule job.
23.01.2023 12:35:05.161 *INFO* [sling-threadpool-8abcc1bb-cdcb-46d4-8565-942ad8a73209-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob Scheduling content fragments upgrade from version 0 to 1, slingJobId: 2023/1/23/12/34/ad1b399e-77be-408e-bc3f-57097498fddb_0, enforce: true, limit: 1000, batch: 50, interval: 60s
...
23.01.2023 12:40:45.180 *INFO* [sling-threadpool-8abcc1bb-cdcb-46d4-8565-942ad8a73209-(apache-sling-job-thread-pool)-1-Content Fragment Upgrade Job Queue Config(cfm/upgrader)] com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob Finished content fragments upgrade in 5m, slingJobId: 2023/1/23/12/34/ad1b399e-77be-408e-bc3f-57097498fddb_0, status: MaintenanceJobStatus{jobState=SUCCEEDED, statusMessage='Upgrade to version '1' succeeded.', errors=[], successCount=3781, failedCount=0, skippedCount=0}
Customers, who enabled access to the environment logs using Splunk, can use the example query below to monitor the upgrade process. For details about enabling Splunk logging, see Debugging Production and Stage.
index=<indexName> sourcetype=aemerror aem_envId=<environmentId> msg="*com.adobe.cq.dam.cfm.impl.upgrade.UpgradeJob Finished*"
(aem_tier=golden-publish OR aem_tier=author) | table _time aem_tier pod_name msg | sort -_time desc
Where:
environmentId
- a customer environment identifier; for example, e1234
indexName
- a customer index name, gathering aemerror
eventsExample output: