Mysql – EBS+RAID10+XFS slower than EBS+RAID10+EXT3 using MySQL

amazon ec2filesystemsMySQLraid10xfs

We're currently using EC2 with 16 EBS volumes in RAID10 configuration for our MySQL data. I know some people don't recommend to put EBS volumes to RAID but that's not what I'm concerned about at the moment. Current format is ext3, but we're experimenting with moving to xfs, given many reports that it is faster. However, we're actually experiencing a performance degradation when the partition was converted to xfs – a benchmark run with inserts, updates, selects and deletes was more than 10 seconds slower using xfs.

Any idea what could be the problem? Below is the fstab entry (really only changed ext3 to xfs). Database tables are innodb and we are using innodb_file_per_table.

/dev/mapper/vg_data-lv_data /data xfs noatime 0 0

Thanks.

Best Answer

The XFS filesystem always requires tuning. Running a default mkfs and mount will result in so-so performance. You'll want to set your allocation group number at filesystem creation time. Disabling write barriers may make sense. Also pay close attention to your filesystem usage and mount options on the specific kernel series you're using. Some interesting defaults were recently backported.

Also check your I/O elevator settings. Take a look at some of the recommendations at: CentOS 6 doing lots more IO than CentOS 5