Project

General

Custom queries

Profile

Actions

Bug #16576

closed

Structured facts importer is extremely slow

Added by Brandon Weeks over 8 years ago. Updated over 6 years ago.

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

Description

After upgrading to 1.13.0-RC1, our Foreman server consumed all available resources and became effectively unusable with response times of 25k to 175k ms. This seems directly related to the changes made in #4528, as Api::V2::HostsController#facts is where the application spends 99% of its time after upgrade according to NewRelic.


Related issues 3 (0 open3 closed)

Related to Foreman - Feature #4528: Support Facter 2 structured factsClosedDominic Cleal03/03/2014Actions
Related to Foreman - Feature #12163: Add ability to expire facts based on fact name.ClosedMarek Hulán10/14/2015Actions
Related to Foreman - Bug #9016: Fact import code consumes lot of memoryClosedLukas Zapletal01/18/2015Actions

Added by Dominic Cleal over 8 years ago

Revision e5381d3f (diff)

fixes #16576 - only load FactName IDs, not models during import

Restores behaviour from before c696f74, which only keeps FactName IDs to
avoid loading the entire model. For structured facts, the compose values
are also preloaded, so the model is only loaded and updated if the value
of compose changes from the preloaded value.

Added by Dominic Cleal over 8 years ago

Revision c2eca541 (diff)

fixes #16576 - only load FactName IDs, not models during import

Restores behaviour from before c696f74, which only keeps FactName IDs to
avoid loading the entire model. For structured facts, the compose values
are also preloaded, so the model is only loaded and updated if the value
of compose changes from the preloaded value.
(cherry picked from commit e5381d3ff9001d9fe3ce8d0f90afeec591571e97)

Actions

Also available in: Atom PDF