I've been recently asked for advice on running MySQL on
EC2.
-
- Run only a one MySQL server process on the
instance.
- This bears repeating. Run only the MySQL server on the
instance. Not your app server, or your dev environment, or
your...
- Use the large or xlarge size, not the small size.
- Dedicate the additional partitions to be InnoDB
tablespaces.
- "Pre-heat" the tablespace partition with dd. That is, dd
if=/dev/urandom of=/path/to/part bs=8K before using the
partition.
- This is one of the times where it's worth it to run
tablespace on raw devices. Don't bother to put a filesystem down
on those partitions.
- Tune your database server. Get someone who knows MySQL tuning
to do it for you.
- Backup and Replicate with rigor. When an instance gets shut down, it …