I have a mysql (Percona) 5.7 instance with over 1Million tables. When I start the database, it can take more than an hour to start. Errorlog doesn't show anything, but when I trace mysqld_safe, I found out that MySQL is getting a stat on every file in the DB.
Any idea why this may happen? Also, please no suggestion to fix my schema, this is a blackbox. Also keep in mind that I've heard it all regarding how bad the design is....
stat(), loaded using
LD_PRELOAD,. I imagine it'd break things horribly though :) What filesysyem are you using & is it local or NFS/iSCSI/something else?
noatimeset? If not, you probably should. I'm not sure if it'll help with
stat(), as i'm unsure of whether that updates the
atimeof the file, but it's worth a try