Problem:
After upgrading from Foreman 3.12 to 3.15 (step by step) we noticed that after clicking on “Register Host” it takes between 30 an 40 seconds until the values in the drop down boxes are shown / selectable. After selecting the first value (oragnization) it takes additional 30 to 40 seconds to get the next vavlues.
At the same time one of the puma worker consumes nearly 100% cpu.
Expected outcome:
Clicking on “Register Host” is as fast as in Foreman 3.12
Foreman and Proxy versions:
Foreman 3.15
Foreman and Proxy plugin versions:
Distribution and version:
Rhel 9
Is there any known Problem? If you need futher data, let me know.
In this case it “only” took 26s to load the Register Host page. It seems that the most queries have something to do with the hostgroups. We have 845 hostgroups.
Unfortunately I think the issue is caused by the large number of host groups.
As described here in a similar issue: Creating a new host takes 10–15 minutes in certain hostgroups, Foreman can become very slow when there are many hostgroups or deeply nested hierarchies, since each one adds more database queries and parameter inheritance lookups.
I see you also commented on a similar case here: Foreman 1.24.2 – very slow hostgroup view and edit for non-admin user.
So this looks like the same underlying limitation - the number and complexity of hostgroups. Reducing or flattening the hostgroup structure, or filtering them in the UI, should help improve performance.
Please open a Redmine issue and we can look into it. It will be helpful (but not required) if we can get an idea of how many hostgroups we need to start seeing the performance issue.