Bug 687353

Summary: Bind performance slowed by looking for gpg keys in large repos
Product: [Retired] Pulp Reporter: Jeff Ortel <jortel>
Component: z_otherAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: jason.dobies, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 22   
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:09:01 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 Jeff Ortel 2011-03-15 14:59:50 UTC
Description of problem:

Bind is slowed by assembling the list of gpg keys for large repos.

Version-Release number of selected component (if applicable):

0.151

How reproducible:

Always

Steps to Reproduce:
1.  Create a large repo 6k packages
2.  Bind the repo
3.
  
Actual results:

Performance degrades with the size of the repo.

Expected results:

Very fast regardless of the repo size.

Additional info:

KeyStore.keys_and_contents() uses KeyStore.keyfiles() which is designed to manage gpg link to published area and iterates the gpg key storage directory in the repo.   It should be using the general KeyStore.list() which iterates the published keys. 

keys_and_contents() should be updated to use list() and then read the key content.

I'll update the code comments to be clearer.

Comment 1 Jeff Ortel 2011-04-08 21:45:08 UTC
Fixed. a4eef6b0d5427c0a89516ca53efe1a9f4e5ab179
Added missing unit test for KeyStore as well.

Comment 2 Jeff Ortel 2011-04-11 14:08:06 UTC
build: 0.162

Comment 3 Jay Dobies 2011-04-13 19:22:51 UTC
Fixed in build 0.163.

Comment 4 Preethi Thomas 2011-06-08 12:20:45 UTC
verified
[root@10 ~]# time pulp-client consumer bind  --repoid=f15 
Successfully subscribed consumer [pulp-client] to repo [f15]


real	0m2.874s
user	0m0.307s
sys	0m0.076s
[root@10 ~]# 
[root@10 ~]# time pulp-client consumer bind  --repoid=f15-updates 
Successfully subscribed consumer [pulp-client] to repo [f15-updates]


real	0m3.117s
user	0m0.291s
sys	0m0.079s
[root@10 ~]# rpm -q pulp
package pulp is not installed
[root@10 ~]# rpm -q pulp-client
pulp-client-0.0.186-1.fc14.noarch

[root@preethi ~]# time pulp-admin consumer bind --id=pulp-client --repoid=f15-updates 
Successfully subscribed consumer [pulp-client] to repo [f15-updates]


real	0m2.053s
user	0m0.360s
sys	0m0.067s
[root@preethi ~]# time pulp-admin consumer bind --id=pulp-client --repoid=f15 Successfully subscribed consumer [pulp-client] to repo [f15]


real	0m1.848s
user	0m0.359s
sys	0m0.070s

Comment 5 Preethi Thomas 2011-08-16 12:09:01 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 6 Preethi Thomas 2011-08-16 12:21:45 UTC
Closing with Community Release 15

pulp-0.0.223-4.