Forum archive
Advice on MySQL (MariaDB) and optimize.
I have been using the new LAMP stack V15 in production about a week now... so far LOVE it.
I am running into an old issue... that I "fixed" for me with the V14 LAMP and that is the daily optimization of the MySQL tables.... my tables are so large that when it starts it brings my server to its knees and users can't work.
I see in the scheduled cron jobs this:
/etc/cron.daily/bsdmainutils
/etc/cron.daily/mysqloptimize
/etc/cron.daily/apache2
/etc/cron.daily/dpkg
/etc/cron.daily/ntp
/etc/cron.daily/etckeeper
/etc/cron.daily/logrotate
/etc/cron.daily/passwd
/etc/cron.daily/man-db
/etc/cron.daily/apt-compat
That runs at 6am every day....
Is the 2nd line there "mysqloptimize' causing my issue? and if so how can I remove just it from the job as it appear I can not edit that job.
I could create a new job with everything BUT that in it....
This question is in searching the web I find that many people seem to think its not necessary to optimize INNODB tables... only MYISAM tables.... which I am not using MYISAM at all in my tables.
Anyone have an opinion on this, or know something I dont?
Thanks!
Ok... regarding disabling the daily MySQL optimize I think perhaps the better solution was to edit the file that runs rather than the job....
so I edited the file referenced in the job:
/etc/cron.daily/mysqloptimize
And commented out the line that runs the command:
from this:
#!/bin/sh
mysqloptimize --defaults-file=/etc/mysql/debian.cnf --all-databases > /dev/null
to this:
#!/bin/sh
#mysqloptimize --defaults-file=/etc/mysql/debian.cnf --all-databases > /dev/null