In case you need more swap and can’t create new partitions, here is a trick.

We’re using and adding, in this case, 512MB of swap file to the box

swapfileX where X is an integer >= 1

$ dd if=/dev/zero of=/swapfileX bs=1024 count=524288; chown root:root /swapfileX; chmod 0600 /swapfileX; mkswap /swapfileX; swapon /swapfileX

To make the change permanent across reboots, add

/swapfileX none swap sw 0 0

In /etc/fstab

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s