Skip to content

Instantly share code, notes, and snippets.

@lloydmeta
Created May 1, 2013 04:10
Show Gist options
  • Save lloydmeta/5493691 to your computer and use it in GitHub Desktop.
Save lloydmeta/5493691 to your computer and use it in GitHub Desktop.
Adding a swap file for 16GB m2.xlarge as per recommendations on Redis documentation http://redis.io/topics/admin
#8GB => set count=8192
#16GB => set count=16384 <-- for m2.xlarge with 16GB memory, as per official Redis documentation, use the same amount of swap as there is memory
sudo dd if=/dev/zero of=/var/swapfile bs=1M count=1657 &&
sudo chmod 600 /var/swapfile &&
sudo mkswap /var/swapfile &&
echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab &&
sudo swapon -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment