Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance impact due to No Fact caching #4375

Open
pemsith opened this issue Jan 8, 2025 · 0 comments
Open

Performance impact due to No Fact caching #4375

pemsith opened this issue Jan 8, 2025 · 0 comments

Comments

@pemsith
Copy link

pemsith commented Jan 8, 2025

Describe the bug
The repository contains Ansible playbooks that gather and utilize facts but do not specify a persistent cache plugin in the ansible.cfg file, instead uses the memory plugin. By default, the memory cache plugin is used, which only retains data during the current execution of Ansible and does not persist across runs. Without a persistent fact caching plugin, it shows low performance due to repeated fact gathering and increased memory consumption during long or complex playbook executions. The absence of a persistent cache plugin impacts scalability and efficiency, especially when working with large inventories or multiple playbook runs.

Expected behavior
The request is to either add the below suggested in your repo delivered ansible.cfg files or make a strong recommendation for users to update it as such.
An appropriate cache plugin should be configured in ansible.cfg to persist facts across Ansible runs. Plugins such as jsonfile, redis, or yaml can be used to store facts persistently, reducing repeated fact gathering, improving performance, and minimizing memory consumption.

Expected example configuration in ansible.cfg:
fact_caching = jsonfile
fact_caching_connection = /path/to/fact_cache
fact_caching_timeout = 7200

Versions:

  • OS - CentOS stream 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant