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

pkg5 module - Speed up installing lists of packages (Check for all packages at once) #54281

Closed
danowar2k opened this issue Mar 23, 2019 · 7 comments
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bot_closed feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. packaging Packaging category solaris Solaris community support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@danowar2k
Copy link
Contributor

SUMMARY

As of right now, pkg5 processes a list of packages to install by filtering the packages by checking for each package if it is installed.

I measured the time it takes checking ten packages doing it this way. On my system it was 5 seconds.
I then measured the time it takes checking once for all ten packages, which was below 1 second.

I propose to change the way the pkg5 module checks when installing packages. I'll add a pull request for this later.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

pkg5

ADDITIONAL INFORMATION

This would greatly speed up the installation of multiple packages (the more packages the faster it is)

# Check for each package in a separate command
root@dev:/export/home/vagrant# time $(pkg list fh;pkg list gr;pkg list sfs;pkg list vedg;pkg list segj;pkg list adgf;pkg list aeg;pkg list ws;pkg list wf)

pkg list: no packages matching the following patterns are installed:
  fh

pkg list: no packages matching the following patterns are installed:
  gr

pkg list: no packages matching the following patterns are installed:
  sfs

pkg list: no packages matching the following patterns are installed:
  vedg

pkg list: no packages matching the following patterns are installed:
  segj

pkg list: no packages matching the following patterns are installed:
  adgf

pkg list: no packages matching the following patterns are installed:
  aeg

pkg list: no packages matching the following patterns are installed:
  ws

pkg list: no packages matching the following patterns are installed:
  wf

real    0m5,259s
user    0m3,542s
sys     0m1,428s
# Check for all packages in one command
root@dev:/export/home/vagrant# time $(pkg list fh gr sfs vedg segj adgf aeg ws wf)

pkg list: no packages matching the following patterns are installed:
  adgf
  aeg
  fh
  gr
  segj
  sfs
  vedg
  wf
  ws

real    0m0,599s
user    0m0,404s
sys     0m0,166s
@ansibot
Copy link
Contributor

ansibot commented Mar 23, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Mar 23, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. packaging Packaging category solaris Solaris community support:community This issue/PR relates to code supported by the Ansible community. labels Mar 23, 2019
@danowar2k
Copy link
Contributor Author

Hm, I forgot to add my commit hook to prepend all commit messages with the ticket number. Is that gonna be a problem?

@ansibot ansibot added the has_pr This issue has an associated PR. label Jul 27, 2019
@ansibot
Copy link
Contributor

ansibot commented Mar 27, 2020

Files identified in the description:
None

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. labels Mar 27, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Apr 7, 2020
@mkrizek
Copy link
Contributor

mkrizek commented Aug 19, 2020

!component =lib/ansible/modules/packaging/os/pkg5.py

@ansibot
Copy link
Contributor

ansibot commented Aug 19, 2020

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 19, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this as completed Aug 19, 2020
@ansible ansible locked and limited conversation to collaborators Sep 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bot_closed feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. packaging Packaging category solaris Solaris community support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants