- login as ec2-user with putty.
- sudo su
- dd if=/dev/zero of=/swapfile bs=1024 count=1048576
- /sbin/mkswap /swapfile
- /sbin/swapon /swapfile
- /sbin/swapon -s
Showing posts with label Memory. Show all posts
Showing posts with label Memory. Show all posts
Monday, January 2, 2012
Create Swap Space in Amazon EC2 instance
Just found out my Amazon EC2 micro instance does not have any swap space. The memory comes with the micro instance is enough for a regular PHP app, but not enough for any J2EE application. It's time to add a file system swap. Below are steps for creating a swapfile:
Subscribe to:
Comments (Atom)