Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-25157

Some slow queries causing Pulp performance degradation

XMLWordPrintable

    • Moderate
    • No

      Description of problem:
      After upgrading to Satellite 6.15, we are observing slight performance degradation in Pulp due to the some slow queries.

      Many of the following slow queries can be seen in the database logs.
      ~~~
      LOG: duration: 6680.679 ms statement: SELECT 1 AS "a" FROM "core_task" WHERE ("core_task"."pulp_created" < 'xxxxxxxxxxxxx'::timestamptz AND "core_task"."state" IN ('waiting', 'running', 'canceling') AND "core_task"."reserved_resources_record" && (ARRAY['/pulp/api/v3/domains/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/', '/api/v3/distributions/', 'shared:/api/v3/distributions/'])::text[]) LIMIT 1

      LOG: duration: 3716.612 ms statement: SELECT "core_userrole"."pulp_id", "core_userrole"."pulp_created", "core_userrole"."pulp_last_updated", "core_userrole"."user_id", "core_userrole"."role_id", "core_userrole"."content_type_id", "core_userrole"."object_id", "core_userrole"."domain_id" FROM "core_userrole" INNER JOIN "core_role" ON ("core_userrole"."role_id" = "core_role"."pulp_id") WHERE ("core_userrole"."object_id" IN ('XXXXXXXXXXXXXXXXXXXX') AND "core_role"."name" = 'core.task_owner') ORDER BY "core_userrole"."pulp_created" DESC
      ~~~

      How reproducible:
      When there are millions of undeleted and completed pulp tasks.

      Additional info:
      This is caused by missing indexes in core_task table and userrole table.

              jira-bugzilla-migration RH Bugzilla Integration
              rhn-support-hyu Hao Chang Yu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: