Ubuntu 18.04: Create/Modify SWAP partition memory limit.

Common error:
fallocate: fallocate failed: Text file busy in ubuntu OS 

Check the allocation:
free -m
or
sudo swapon --show

Make sure you have enough free disk space by
df -h

Disable the use of swap, allocate new swap space, enable swap.
sudo swapoff -a

sudo fallocate -l 8G /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Check the allocation:
free -m
or
sudo swapon --show

For detailed information: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04

3 comments:

  1. Great insights! I really appreciate how clearly you’ve outlined the topic. Your post has provided some valuable clarity. Thanks for sharing!

    ReplyDelete

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...