Ask Your Question

puppet facter or facter -p very slow

asked 2018-05-22 09:58:55 -0600

jimr-piq gravatar image

updated 2018-05-30 23:41:59 -0600

joshc gravatar image

Any hints on how to troubleshoot?

Naturally I'd immediately suspect one of my custom facts but I've looked at and tested each one of them, there are 14, and I see no issues.

10 of the 14 custom facts are just a very simple regex based on another fact. For example:

my_hostname = Facter.value(:fqdn)
if my_hostname =~ /^adsgateway\-.+?\.sec\.placeiq\.net/ 

time facter:
real    0m0.268s
user    0m0.162s
sys     0m0.102s

time puppet facts
real    0m6.916s
user    0m6.219s
sys     0m0.686s
edit retag flag offensive close merge delete


--debug and watch for pauses as a starter?

jpsheffield gravatar imagejpsheffield ( 2018-05-23 10:30:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-30 23:50:11 -0600

joshc gravatar image

Facter has a --timing CLI option, which can provide more useful metrics in the first case. I don't know if you can set timing as a facter setting, so that you get the same results through puppet facts.

Another thing to check is whether you're running native facter in both cases? Did you install puppet as a gem or from a package? Facter 3.0 and up is native facter.

Finally, puppet facts will include additional external fact directories, which facterwon't. See for default locations. You can force facter to behave similarly, by giving it the same list of external facts directories that puppet does when running puppet facts, see

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-05-22 09:58:55 -0600

Seen: 207 times

Last updated: May 30