Cloud Platform - Add Swap File on CentOS 7



Cloud Platform - Add Swap File on CentOS 7

I will start with adding 4GB of swapfile

sudo fallocate -l 4G /swap.engineer.org.pk

to check 4GB equivalent to KB I will use below site:

https://www.gbmb.org/gb-to-kb

4GB = 4194304 KB (in binary)

So run below command now:

sudo dd if=/dev/zero of=/swap.engineer.org.pk bs=1024 count=4194304

wait for a while so that system creates a 4 GB file.

See correct permissions:

sudo chmod 600 /swap.engineer.org.pk

and

sudo mkswap /swap.engineer.org.pk
sudo swapon /swap.engineer.org.pk

you will need to add the swap file permanently, otherwise when the system will reboot this will be removed.

sudo nano /etc/fstab

you might need to install nano utility to install nano:

sudo yum install nano

after the nano is installed now run the same command to edit fstab file:

sudo nano /etc/fstab

move the cursor to the end of the file and paste:

/swap.engineer.org.pk swap swap defaults 0 0

to check if your swap file is added:

sudo swapon --show

you will need to setup how frequently the swap file should be used, to do that you can use below commands:

sudo nano /etc/sysctl.conf

Add below lines:

vm.swappiness = 20
vm.vfs_cache_pressure = 50
Cloud Platform - Add Swap File on CentOS 7

In case you want to remove the swap file for some reason you can remove by using this command:

sudo swapoff -v /swap.engineer.org.pk
sudo rm /swap.engineer.org.pk

and at the end reboot the system:

reboot

you will see the system performance will boost.

 

Learn more about Cloud Platform follow below links:

Cloud Platform – How to Create Account on Oracle Cloud – Part 1

https://engineer.org.pk/blog/2019/10/04/how-to-create-account-oracle-cloud/

Cloud Platform – Launch VM Instance on Oracle Cloud – Part 2

https://engineer.org.pk/blog/2019/10/07/cloud-platform-launch-vm-instance-part-2/

Originally Published at:

https://engineer.org.pk/2019/10/11/cloud-platform-add-swap-file-centos/

Posted in Technical Solutions on Feb 28, 2021



How to Choose the Best Domain Name for Your Website

Posted in Uncategorized on Jul 09, 2024

Choosing a domain name is more than just picking a web address; it’s about creating your online identity. Your domain is the gateway to your website and plays a crucial role in how people perceive and remember your brand. It should be concise, relevant to your business, and easy to remember. In this guide, we’ll explore the key factors to consider when selecting a domain name, tips for making it memorable, and tools to help you find the perfect fit. Whether you’re starting a new venture or rebranding an existing one, choosing the right domain name is a pivotal step towards online success.



Best Affordable Web Hosting Provider 2022 - Pakistan

Posted in News on Oct 14, 2022

We are pleased to announce that Hosting by AliTech has won the CorporateVision's Global Business Award "Best Affordable Web Hosting Provider 2022 - Pakistan".



Automated Backup to GoogleDrive - CyberPanel - HostingbyAliTech

Posted in About Hosting by AliTech, Technical Solutions on Jul 18, 2021

Automated Backup to GoogleDrive - CyberPanel All the Hosting by AliTech customers have access to GoogleDrive Backups, here is what you need..



AliTech WordPress Hosting: Unmatched Performance for Your WordPress Sites 2024

Posted in About Hosting by AliTech on Aug 22, 2024

Explore the benefits of AliTech WordPress Hosting, designed for extreme performance and reliability. With SSD storage, instant provisioning, and guaranteed resources, AliTech offers tailored hosting solutions to meet the needs of any WordPress site. Whether you're starting with the Bronze plan or scaling up to Titanium, discover how AliTech provides the power and flexibility to keep your site running smoothly and efficiently.



[SOLVED / FIXED] : File Explorer is crashing on right click Windows 10 | Windows 8 | Windows 7 | Windows XP

Posted in Technical Solutions on Apr 01, 2021

[SOLVED] : File Explorer is crashing on right click Windows 10 Issue: When you right click on File Explorer sidebar with Windows Explorer / File Explorer crashes.



[SOLVED / FIXED ] ModuleNotFoundError: No module named 'setuptools_rust'

Posted in Technical Solutions on Apr 09, 2022

[SOLVED / FIXED ] ModuleNotFoundError: No module named 'setuptools_rust' Error: While installing docker-compose the following error can come up: ModuleNotFoundError: No module named 'setuptools_rust'



Mastering Homework: A Guide to Effective Scheduling

Posted in Uncategorized on Jun 07, 2024

Learn how to schedule homework activities effectively to reduce stress, improve time management, and enhance academic performance



OpenAI's Updated ChatGPT App for Mac: Revolutionizing Multitasking

Posted in Uncategorized on Aug 08, 2024

The recent update to OpenAI’s ChatGPT app for macOS introduces a transformative feature designed to enhance multitasking efficiency. This blog delves into the details of this update, exploring how it can streamline your workflow and improve overall productivity.



Ultimate Guide to Web Hosting and Domain Services: Everything You Need to Know

Posted in Uncategorized on Jun 28, 2024

Discover the ultimate guide to web hosting and domain services. Learn about domain name registration, secure WordPress hosting, dedicated Windows server hosting, and more. Find the best web hosting providers and services for your business needs



Start Saving Now

Posted in Hosting Promotions on Jan 29, 2021

Now you host your website at very low cost and save big. HostingbyAliTech is offering you litespeed web hosting at $0.45 per month. Whats a Big deal? Get web hosting services now and save your money.



[SOLVED / FIXED] django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL

Posted on Mar 27, 2022

[SOLVED / FIXED] django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL ERROR / PROBLEM: Starting the Python Shell in the terminal inside virtual environment.



Saudi Arabia to get AstraZeneca Vaccine from India

Posted in News on Jan 27, 2021

Kingdom of Saudi Arabia (KSA) to get AstraZeneca Vaccine shots from from India in about a week. The Serum Institute of India (SII) will supply Saudi Arabia with 3 million AstraZeneca COVID-19 vaccine doses priced at $5.25 each in about a week on behalf of the British drugmaker, its chief executive told Reuters on Monday.



Why Telegram CEO Pavel Durov Was Arrested in Paris: The Full Story

Posted in News on Aug 27, 2024

In the fast-evolving world of digital communication, Pavel Durov stands out as a relentless advocate for user privacy. As the founder of VKontakte and Telegram, Durov has consistently prioritized encryption and user control over data. This commitment has made him a controversial figure, especially in the eyes of governments that demand access to user information. The ongoing tension between privacy and security is embodied in Durov's journey, raising critical questions about the future of free speech and the ethical responsibilities of tech companies. What happens when the defender of digital privacy himself becomes a target?



This is really awesome!!! We are now ranking 🚀5th 👊😍

Posted in About Hosting by AliTech, Hosting Promotions on Jun 07, 2021

This is really awesome!!! We are now ranking 5th on TheWebHostingDir.com. To celebrate this we are giving away 5 Free Shared Hosting Accounts on first come first serve basis.



How to Install Python 3.10 on Ubuntu 20.04 LTS & Ubuntu 18.04

Posted in Technical Solutions on Jan 02, 2022

How to Install Python 3.10 on Ubuntu 20.04 LTS & Ubuntu 18.04 Python is a programming language that lets you work more quickly and integrate...



11 Million Devices Infected with Botnet Malware Hosted in Google Play: A Detailed Overview

Posted in News on Sep 24, 2024

Recently, Necro malware has made headlines after infecting over 11 million devices through seemingly legitimate apps on Google Play, such as Wuta Camera and Max Browser. This malware utilizes advanced techniques like steganography, embedding malicious code within harmless-looking files to evade detection. Its modular design allows it to perform various malicious actions, including displaying intrusive ads and facilitating subscription fraud without users' knowledge. With the alarming resurgence of Necro, it’s crucial for users to remain vigilant, regularly update their security measures, and uninstall any suspicious applications to protect their devices from this sophisticated threat.



Comprehensive Guide to Web Hosting and Business Website Creation

Posted in Uncategorized on Jun 25, 2024

Creating a robust online presence is crucial for any business. This guide explores web hosting options, domain registration, and website creation tools. We cover reseller hosting plans, VPS hosting, Magento hosting, and the best hosting providers for small businesses. We also discuss how to create a business website for free and the best platforms for blog hosting



[SOLVED/FIXED] Python Django - crbug non-JS module files deprecated.

Posted in Technical Solutions on Feb 28, 2022

[SOLVED/FIXED] Python Django - crbug/1173575, non-JS module files deprecated. ERROR: ERR_TOO_MANY_REDIRECTS SOLUTION:




Other Blogs


How to Choose the Best Domain Name for Your Website

Posted in Uncategorized on Jul 09, 2024 and updated on Jul 09, 2024

Best Affordable Web Hosting Provider 2022 - Pakistan

Posted in News on Oct 14, 2022 and updated on Nov 27, 2023

Mastering Homework: A Guide to Effective Scheduling

Posted in Uncategorized on Jun 07, 2024 and updated on Jun 07, 2024

OpenAI's Updated ChatGPT App for Mac: Revolutionizing Multitasking

Posted in Uncategorized on Aug 08, 2024 and updated on Aug 08, 2024

Start Saving Now

Posted in Hosting Promotions on Jan 29, 2021 and updated on Jan 30, 2021

Saudi Arabia to get AstraZeneca Vaccine from India

Posted in News on Jan 27, 2021 and updated on Mar 30, 2022

Why Telegram CEO Pavel Durov Was Arrested in Paris: The Full Story

Posted in News on Aug 27, 2024 and updated on Aug 27, 2024

How to Install Python 3.10 on Ubuntu 20.04 LTS & Ubuntu 18.04

Posted in Technical Solutions on Jan 02, 2022 and updated on Jan 02, 2022

Comprehensive Guide to Web Hosting and Business Website Creation

Posted in Uncategorized on Jun 25, 2024 and updated on Jun 25, 2024

Start Saving Now

Posted in Hosting Promotions on Jan 29, 2021

Start Saving Now

Posted in Hosting Promotions on Jan 29, 2021







Comments

Please sign in to comment!






Subscribe To Our Newsletter

Stay in touch with us to get latest news and discount coupons