0

Hello has anyone had a similar problem to this.. I've set up a new instance on Amazon EC2 for a client. I've also attached a 250GB EBS volume to hold the files and configured mySQL to use the EBS volume.

Following http://aws.amazon.com/articles/1663?_encoding=UTF8&jiveRedirect=1 - everything was set up fine -

sudo mkdir /vol/etc /vol/lib /vol/log
sudo mv /etc/mysql     /vol/etc/
sudo mv /var/lib/mysql /vol/lib/
sudo mv /var/log/mysql /vol/log/

sudo mkdir /etc/mysql
sudo mkdir /var/lib/mysql
sudo mkdir /var/log/mysql

echo "/vol/etc/mysql /etc/mysql     none bind" | sudo tee -a /etc/fstab
sudo mount /etc/mysql

echo "/vol/lib/mysql /var/lib/mysql none bind" | sudo tee -a /etc/fstab
sudo mount /var/lib/mysql

echo "/vol/log/mysql /var/log/mysql none bind" | sudo tee -a /etc/fstab
sudo mount /var/log/mysql

However the problem I'm facing is that for some reason after moving mysql to the EBS, innoDB writes and updates have slowed down almost tenfold, whereas myISAM is fine.

Has anyone seen something similar to this? Cheers

williamsowen
  • 1,167
  • 3
  • 16
  • 25

1 Answers1

2

In general, the EBS volumes have been criticized for general inconsistency in performance. That being said, there are other ways to speed up performance. For example, apparently pre-allocating the space (i.e., writing out 1s for all the memory) speeds up future writes. See this existing serverfault question for more info. There are several good links there, but to sum it up:

  • JFS seems to provide the highest performance.
  • Allocating space when writing for the first time is very slow.
  • You can put two EBS volumes in RAID10 for better performance.

Be sure to learn from others' mistakes, however... Reddit, specifically, suffered massive downtime when the EBS volumes went down.

Andrew M.
  • 11,182
  • 2
  • 35
  • 29
  • 1
    EBS volumes have a first *use* performance penalty for each block. It doesn't matter if that first use is read or write. I recommend reading all the blocks on a disk instead of writing as the writing causes the snapshots to be larger and more expensive. – Eric Hammond Dec 15 '11 at 03:47
  • Useful info with instructions on how to read all blocks on your EBS volume: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-initialize.html – jstell Aug 24 '16 at 15:10