Extend swap area on Ubuntu 18.04

Expand swap area with ubuntu 18.04 Initially, there was only 2GB, and when the memory was exhausted, the swap was exhausted and dropped, so I had to increase the swap.

Turn off swap. If there is data in the swap, it will take some time because it can be stored in memory.

$ sudo swapoff /swapfile

Overwrite existing swapfile with new size

$ sudo fallocate -l 32G /swapfile

Permission settings

$ sudo chmod 600 /swapfile

Initialize

$ sudo mkswap /swapfile
mkswap: /swapfile: warning: wiping old swap signature.
Setting up swapspace version 1, size = 32 GiB (34359734272 bytes)
no label, UUID=869d1f34-eec7-475e-b871-471e4d5fa9f8

Turn on swap

$ sudo swapon /swapfile

Verification

$ sudo swapon --show
NAME      TYPE SIZE USED PRIO
/swapfile file  32G   0B   -2

reference How do I get more swap files in Ubuntu 18.04? Create / extend swap file in Ubuntu 18.04 LTS

Recommended Posts

Extend swap area on Ubuntu 18.04
Ubuntu swap area extension
tmux on Ubuntu
Screen recording on Ubuntu 20.04
Web Bluetooth on Ubuntu20.04
Try DisplayLink on Ubuntu 20.04
Reinstall Kubernetes on Ubuntu 19.10
Use Flutter on Ubuntu
Install pyqt5 on ubuntu
Install Ruby on Ubuntu 20.04
Setting JAVA_HOME on Ubuntu
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Apache2 on Ubuntu20.04 LTS
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run tiscamera on Ubuntu 18.04
Build Zabbix on Ubuntu 20.04
Create SSL certificate on Ubuntu 18.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Build VNC Server on Ubuntu 20.04
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Japanese input on Ubuntu20.04 Desktop
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install Arudino IDE on Ubuntu 20
Record video on ubuntu18.04 LTS
Introduced knowledge (wiki) on Ubuntu
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Run chromium-mir-kiosk on Ubuntu Core
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Run java applet on ubuntu
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Run Eclipse CDT on Ubuntu
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install AWS IoT Greengrass on Ubuntu
Using Azure IOT Hub on Ubuntu 20.10.
Installing Ruby + Rails on Ubuntu 18.04 (rbenv)
Install JDK and JRE on Ubuntu 16.10
Install ngrok on ubuntu16.04 using Vagrant
Build the latest Samba 4 on Ubuntu 20.04
How to use Bio-Formats on Ubuntu 20.04
Build a XAMPP environment on Ubuntu
Wake on Lan settings on Ubuntu 20.04.1 LTS
How to install WildFly on Ubuntu 18.04
Preparing to use electron-react-boilerplate on Ubuntu 20.4
Install MQTT broker Mosquitto on Ubuntu 18.04
Enable Java 8 and Java 11 SDKs on Ubuntu
Install SonarQube on ECS instance on Ubuntu 16.04