June 18, 2013

Post: Rotating MySQL slow logs safely

MySQL because the OS serializes access to the inode during the truncate operation. This problem is particularly evident when using the ext3 file system (instead of xfs). Use FLUSH LOGS instead of sending SIGHUP When copytruncate is disabled, MySQL must be… practices: /var/mysql/slow_query.log { nocompress create 660 mysql mysql size 1G dateext missingok notifempty sharedscripts postrotate /usr/local/bin/mysql -e ‘select…

Post: Beware: ext3 and sync-binlog do not play well together

… –mysql-user=root –max-requests=0 –max-time=60 –mysql-db=test run On Dell R900 with CentOS 5.2 and ext3 filesystem… make sure but results were basically the same. Using XFS instead of EXT3 gives expected results – we get 2350 transactions/sec with…% overhead. EXT2 filesystem also behaves similar to XFS so it seems to be EXT3 specific performance issue. We do not know if…

Post: ext4 vs xfs on SSD

… else (i.e. xfs) should be used. Traditionally our recommendation is xfs, and it comes to known problem in ext3, where IO gets… that xfs is still preferable, but there is one more point to consider. Starting the MySQL 5.1 + InnoDB-plugin and later MySQLxfs 4 threads: 97 MiB/sec It corresponds to results I see running MySQL benchmarks (to be published later) on ext4 vs xfs

Post: Make your file system error resilient

… running mySQL Server. As far as I understand this problem is limited to EXT2/3/4 while over systems like XFS will… are valid. First with recent Linux versions and quality hardware EXT3 filesystem is extremely stable (EXT4 is good too though It… is probably not needed for partition you store MySQL data on, as chances are MySQL server is only one doing writes on…

Comment: Disaster: LVM Performance in Snapshot Mode

… quite important. I run “randomio” benchmark on ext3 filesystem and compared it with xfs. The difference with LVM snapshot is big. “randomio… on ext3 + snapshot performance. “randomio” might not be a good representation of what MySQL is doing so we are currently testing xfs with MySQL. But if my speculation are valid then I would expect a smaller degradation with xfs.

Post: Slow DROP TABLE

… be changing the file system. To XFS for example, which handles file removals much more efficiently: EXT3 mysql> drop table large_table; Query OK, 0 rows affected (7.44 sec) XFS mysql> drop table large_table; Query OK, 0 rows affected (0.29 sec) A better solution through MySQL internals could…

Comment: ext4 vs xfs on SSD

… vs XFS, on a RAID10 of spinning drives. Many DBAs like to assert that XFS is the way to go for MySQL, but I’m not sure how frequently they benchmark XFS vs ext4, and how much of their recommendation comes from the days of ext2/ext3. So I decided…

Post: Binary log file size matters (sometimes)

…-rw—- 1 mysql mysql 1073742171 Nov 2 15:15 /var/lib/mysqllogs/db1-bin-log.003229 -rw-rw—- 1 mysql mysql 1073742976 Nov 2… customers systems ran on ext3, which can be very slow deleting large files), then write operations in MySQL will suffer since that… take that long to remove. Note that on ext4 and xfs you should not have this problem as they would remove…

Post: Innodb Performance Optimization Basics

… backup. EXT3 file system works OK in most cases, though if you’re running in particular roadblocks with it try XFS. You… you wrestle OS so it would not swap out MySQL out of memory. MySQL Innodb Settings The most important ones are: innodb… about tuning other options here or read one of our MySQL Presentations. Application tuning for Innodb Especially when coming from MyISAM…

Post: Working with many files and file system fragmentation

… – this is a massive difference. The test was done on EXT3 and it looks like it does not do very good… example XFS with delayed allocation may be doing better job. I also would like to repeat the test with MySQL MyISAM tables and see how bad the difference would be for MySQL but I would expect something along those lines. Interesting enough…