Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I'm currently running an ec2 micro instance and i've been finding that the instance occasionally runs out of memory.

Other than using a larger instance size, what else can be done?    

1 Answer

0 votes
by (18.2k points)

You can use Paging to add a supplement virtual memory on your server. This supplement memory doesn't reside on the physical memory assigned to the machine, it's a space made on a hard disk and saved for using as extra memory by your machine or server.

You can add this extra memory to your instance using the following commands:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024

sudo /sbin/mkswap /var/swap.1

sudo chmod 600 /var/swap.1

sudo /sbin/swapon /var/swap.1

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

+1 vote
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...