Hi, I have added a test to benchmark the deletion of groups on a system with tens of thousands of users, and it is indeed (still) not great.
However, removing the overhead described in this bug (and replacing it with *nothing*) only yields < 10-15% speed-up. I would not be opposed to relying on the failure of userdel if it meant a real boost, but I am tempted to say that this decade-old problem might be better taken up with the passwd package. Here is a snippet of the performance test output. The times for comparable groups are shown both for delgroup and for groupdel. ok 2 - populated 10000 groups in 4 seconds (< 120). ok 3 - command success: /usr/sbin/delgroup --quiet dgpg_3 ok 4 - delgroup dgpg_3 took 8s (< 30). ok 5 - command success: /usr/sbin/delgroup --quiet dgpg_3333 ok 6 - delgroup dgpg_3333 took 9s (< 30). ok 7 - command success: /usr/sbin/delgroup --quiet dgpg_6666 ok 8 - delgroup dgpg_6666 took 11s (< 30). ok 9 - command success: /usr/sbin/delgroup --quiet dgpg_9998 ok 10 - delgroup dgpg_9998 took 13s (< 30). ok 11 - command success: /usr/sbin/groupdel dgpg_4 ok 12 - groupdel dgpg_4 took 11s (< 30). ok 13 - command success: /usr/sbin/groupdel dgpg_3334 ok 14 - groupdel dgpg_3334 took 10s (< 30). ok 15 - command success: /usr/sbin/groupdel dgpg_6667 ok 16 - groupdel dgpg_6667 took 11s (< 30). ok 17 - command success: /usr/sbin/groupdel dgpg_9999 ok 18 - groupdel dgpg_9999 took 13s (< 30). Any objections to either moving this bug to passwd, or just wontfix'ing this? Cheers, Matt
signature.asc
Description: This is a digitally signed message part