Adding Swap Space to Amazon EC2 Linux Micro Instance to Increase the Performance
Amazon EC2 Micro Instance comes only with 613MB of memory. Now, this is just not enough for running serious workloads. Other thing to note is that the Linux Micro Instance doesn’t have swap space. Follow these steps to add swap space and increase the performance of your Linux based Amazon EC2 Micro Instance.
Switch to root and follow these steps to add the swap space -
Type the following command with count being equal to the desired block size:
Setup the swap file with the command:
To enable the swap file immediately but not automatically at boot time:
To enable it at the boot time, add the following entry into /etc/fstab: