Description of problem: Removing orphaned units increases memory usage: ~2GB Version-Release number of selected component (if applicable): # rpm -qa | grep pulp m2crypto-0.21.1.pulp-8.el6.x86_64 python-oauth2-1.5.170-3.pulp.el6.noarch pulp-rpm-plugins-2.1.0-0.21.beta.noarch python-pulp-bindings-2.1.0-0.21.beta.noarch pulp-puppet-admin-extensions-2.1.0-0.21.beta.noarch python-isodate-0.5.0-1.pulp.el6.noarch python-pulp-puppet-common-2.1.0-0.21.beta.noarch python-rhsm-1.8.0-1.pulp.el6.x86_64 mod_wsgi-3.4-1.pulp.el6.x86_64 pulp-selinux-2.1.0-0.21.beta.noarch python-pulp-rpm-extension-2.1.0-0.21.beta.noarch python-pulp-client-lib-2.1.0-0.21.beta.noarch pulp-builtins-admin-extensions-2.1.0-0.21.beta.noarch pulp-rpm-admin-extensions-2.1.0-0.21.beta.noarch python-pulp-common-2.1.0-0.21.beta.noarch python-pulp-rpm-common-2.1.0-0.21.beta.noarch pulp-server-2.1.0-0.21.beta.noarch pulp-puppet-plugins-2.1.0-0.21.beta.noarch pulp-admin-client-2.1.0-0.21.beta.noarch [root@ec2-23-21-39-197 ~]# rpm -qa | grep grinder grinder-0.1.15-2.el6.noarch How reproducible: Always Steps to Reproduce: 1. pulp-admin rpm repo create --repo-id rhel6_x86_64 --feed-ca ./cdn.redhat.com-chain.crt --feed-cert ./1359391926_4512.crt --feed-key ./1359391926_4512.key --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.2/x86_64/os 2. pulp-admin rpm repo sync run --repo-id rhel6_x86_64 3. pulp-admin rpm repo delete --repo-id rhel6_x86_64 4. pulp-admin orphan remove --all Actual results: After sync, yet before orphan removal wsgi consuming ~3.5GB apache 10013 51.9 45.9 4798968 3517180 ? Sl 12:26 50:10 \_ (wsgi:pulp) After orphan removal: apache 10013 50.7 77.5 7233204 5932784 ? Sl 12:26 50:56 \_ (wsgi:pulp) Expected results: Less than 2GB of memory increase Additional info: # pulp-admin rpm repo create --repo-id rhel6_x86_64 --feed-ca ./cdn.redhat.com-chain.crt --feed-cert ./1359391926_4512.crt --feed-key ./1359391926_4512.key --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.2/x86_64/os Successfully created repository [rhel6_x86_64] [root@ec2-23-21-39-197 ~]# time pulp-admin rpm repo sync run --repo-id rhel6_x86_64 +----------------------------------------------------------------------+ Synchronizing Repository [rhel6_x86_64] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [|] ... completed Downloading repository content... [==================================================] 100% RPMs: 7281/7281 items Delta RPMs: 0/0 items Tree Files: 6/6 items Files: 0/0 items ... completed Importing errata... [|] ... completed Importing package groups/categories... [/] ... completed Publishing packages... [==================================================] 100% Packages: 7281/7281 items ... completed Publishing distributions... [==================================================] 100% Distributions: 6/6 items ... completed Generating metadata [|] ... completed Publishing repository over HTTPS [\] ... completed real 78m19.898s user 1m44.831s sys 0m6.317s You have new mail in /var/spool/mail/root [root@ec2-23-21-39-197 ~]# ps auxf | grep wsgi root 14820 0.0 0.0 103240 828 pts/2 S+ 14:03 0:00 \_ grep wsgi apache 10013 51.9 45.9 4798968 3517180 ? Sl 12:26 50:10 \_ (wsgi:pulp) You have new mail in /var/spool/mail/root [root@ec2-23-21-39-197 ~]# pulp-admin rpm repo delete --repo-id rhel6_x86_64 The request to delete repository [rhel6_x86_64] has been received by the server. The progress of the task can be viewed using the commands under "repo tasks" [root@ec2-23-21-39-197 ~]# pulp-admin orphan remove --all Request accepted check status of task 9cb7d468-d975-44f0-8a8b-9e89c4912671 with "pulp-admin tasks details" [root@ec2-23-21-39-197 ~]# ps auxf | grep wsgi root 14844 0.0 0.0 103240 828 pts/2 S+ 14:07 0:00 \_ grep wsgi apache 10013 50.7 77.5 7233204 5932784 ? Sl 12:26 50:56 \_ (wsgi:pulp) # pmap -d 10013 | tail -n 1 mapped: 7233204K writeable/private: 6155648K shared: 1004K
Compared against pulp 2.0.8 After sync of same rhel 6.2 repo, before pulp-admin orphan remove --all apache 11672 66.9 30.0 3487776 2298080 ? Sl 12:28 63:32 \_ (wsgi:pulp) After pulp-admin orphan remove --all apache 11672 60.3 44.6 4614620 3413852 ? Sl 12:28 64:13 \_ (wsgi:pulp) # pmap -d 11672 | tail -n 1 mapped: 4614620K writeable/private: 3614880K shared: 1004K Increase around 1.2 GB
Changed the way orphans are looked up in the database. Memory consumption should be much lower and quicker. Changes in master and pulp-2.1
build: 2.1.0-0.25.beta
Pulp 2.1 released http://www.pulpproject.org/2013/04/05/pulp-2-1-0-released/