Bug 673535
Summary: | Performance issue with repo.py::_get_existing_repo() | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | John Matthews <jmatthew> |
Component: | z_other | Assignee: | John Matthews <jmatthew> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | pkilambi, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 12:10:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 647488 |
Description
John Matthews
2011-01-28 15:50:03 UTC
Another note, this call is relied on heavily through out pulp. It's often called in loops that are processing packages. The change chosen was to convert repo["packages"] to a list of package ids, it is no longer a dictionary of package objects. http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=f2e1506eff24394206a191d39eb7f6edd859d45d QE: There is a script under pulp's git checkout, "playpen/perf/time_repos.py" which can be run to generate the timings in comment #0. I would recommend syncing a large repo and running it. You should see the _get_available_repos() call takes under a second to complete. Fixed in 0.134. verified [root@preethi perf]# ./time_repos.py time_get_available_repoids() @ time_repos.py:71 - 2 ids query for repositories took 0.00137710571289 seconds time_get_available_repoids() @ time_repos.py:76 - 2 ids query for repositories custom took 0.0001380443573 seconds time_get_existing_repo() @ time_repos.py:85 - All fields. Packages: 0 Length: 554 _get_existing_repo(foo) took 0.000941038131714 seconds time_get_existing_repo() @ time_repos.py:85 - All fields. Packages: 5932 Length: 2239867 _get_existing_repo(f14-update) took 0.328789949417 seconds time_get_existing_repo() @ time_repos.py:94 - Limited fields: Shortened fetch<no packages>: Length: 71 _get_existing_repo(foo) took 0.00431704521179 seconds time_get_existing_repo() @ time_repos.py:94 - Limited fields: Shortened fetch<no packages>: Length: 120 _get_existing_repo(f14-update) took 0.000724792480469 seconds time_package_lookups_batched() @ time_repos.py:119 - Full retrieval <batched> of Repo<554> foo and 0 packages<2> took 0.0267741680145 seconds. time_package_lookups_batched() @ time_repos.py:119 - Full retrieval <batched> of Repo<2239867> f14-update and 5932 packages<8252543> took 2.4161260128 seconds. [root@preethi perf]# [root@preethi perf]# rpm -q pulp pulp-0.0.134-1.fc14.noarch Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |