I was running my wordpress site on Amazon EC2 Ubuntu micro instance and it was performing pretty good. Even though I did not see any issue with this setup (micro instance), I decided to upgrade to small instance. The cost of small instance is approx 2.5 times of micro instance.
Reasons for the upgrade
- Small instance gives you 1.7GB memory as compared to 0.6GGB RAM. So far I have been on the border in terms of memory usage. Now I can increase php apc memory size.
- Small instance provide compute unit of 1 (1 core x 1 unit). Micro instance provides 2 compute units (only for short bursts). Otherwise it is a fraction of what small instance provides.
- Small instance has better io performance and more storage.
Steps to upgrade
The easiest option it to shutdown the instance and then change the instance type. With this approach no data copying will be required. Here are the steps:
- First make sure you take a snapshot of your EBS volume in case something goes wrong. Click on Volumes, select desired EBS volume, click action and then click create snapshot. Here is how it looks in AWS console.
Name the snapshot appropriately when asked and wait till the snapshot creation is completely done. You can check the status by clicking on snapshots left menu. - Now ensure that your instance shutdown behavior is set to “stop” and not “terminate”. Otherwise shutting down the instance will terminate it. You can view the current value by going to Action -> Change shutdown behavior.
- Select the instance and click shutdown from the action menu. Wait till the shutdown is complete. Click on Action again and click “Change Instance Type”.
- Select the small instance from the list and click “Yes, Change” as shown below.
- Now start the instance (from Action menu). You may have to re-attach any elastic IP address which was earlier attached to this instance.
- Connect to the Linux machine and run
cat /proc/meminfo
. You should see something like this.MemTotal: 1692584 kB MemFree: 1260636 kB ...
Here the total memory is approx 1.69GB which is as expected.