Welcome to JetCobot repository
11. Increased swap space
Increase swap space
xxxxxxxxxxEnter the following commands in sequence to increase the swap space by 3G and solve some program errors that run out of memory.sudo fallocate -l 3G /var/swapfilesudo chmod 600 /var/swapfilesudo mkswap /var/swapfilesudo swapon /var/swapfilesudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'- Add custom swapfile file size
sudo fallocate -l 3G /var/swapfile
- Configure file permissions
sudo chmod 600 /var/swapfile
- Create a swap partition
sudo mkswap /var/swapfile
- Enable swap partition
sudo swapon /var/swapfile

- Set to automatically enable swapfile
sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'
To see the effect, open the terminal and input
xxxxxxxxxxjtop

Swap becomes 6g.