May 26, 2012

Post: Be careful rotating MySQL logs

log file is reopened MySQL will be practically unavailable causing unanticipated downtime. The workaround for this problem is very simple – instead of deleting MySQL log file… delete the log file you no more need. It can be also good idea to hook up log rotate to take care of MySQL logs so…

Post: Backing up binary log files with mysqlbinlog

… the binary log files which could still lead to data loss depending on the interval you back them up. Recently in MySQL 5… running. By default if you do not supply the binary log file, mysqlbinlog deletes and overwrites them all that is undesired behaviour…>&1 > /var/log/livebinlog/server2.log & As a great addition, older logfiles that have been rotated can be checked against the MySQL server’s…

Comment: How to calculate a good InnoDB log file size

…/lib/mysql> ls -lrth ib_logfile* -rw-r–r– 1 mysql mysql 400M Nov 22 09:00 ib_logfile1 -rw-r–r– 1 mysql mysql… 1 hour and the log rotates approximately every 2 hours, I probably don’t want to cut the log file size in 1/2…’ve found it’s easier to have clients understand their log file size is too big because “look, you only want an…

Post: Aligning IO on a hard disk RAID – the Theory

…than it used to when all we had were rotating hard disk drives. I think the reason is …page size is no bigger than stripe element; second – logs are actually written in 512 byte units (in …address (at a certain level) so when writing a file, file system decides how to distribute writes properly so …

Post: Win a free ticket to RailsConf!

…-log=/var/lib/mysql/mysqld.log # # If the root user has a password you have to create a # /root/.my.cnf configuration file with… be readable ONLY # for root ! /var/lib/mysql/mysqld.log { create 600 mysql mysql notifempty daily rotate 3 missingok compress postrotate # just if mysqld is…

Comment: Should MySQL update the default innodb_log_file_size?

… Performance MySQL book, was unaware of innodb_log_file_size until quite recently. I only read up on it when I spotted said log file being created every few seconds on one of my server. Setting it to a more sensible value reduced the rotation

Comment: How to calculate a good InnoDB log file size

… it’s fairly easy to have monitoring mark when a file was rotated, so I can have it figured out automatedly. Then… for a MySQL Monitoring system, whether it’s the Enterprise offering from Sun, or a cacti monitoring thing (frequency of log rotation) or…

Comment: Is your server's performance about to degrade?

… disk, it might have to flush up to the entire file-size of data to disk. Afaik this behaviour has changed… moment MySQL issued the sync. And that sync is by default only issued inside the binlog-rotation code, within the global logging-lock…