I’m running a large (>20TB) ext4 file system and noticed that the first substantial write operation after mounting is very slow and involves plenty of drive activity. The reason seems to be some memory structure initialisation as described here: https://linux-ext4.vger.kernel.narkive.com/SUFNE520/ext4-slow-performance-on-first-write-after-mount
The workaround is thankfully as simple as running this command in a script after mounting the file system:
cat /proc/fs/ext4/dm-0/mb_groups > /dev/null
The device (here: dm-0) probably will be something different in your setup.
Edit 29 Nov 2020: mb_groups seems to be a block allocation cache. Sources: kernel documentation
Tux by Larry Ewing in 1996, source Wikipedia