-
Notifications
You must be signed in to change notification settings - Fork 43
adding more swap memory to ec2
Shashike Jayatunge edited this page Apr 13, 2021
·
3 revisions
follow this tutorial: https://dev.to/hardiksondagar/how-to-use-aws-ebs-volume-as-a-swap-memory-5d15
# check volumes
lsblk
output:
loop0 7:0 0 55.5M 1 loop /snap/core18/1988
loop1 7:1 0 70.4M 1 loop /snap/lxd/19647
loop2 7:2 0 55.5M 1 loop /snap/core18/1997
loop3 7:3 0 31.1M 1 loop /snap/snapd/11036
loop4 7:4 0 32.3M 1 loop /snap/snapd/11588
loop5 7:5 0 33.3M 1 loop /snap/amazon-ssm-agent/3552
loop6 7:6 0 69.9M 1 loop /snap/lxd/19188
nvme0n1 259:0 0 8G 0 disk
└─nvme0n1p1 259:1 0 8G 0 part /
nvme1n1 259:2 0 2G 0 disk
sudo mkswap /dev/nvme1n1
#enable swap
sudo swapon /dev/nvme1n1
sudo nano /etc/fstab
/dev/nvme1n1 none swap sw 0 0
sudo swapon --show