-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Host summary generation for large inventories is too slow #6991
Comments
Sound like a rinse-and-repeat of what #6290 did, just for all the other non-notification playbook_on_stats processing. |
@AlanCoding yep, exactly. |
This probably isn't incredibly urgent/pressing, because this code has existed in this slow state for quite some time as far as I can tell. |
Given that event processing time is effected by general backlog of other events to process I was not able to get a very consistent measurement, but can say that processing events on jobs that act on thousands of hosts happens in a reasonable amount of time, and that lag in event processing is no longer showing to be correlated with inventory size. Now strongest correlation is "when" the event occurred, e.g. if the system was backed up then, it is slow, if not, it can be fast. Closing as it is a net improvement. |
ISSUE TYPE
SUMMARY
Generate an inventory with 5000 hosts, and run a playbook.
Observe that the
playbook_on_stats
event takes a very long time (depending on total hosts, and how your inventory is structured, several minutes+) to show up.This code is super duper crazy slow (mostly because it generates lots of insert and update queries for large inventories):
https://github.com/ansible/awx/blob/devel/awx/main/models/events.py#L482
The text was updated successfully, but these errors were encountered: