MySQL and MariaDB innodb_file_per_table

For those of you pushing your MySQL instances to higher levels, you'll have realized at some point that all InnoDB tables share their indexing space into a single file (ibdata1, usually). This has several very bad outcomes:
  • the ibdata1 file becomes huge after some time (we've seen it pass the 8GB bar)
  • starting the MySQL server takes longer
  • deleting an InnoDB table *doesn't* reduce the space used by ibdata1
  • you have to shutdown your server, remove ibdata1 completely, then restart the server in order to reinitialize the ibdata1 file to a 0-size file (but th

Clean your Gallery 2 ImageBlockCacheMap table regularly

Supposedly, Gallery 2 has a process to clean this table periodically (through Cron, which you should always configure), but apparently sometimes this doesn't get to execute correctly. As a result, the rest of the cleanup will happen but this stable might not get cleaned, leading you to millions of rows of purely useless years-old cache junk. Fix it manually by issuing a "TRUNCATE [prefix]_ImageBlockCacheMap;" in your database, or install a more recent version of Gallery, or something like that, but make sure you always keep an eye on its size. Reference: http://galleryproject.org/node/30045