Fact import triggers ip conflicts checks, which drives cpu utilization to 100% on smart-proxy
This is an expensive call, and performing lots of them has a serious impact on smart-proxy. See http://projects.theforeman.org/issues/12392 for more details and discussion.
#3 Updated by Dominic Cleal about 5 years ago
From #12392, Dmitri says:
It might be possible to set some flag indicating that fact import is in progress, but it's going to be messy.
When saving hosts during fact/report importing we use
.save(:validate => false) - not really in an attempt to disable validation, but to disable orchestration (as I understand it). The same isn't done for saving network interfaces, and now that orchestration's in those models, it's running.
If we had a flag to disable orchestration generally instead of disabling validation, we might be able to keep validation on NICs (something we really shouldn't go backwards on by disabling) while disabling orchestration changes at a high level?
#5 Updated by Timo Goebel over 4 years ago
Makes this worse as Foreman now does two calls to smart-proxy during fact import effectively doubling the load.
#7 Updated by Dmitri Dolguikh over 4 years ago
If you are using ISC dhcpd, I would suggest testing import against changes in https://github.com/theforeman/smart-proxy/pull/409, calls to smart-proxy's dhcp module (when used with ISC dhcpd) no longer incur heavy penalty.