Why is BusyBox find 10x slower than GNU find?
on a directory containing ~26 million files, GNU Find is 10 times faster than BusyBox find, why?
/var/www # time find /var/www -regex .*\.\(php\|js\|json\|html\|htm\|css\) -not -regex \(.*/docroot/external_libs/.*\|.*/docroot/phpmyadmin/.*\|.*/vendor/.*\|.*/data/vitec/.*\|.*/docroot/js/highcharts/.*\|.*/hotpatch_backups/.*\) -print0 > /dev/null
real 1m 20.09s
user 1m 6.94s
sys 0m 13.14s
/var/www # time busybox find /var/www -regex .*\.\(php\|js\|json\|html\|htm\|css\) -not -regex \(.*/docroot/external_libs/.*\|.*/docroot/phpmyadmin/.*\|.*/vendor/.*\|.*/data/vitec/.*\|.*/docroot/js/highcharts/.*\|.*/hotpatch_backups/.*\) -print0 > /dev/
null
real 13m 4.99s
user 1m 31.49s
sys 3m 16.60s
(Actually in production, we thought we saw busybox find being almost 30 times slower, 2 minutes to 60 minutes, but we’re unable to reproduce it)
Porting a system from Debian-linux (which defualts to GNU find) to Alpine-linux (which defaults to BusyBox find), and had a problem where a find command was hanging on Alpine but not on Debian.
Read more here: Source link