Project

General

Profile

Actions

Bug #26260

closed

db:seed on Foreman 1.21 takes too long if you have a lot of discovered hosts

Added by Guilherme M. Schroeder over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Evgeni Golov over 5 years ago

  • Category set to Database
  • Found in Releases 1.21.0 added
Actions #2

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
Actions #3

Updated by Tomer Brisker over 5 years ago

  • Target version set to 1.21.1
Actions #4

Updated by Marek Hulán over 5 years ago

  • Fixed in Releases 1.22.0 added
Actions #5

Updated by Tomer Brisker over 5 years ago

  • Fixed in Releases 1.21.1 added
Actions #6

Updated by Tomer Brisker over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

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
Actions

Also available in: Atom PDF