Due to the extraordinarily large volume of calls from subscription-manager creating the following 3 task types:
Actions::Katello::Host::Update
Actions::Katello::Host::GenerateApplicability
Actions::Katello::Host::UploadPackageProfile
We often see a 100:1 ratio of this type of task vs other task types in the database, an example of a user who had 700,000 tasks in their task history saw this rough breakdown
COUNT|TYPE
320668 Actions::Katello::Host::Update
277923 Actions::Katello::Host::GenerateApplicability
141833 Actions::Katello::Host::UploadPackageProfile
1983 Actions::Katello::Repository::ScheduledSync
429 Actions::Katello::CapsuleContent::Sync
127 Actions::Katello::Repository::MetadataGenerate
118 Actions::Katello::Repository::CapsuleGenerateAndSync
109 Actions::Katello::CapsuleContent::RemoveOrphans
59 Actions::Katello::Host::Hypervisors
53 Actions::Katello::Repository::BulkMetadataGenerate
...
we need to investigate moving these to be handled directly by the main Rails application and not require the overhead of task creation, monitoring and eventual database cleanup.
We saw performance improvements when we moved 'subscription-manager register' calls to be handled directly in Foreman and want to consider the same for the above task types.
Also take into consideration we need to allow for concurrent calls as added in this bz here in 6.5.z and 6.6:
https://bugzilla.redhat.com/show_bug.cgi?id=1643649
Analysis of customer sosreports shows our largest environments often show Actions::Katello::Host::Update calls ranging in the 30,000 to 50,000 tasks per day.