0 votes
1 view
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.6k 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

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...