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

using set_stats with large amounts of data slows down UI and API endpoints #8006

Closed
ryanpetrello opened this issue Aug 26, 2020 · 1 comment

Comments

@ryanpetrello
Copy link
Contributor

ryanpetrello commented Aug 26, 2020

  1. Create an inventory w/ 25+ (local connection) hosts.
  2. Run this playbook w/ a 100MB artifact file for set_stats:
---
- hosts: all
  connection: local
  tasks:
  - set_stats:
      data:
        random_data: "{{ lookup('file', 'random_data.txt') }}"
    delegate_to: localhost
bash-4.4$ base64 /dev/urandom | head -c 100000000 > random_data.txt
bash-4.4$ du -h random_data.txt
96M	random_data.txt
  1. Go to /api/v2/inventories/N/hosts/
  2. Become very, very sad:

image

ryanpetrello added a commit to ryanpetrello/awx that referenced this issue Aug 26, 2020
see: ansible#8006

this data can be *really* large, and we don't actually need it for the summary fields on this API endpoint
ryanpetrello added a commit to ryanpetrello/awx that referenced this issue Aug 26, 2020
see: ansible#8006

this data can be *really* large, and we don't actually need it for the summary fields on this API endpoint
ryanpetrello added a commit to ryanpetrello/awx that referenced this issue Aug 26, 2020
see: ansible#8006

this data can be *really* large, and we don't actually need it for the summary fields on this API endpoint
@one-t
Copy link
Contributor

one-t commented Sep 1, 2020

Tested using a slightly modified example playbook on a local k8s install.

---
- hosts: all
  connection: local
  tasks:
  - shell: 'base64 /dev/urandom | head -c 100000000 > random_data.txt'
    run_once: true
  - set_stats:
      data:
        random_data: "{{ lookup('file', 'random_data.txt') }}"
    delegate_to: localhost

This is now working as expected, response times were around 0.05 seconds, which is normal for this installation.

@one-t one-t closed this as completed Sep 1, 2020
AlanCoding pushed a commit to AlanCoding/awx that referenced this issue Sep 10, 2020
see: ansible#8006

this data can be *really* large, and we don't actually need it for the summary fields on this API endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants