Menu
PHP BABA LOGO
  • Home
  • Interview Questions
    • PHP String Interview Question
    • PHP Array Interview Qutions
    • jQuery Interview Quetions
    • PHP Interviwe Question on php.ini file
    • htaccess File Interview Quetions
  • About
PHP BABA LOGO

Create a swap memory in Linux

Posted on December 2, 2020December 2, 2020

Swap memory is like RAM, in Linux is used when the amount of RAM is full. If the system needs more memory resources and the RAM is full then, other inactive pages in RAM are moved to the swap memory. While swap space can help machines with a small amount of RAM. Swap memory creates by some part of Hard drive.

You need to install htop monitoring features for check memory uses.

Following commands will create 4 GB of swap memory:

  1. sudo swapon –show
  2. sudo fallocate -l 4G /swapfile
  3. sudo chmod 600 /swapfile
  4. sudo mkswap /swapfile
  5. sudo swapon /swapfile
  6. sudo nano /etc/fstab (add this line /swapfile swap swap defaults 0 0)
  7. sudo swapon –show
  8. htop

Categories

  • Docker
  • Git
  • Interview Questions
  • Laravel
  • Linux
  • php
  • Salesforce

Recent Posts

  • How to check Salesforce current release version
  • Salesforce Certification Coupons / Vouchers
  • Nested / Cascade query in SOQL
  • Declarative tools in salesforce
  • SalesForce Questions

Recent Posts

  • How to check Salesforce current release version January 12, 2023
  • Salesforce Certification Coupons / Vouchers July 19, 2022
  • Nested / Cascade query in SOQL May 11, 2022
  • Declarative tools in salesforce September 24, 2021
  • SalesForce Questions September 24, 2021
©2023 The Tech Paper | Powered by Abhinav Trivedi