Publish and Promote slow with 3.11/4.13

O.K. I did the definitive test: I have created a copy of the “Alma Linux 9 & EPEL 9” content view for which I gave the detailed execution times above.

To have comparable numbers, I tested during a time which not too much traffic. Without any additional indices I ran the first two “Publish & Promote” to publish a new version and promote it to the testing environment. I have waited between both and the following actions to let everything else “settle” (sync to content proxy, update content counts) until the load of the server was back close to almost 0.

  1. The first publish and promote of the very first version of this CV took 588s, almost 10 minutes.
  2. The second publish and promote of this CV took 722s, i.e. 12 minutes.

Now I added one index:

pulpcore=# CREATE INDEX ON core_task ( state );
CREATE INDEX

and ran

  1. the third publish and promote of this CV (with state index) took 98s! 1,5 minutes!

All those long running queries in the logs were gone. Only three katello queries were logged. That’s it. And unlike before, the server load stayed much lower and I didn’t see all those busy SELECT queries in pg_stat_activity or with top. As I didn’t really believe those numbers, I did another one:

  1. the fourth publish and promote of this CV (with state index) took 114s, 2 minutes.

So I have dropped the index again

pulpcore=# DROP INDEX "core_task_state_idx";
DROP INDEX

and did the final

  1. fifth publish and promote (without state index) took 729s, i.e. a little over 12 minutes.

I then went into the pulpcore github repository. It seems I am not the first to notice:

This adds an index for the state column.

However, it has only been added from pulpcore 3.54.0

So maybe it can be backported?

1 Like