Bug #26260
closeddb:seed on Foreman 1.21 takes too long if you have a lot of discovered hosts
Description
Hi,
I have a Foreman instance with about 17k hosts and 18k discovered hosts and db:seed is taking a lot of time to assign the resources to the new default organization that 1.21 creates:
[root@devforeman ~]# grep organization_id /var/log/foreman/production.log | head -1
2019-03-06T16:23:56 [I|aud|] Host::Base (293112) update event on organization_id , 117
[root@devforeman ~]# grep organization_id /var/log/foreman/production.log | tail -1
2019-03-06T19:08:31 [I|aud|] Host::Base (194789) update event on organization_id , 117
[root@devforeman ~]# grep -c update /var/log/foreman/production.log
2942
Every update is taking about 3-4 seconds:
2019-03-06T19:04:22 [I|aud|] Host::Base (195408) update event on organization_id , 117
2019-03-06T19:04:27 [I|aud|] Host::Base (195407) update event on organization_id , 117
2019-03-06T19:04:31 [I|aud|] Host::Base (195406) update event on organization_id , 117
2019-03-06T19:04:35 [I|aud|] Host::Base (195405) update event on organization_id , 117
2019-03-06T19:04:39 [I|aud|] Host::Base (195404) update event on organization_id , 117
Shouldn't this be faster?
Thank you.
Updated by Evgeni Golov over 5 years ago
- Category set to Database
- Found in Releases 1.21.0 added
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/theforeman/foreman/pull/6546 added
Updated by Tomer Brisker over 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset d1e191e10fba5b97856bde29cf10721464eddf1d.
Updated by Tomer Brisker over 5 years ago
- Subject changed from db:seed on Foreman 1.21 takes too long if you have a lot of hosts to db:seed on Foreman 1.21 takes too long if you have a lot of discovered hosts