Problem:
I have a Foreman cluster in scenario Katello with 18 smart proxies. Currently it manages ~4000 VM’s on 18 locations. Used only for package management.
I’m subscribing the rest of the servers which will make the total number of servers closer to 10 000.
I have as per recommendation in documentation raised resources of Foreman main server for tuning profile medium and and ran installer with that option.
When I’m enrolling new servers i see jobs for update facts update take a very long time.
On the other hand, server is nowhere near using CPU and RAM fully. RAM is used up to 12 GB out of 32 GB, and CPU will spike during subscribing of new machines up to 50%, usually being 10-20%.
IO operations take around 100 ms tops in those spikes. Disk for Foreman VM is on flash storage.
Smart proxies show even less performance issues, have more than enough RAM.
But UI breaks apart if this happens. Original installation of this Foreman was when version 1.23 was the latest and was updated regularly ever since, current being latest Foreman 2.1.1/Katello 3.16, if this info is relevant.
Expected outcome:
What can I do to tweak this so facts add/update does not take long, like 16 seconds or so?
Foreman and Proxy versions:
Foreman 2.1.1/Katello 3.16
Foreman and Proxy plugin versions:
Foreman 2.1.1/Katello 3.16
Distribution and version:
CentOS 7.8
Other relevant data:
Example of facts log:
2020-09-09T11:04:36 [I|app|385e6af1] Started PUT “/rhsm/consumers/37dac896-5695-4e47-b703-3fe938a6c34e” for 127.0.0.1 at 2020-09-09 11:04:36 +0000
2020-09-09T11:04:36 [I|app|385e6af1] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2020-09-09T11:04:36 [I|app|385e6af1] Parameters: {“facts”=>"[FILTERED]", “id”=>“37dac896-5695-4e47-b703-3fe938a6c34e”}
2020-09-09T11:07:24 [I|app|385e6af1] Import facts for ‘server345.domain.local’ completed. Added: 0, Updated: 1, Deleted 0 facts
2020-09-09T11:07:24 [I|app|385e6af1] Completed 200 OK in 167734ms (Views: 0.2ms | ActiveRecord: 212.2ms | Allocations: 1718622)