Adobe Introduces Powerful Generative AI Tools in Photoshop
Artificial Intelligence

Adobe Introduces Powerful Generative AI Tools in Photoshop Beta

by Veronica
June 1, 2023
2

Adobe Photoshop beta AI will take your creativity to the...

Read more
Adobe Photoshop's Generative Fill Feature

Exploring the Power of Adobe Photoshop’s Generative Fill Feature

June 1, 2023
ChatGPT app

The Easiest Way to Download ChatGPT App Free

June 1, 2023
Nvidia Unveils Futuristic Gaming Experience at Computex 2023

Nvidia Unveils Futuristic Gaming Experience at Computex 2023, Blending Gaming and AI

May 29, 2023
NVIDIA and Microsoft Partner to Accelerate AI

NVIDIA and Microsoft Partner to Accelerate AI

May 25, 2023
How to install AutoGPT on docker

How to download Auto GPT on Docker

May 4, 2023
Flowise AI A Drag-and-Drop UI for Building LLM Flows

Flowise AI: A Drag-and-Drop UI for Building LLM Flows

May 23, 2023
Microsoft research Reveals GPT-4 AI

Microsoft research Reveals GPT-4 AI Shows Promising Signs of Common Sense and Human-Like Reasoning

May 20, 2023
How to access ChatGPT 4 for free

How to Access ChatGPT 4 for Free

April 26, 2023
generative AI

How Generative AI is Changing the World

June 1, 2023
Fine-Tuning a ChatGPT Model

Fine-Tuning a ChatGPT Model: The Ultimate Guide to Optimizing Your Conversational AI

May 16, 2023
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Linux

How to Add Swap Space on Debian 11

by Cloudbooklet
February 1, 2022
in Linux
Reading Time: 5 mins read
How to Add Swap Space on Debian 11
Share on FacebookShare on TwitterShare on WhatsAppShare on Telegram

How to Add Swap Space on Debian 11. Swap Space is a space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space.

Swap space can help machines with a small amount of RAM. In case you choose a VM instance with 600 MB RAM, then your memory will get exhausted and you will get cannot allocate memory.

You might also like

Best PHP-FPM Configuration - Easy and Simple Calculation

Best PHP-FPM Configuration – Easy and Simple Calculation

June 1, 2023
How to Use ChatGPT in Linux Terminal

How to Use ChatGPT in Linux Terminal

May 19, 2023

This guide provides the steps required to add swap space on Debian 11.

Check Swap Space

Check whether your Debian server already has a swap space available. More often virtual machines don’t have a swap space enabled by default. Check swap space with the following command.

sudo swapon --show

If you don’t get any output, then your server don’t have any swap space. It’s time to add swap memory.

01. Creating a Swap File

Now you can create a swap file to add 1 GB (1G) space. You can also increase the amount of space you need.

sudo fallocate -l 1G /swapfile

02. Set up Swap File Permissions

Now you have a swap file of correct size and can be enabled as swap space.

Proceed by setting up correct permissions.

sudo chmod 600 /swapfile

03. Set up a Swap Space

You can now mark the file as swap space with the mkswap command.

sudo mkswap /swapfile

You will receive the output similar to this.

Output
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=f59595fb-754b-47ae-af6b-8dd6e98654d8

04. Enable Swap Space

Enable the swap space and allow the system to utilise the space.

sudo swapon /swapfile

Verify that the swap is available by typing:

sudo swapon --show
Output
NAME TYPE SIZE USED PRIO
/swapfile file 1024M 0B -2

You can check the output of the free utility again.

free -h
Output
total used free shared buff/cache available
Mem: 581M 275M 62M 103M 243M 110M
Swap: 1.0G 0B 1.0G

05. Making the Swap File Permanent

Install nano editor.

sudo apt install nano

Now swap space is only created for the current session. If you reboot the server the current changes will be gone. So you can make this setting permanent by adding the swap file to our /etc/fstab file.

sudo nano /etc/fstab

Add the following at the end of the file.

/swapfile swap swap defaults 0 0

Configure Swappiness Value

The swappiness parameter allow to configure how often your system swaps data out of RAM to the swap space.

This value will be between 0 to 100 in percentage. The values close to zero, the kernel will not swap data to the disk unless absolutely necessary. The higher the value that are closer to 100 will try to put more data into swap in an effort to keep more RAM space free.

So, telling the system not to rely on the swap much will generally make your system faster.

You can see the current swappiness value by typing:

cat /proc/sys/vm/swappiness
Output
60

Now set the value to 10 with the following command.

sudo sysctl vm.swappiness=10
Output
vm.swappiness = 10

You can make this value permanent by adding the line to your /etc/sysctl.conf file.

sudo nano /etc/sysctl.conf

At the bottom, add the following line.

vm.swappiness=10

Hit Ctrl+X followed by Y and Enter to save and close the file.

Removing Swap Space

To remove a swap space you need to swapoff the space, remove the entry from the /etc/fstab file and finally delete the swap file.

sudo swapoff -v /swapfile

Edit the /etc/fstab file and remove the swap file entry /swapfile swap swap defaults 0 0

Finally, delete the swap file.

sudo rm /swapfile

Conclusion

Now you have learned how to create a swap file, activate, configure swap space and remove the swap space on your Debian 11 server.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.

Tags: Debian
Share1Tweet1SendShare
Cloudbooklet

Cloudbooklet

Help us grow and support our blog! Your contribution can make a real difference in providing valuable content to our readers. Join us in our journey by supporting our blog today!
Buy me a Coffee

Related Posts

Install WordPress with Docker Compose, Nginx, Apache with SSL

WordPress Deployment Made Easy: Docker Compose, Nginx, Apache, SSL Setup Guide

May 20, 2023
How to Install WordPress on Docker

How to Install WordPress on Docker for Windows, macOS, and Linux

May 20, 2023
How to install python on Ubuntu

How to Install Python on Ubuntu 22.04?

May 31, 2023
what's new in node.js 20

What’s new in Node.js 20?

April 23, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

  • Trending
  • Comments
  • Latest
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

May 30, 2023
DragGAN AI editing Tool Install and Use DragGAN Photo Editor

DragGAN AI editing Tool Install and Use DragGAN Photo Editor

May 27, 2023
Bard API key

Everything You Need to Know About Google’s Bard API Key

May 20, 2023
Install PHP 8.1 on Ubuntu

How to Install or Upgrade PHP 8.1 on Ubuntu 20.04

May 17, 2023
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

79
Upgrade PHP version to PHP 7.4 on Ubuntu

Upgrade PHP version to PHP 7.4 on Ubuntu

28
Install Odoo 13 on Ubuntu 18.04 with Nginx - Google Cloud

Install Odoo 13 on Ubuntu 18.04 with Nginx – Google Cloud

25
Best Performance WordPress with Google Cloud CDN and Load Balancing

Best Performance WordPress with Google Cloud CDN and Load Balancing

23
Best PHP-FPM Configuration - Easy and Simple Calculation

Best PHP-FPM Configuration – Easy and Simple Calculation

June 1, 2023
ChatGPT Shared Links

ChatGPT Shared Links: A New Way to Share Your Conversations

June 1, 2023
Deepfake

Deepfake: The Rise of Synthetic Media

June 1, 2023
How to Setup SSH Keys on Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

May 31, 2023

Popular Articles

  • DragGAN The AI-Powered Image Editing Tool

    DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

    1516 shares
    Share 606 Tweet 379
  • DragGAN AI editing Tool Install and Use DragGAN Photo Editor

    397 shares
    Share 159 Tweet 99
  • Auto-Photoshop-Stable Diffusion-Plugin: A New Way to Create AI-Generated Images in Photoshop

    71 shares
    Share 28 Tweet 18
  • InternGPT: A New Way to Interact with ChatGPT

    56 shares
    Share 22 Tweet 14
  • Microsoft research Reveals GPT-4 AI Shows Promising Signs of Common Sense and Human-Like Reasoning

    99 shares
    Share 40 Tweet 25
Latest Technology Trends in Artificial Intelligence and Machine Learning with Cloudbooklet

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS

Cloudbooklet © 2023 All rights reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.