3

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.

ewwhite
  • 194,921
  • 91
  • 434
  • 799

4 Answers4

1

XFS was slow on meta-data operations till 2.6.39, IIRC. Traditionally for this site you didn't mention what version of your server's kernel was. So we're only to guess now.

poige
  • 9,171
  • 2
  • 24
  • 50
  • That figures.. I'm just at 2.6.32-318. Can you point to any article/documentation I can read up more on this? Thanks. – Johann Tagle Jun 11 '12 at 13:40
  • @JohannTagle, http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E + http://lwn.net/Articles/438671/ + … well, google for it – poige Jun 11 '12 at 14:09
1

An acquaintance working for Percona (www.percona.com) suggested using the nobarrier mount option. It sped things up a lot.

1

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

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • 1
    "XFS filesystem always requires tuning" vs. http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E – poige Oct 15 '12 at 11:52
  • What about it? Mount options are important. Log size and account make a difference under real workloads as well. Now that there are other changes in the filesystem that have surfaced in Linux distributions, it makes sense to tweak. See: http://serverfault.com/questions/406069/why-are-my-xfs-filesystems-suddenly-consuming-more-space-and-full-of-sparse-file – ewwhite Oct 15 '12 at 12:43
  • The text says "use the defaults". The link you gave showed that added option now is also default. Is there still a controversy regarding it? – poige Oct 15 '12 at 12:55
0

Take a look slides from Pinterest guys: https://www.percona.com/live/mysql-conference-2015/sites/default/files/slides/all_your_iops_are_belong_to_usPLMCE2015.pdf

Few examples:

Kernel 3.13 + EXT4

4K RAID block, EXT4, kernel 3.13 Write throughput 87MB/sec 99th-percentile latency: 124ms

64K RAID block, EXT4, kernel 3.13 Write throughput 88MB/sec 99th-percentile latency: 122ms

Kernel 3.18 + XFS

4K RAID block, XFS, kernel 3.18 Write throughput 550MB/sec 99th-percentile latency: 3.7ms

64K RAID block, XFS, kernel 3.18 Write throughput 650MB/sec 99th-percentile latency: 6.2ms

Anatoly
  • 556
  • 3
  • 16
  • Hard to say if it's the kernel of the file system making the difference here. But we're to conclude that XFS is slightly slower for throughput but much lower latency? – Nic Cottrell Jul 23 '17 at 09:39