Deleting 17k groups super slow in enviornments with lots of content (Docs, Folders, etc)

We have a need to remove about 17k unused groups from our system because they are triggering audits.  We have no need for the groups (they are an artifact of a process we don't use).  When we tested the removal utility in our dev environment on about 130 groups (PM executing Sub Process which removes 2k groups per instance and loops) it worked well and didn't take very long (about 30 seconds).  We then created a docker env and used automation to create 17k groups using that old process model and then ran the utility and it took about 10 minutes).  When we moved it to our PROD replication to test under full system load it took 24 hours with the 17k groups.  The difference in the PROD rep system is that it has all the other content as well (millions of docs and folders).  We also noticed the content engines were pegged at 100%.

Why does the total amount of content have an impact on group deletions?  Is it related to security of those content items being updated?  Is there another way to delete these groups not in a PM?

  Discussion posts and replies are publicly visible