Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple LAMP stack on an EBS Ubuntu instance on AWS EC2.

It's been running well for a while now, but I'm now starting to run low on hard disk space.

What are my options?

I've already attached an EBS volume and moved logs etc to it, but the MySQL database continues to grow.

Do I move the database to the attached volume? I have serious concerns about this though. Database speed is currently the performance bottleneck in the LAMP stack, and moving the database to an EBS could incur a considerable performance hit (if the speed of moving files to and from the volumes is anything to go by?)

share|improve this question

You should definitely move the database to an EBS-block. Not only are these volumes faster than local storage, they’re also persistent. So if/when an EC2 instance stops, the root filesystem for that instance remains intact and will continue to be usable if the instance is re-started.

From the Amazon help page on EBS:

The latency and throughput of Amazon EBS volumes is designed to be significantly better than the Amazon EC2 instance stores in nearly all cases. You can also attach multiple volumes to an instance and stripe across the volumes. This is one way to improve I/O rates, especially if your application performs a lot of random access across your data set.

The exact performance will depend on the application (e.g. random vs. sequential I/O or large vs. small request sizes), so the best measure is to benchmark your real applications against the volume. Because Amazon EBS volumes require network access, you will see faster and more consistent throughput performance with larger instances.

Whenever you still have an I/O bottleneck after that, you might want to consider using Amazon RDS.

share|improve this answer
Thanks so much. I'll do that. – aidan Nov 3 '11 at 10:37

Here are two options:

Option 1:

Move the MySQL database off your EC2 and onto RDS. It still runs MySQL and you can even choose the version. They provide help on migration.

Disadvantages: you will be paying for an additional instance, as the RDS instance is charged at the same rate as EC2. You will also have to tolerate some downtime.

Option 2:

Increase the size of the EBS volume.

Through the web interface you can do this by: - stopping the instance - create a snapshot of the volume - create a volume from the snapshot, specifying a larger size when prompted - create an AMI from the volume - start an instance of the new AMI

However, I have trouble with the new instance not starting. Through the API you can do this by following Eric Hammond's instructions here.

Disadvantages: once again, downtime.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.