Search code examples
amazon-web-servicesamazon-ec2solid-state-drive

Mysql replication & Amazon EC2 SSD vs. Magnetic Disk


We have a replication setup on Amazon EC2 that used Magnetic disks (15GB) that we swapped with SSD disks (15GB) for each the replication servers. We noticed that the slaves would fall behind the master and never catch up with these new SSD disks. This is something that never happened with the Magnetic disks but happened on each and every SSD disk.

We decided to try and move the databases back to Magnetic disks after the SSD disks fell more than 2 days behind. Within 2 hours the slave completely caught up.

I thought that SSD disks were more efficient, and all around better than Magnetic disks and that is why Amazon decided to make them standard.

Another bit of information is that we are using Micro instances, but the only changes we made was with the attached disk.

Anyone have any ideas?


Solution

  • I think you might be bumping up against the max IOPS for your 15GB SSD drive.. Amazon only allows an average of 45 IOPS for that disk size. On a magnetic drive, they have an extra charge when you use more IOPS, it does not seem to be throttled in the same way:

    From Amazon's Pop Up on IOPS:

    The number of input-output operations per second. For Provisioned IOPS (SSD) volumes, you can specify the IOPS rate when you create the volume. The ratio of IOPS provisioned and the volume size requested can be a maximum of 30 (in other words, a volume with 3000 IOPS must be at least 100 GB). General Purpose (SSD) volume types have a baseline IOPS of volume size X 3 and can burst up to 3000 IOPS for 30 minutes.