Update some of the configuration defaults for celery (PP-1279) #1874
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Update a couple of the defaults for our celery worker config. I determined these values by overriding the config with env variables on the CA CM to determine their impact on performance. Since these seem to drastically help our performance, I'm updating the defaults.
Motivation and Context
The CA CM has been struggling to keep up with the number of indexing tasks coming in. Now that we have proper metrics, its a bit easier to see whats happening there. We were getting about 1000 indexing tasks coming in every minute, and we were able to process about 500 of them every minute. So the indexing process was continually under water.
Looking at: https://docs.celeryq.dev/en/stable/userguide/optimizing.html#prefetch-limits
And updating some of our config values, the CA CM is able to process about 2700 tasks a minute, which allows the indexing task to keep up with demand.
Since we have some long running tasks, we may want to follow the suggestion in that guide, and add another queue with different workers with different prefetch limits. I'm going to make a ticket to look into that, but this configuration has been helping the CA CMs, so I think its worth making right away.
How Has This Been Tested?
Checklist