Publish and Promote slow with 3.11/4.13

O.K. I thought that only handles content cleanup. I ran

# foreman-rake katello:delete_orphaned_content RAILS_ENV=production

as it is started from cron on Sunday evening.

The pulp task seems to be working in the background much longer than the foreman task. I have checked the pulpcore.core_task table and it brought down the number of rows from

pulpcore=# select count(*),min(started_at) from core_task;
 count   |              min              
---------+-------------------------------
 2385487 | 2022-07-13 19:05:10.345702+02
(1 row)

to

pulpcore=# select count(*),min(started_at) from core_task;
 count |              min              
-------+-------------------------------
 96096 | 2022-07-19 15:24:09.422494+02
(1 row)

However, that doesn’t really changes the performance of that query above. It’s actually worse, although it’s only using one worker now instead of two.

pulpcore=# explain analyze SELECT "core_task"."pulp_id", "core_task"."pulp_created", "core_task"."pulp_last_updated", "core_task"."state", "core_task"."name", "core_task"."logging_cid", "core_task"."unblocked_at", "core_task"."started_at", "core_task"."finished_at", "core_task"."error", "core_task"."enc_args", "core_task"."enc_kwargs", "core_task"."worker_id", "core_task"."parent_task_id", "core_task"."task_group_id", "core_task"."reserved_resources_record", "core_task"."pulp_domain_id", "core_task"."versions" FROM "core_task" WHERE ("core_task"."state" IN ('waiting', 'running', 'canceling') AND "core_task"."unblocked_at" IS NOT NULL) ORDER BY "core_task"."pulp_created" ASC;
                                                     QUERY PLAN                                                      
---------------------------------------------------------------------------------------------------------------------
 Sort  (cost=239975.67..239975.67 rows=1 width=2160) (actual time=565.910..565.911 rows=0 loops=1)
   Sort Key: pulp_created
   Sort Method: quicksort  Memory: 25kB
   ->  Seq Scan on core_task  (cost=0.00..239975.66 rows=1 width=2160) (actual time=565.902..565.903 rows=0 loops=1)
         Filter: ((unblocked_at IS NOT NULL) AND (state = ANY ('{waiting,running,canceling}'::text[])))
         Rows Removed by Filter: 96096
 Planning Time: 0.128 ms
 Execution Time: 565.934 ms
(8 rows)

The load on the server it low right now so I am starting a publish task now and post a followup soon.

1 Like