Hey Rolf - ok, let’s see.
A pulp_rpm Publication includes a lot of entities - basically, all the files you find in /repodata. Deleting the publication cascades to deleting each of those as well. For 23K publications, this means A LOT of database work is going on. To each, we’re adding the startup cost, and network-cost, of pulp-cli. Even if all of that means each call takes, say, only 500msec - we’re still looking at more than 3 hours to get through 23K deletes. I expect that adding in the cli-startup and network time makes it more like ~1s per call, so 6+ hours.
You could set up your script to parallelize the calls. However, ‘delete’ calls don’t generate a background task; you’d just run out of httpd workers, and probably overwhelm postgres, while that was going on.
My thought is, you’re better off letting this happen as it is, and not try to convince pulp to do more deletes at once. This will let the instance continue doing the work it should be doing, while the deletes happen. Also, this should be a one-time cleanup - once it’s done, you’ll never need to delete that many publications at once.
If you really want to get the job done faster, you could remove pulp-cli from the timing by going to the REST APi directly (e.g., http DELETE publication-href-here) . You could even script that up to do the deletes in parallel (but see prev RE “overwhelm your instance”)