Change ansible fact caching from jsonfile to memory for better performance#1502
Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom Mar 30, 2020
wangxin:ansible-fact-caching-memory
Merged
Change ansible fact caching from jsonfile to memory for better performance#1502liat-grozovik merged 1 commit intosonic-net:masterfrom wangxin:ansible-fact-caching-memory
liat-grozovik merged 1 commit intosonic-net:masterfrom
wangxin:ansible-fact-caching-memory
Conversation
…mance Changing ansible fact_caching from jsonfile to memory does not affect the test execution and can reduce around 20% of the overall test executing time. Signed-off-by: Xin Wang <[email protected]>
lguohan
approved these changes
Mar 28, 2020
liat-grozovik
approved these changes
Mar 30, 2020
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
…tilites submodules (sonic-net#7209) sonic-swss -[SFlowMgr] Sflow Crash on 200G ports handled (sonic-net#1683) -Stablize the test case (sonic-net#1679) -Remove PGs from an administratively down port. (sonic-net#1677) sonic-swss-common - fix getting hash from redis db (sonic-net#465) - [dbconnector] Initialize redisContext (sonic-net#464) sonic-utilities - route_check: Fix hanging & logging level (sonic-net#1520) - Add self timeout and crash if exceeded. (sonic-net#1502) - [reboot] User-friendly reboot cause message for kernel panic (sonic-net#1486) - [acl-loader]: do not add default deny rule for egress acl (sonic-net#1531) Signed-off-by: Danny Allen <[email protected]>
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
209b7ddec109587ddeb90071ca23ae6a288b1442 (HEAD -> 201911, origin/201911) Fixed the possibility of using uninitialized variable in route_check.py (sonic-net#1551) e30387cbebaaccbf9385059b1e501955c40be338 route_check: Fix hanging & logging level (sonic-net#1520) 3c8de6950615a4608a80e3d47ea678f8e8487186 Add self timeout and crash if exceeded. (sonic-net#1502) Signed-off-by: Abhishek Dosi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
Changing ansible fact_caching from jsonfile to memory does not affect the test execution and can reduce around 20% of the overall test executing time.
The reason is that ansible needs to parse and process all the cached facts before running EACH task in playbook. Currently the
fact_caching_timeoutin ansible/ansible.cfg is set to86400. The size of cached facts could accumulate to mega bytes. If all the facts are stored in jsonfile, then it may need nearly 1 second to parse and process the cached facts for each task. In our regression testing, we observed that CRM testing on t1-lag topology originally needs more than 2 hours to complete. With this change, it needs just around 40 minutes.If we change fact_caching method from jsonfile to memory, the cached facts are not persistent between ansible-playbook executions. But so far, the ansible playbooks do not need old cached facts. This change is safe.
Type of change
Approach
How did you do it?
Change
fact_cachingfromjsonfiletomemoryinansible.cfgHow did you verify/test it?
Tested in Mellanox lab.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation