Satış ve Destek +90 (216) 521 78 00

Sepetim Giriş Yap | Kayıt Ol
Tenik Data
How to increase Swap Size - TeknikDATA Hosting Hizmetleri

Bilgi Merkezi

Ana sayfa > Bilgi Merkezi > English > cPanel > General > How to increase Swap Size

How to increase Swap Size

Linux uses Swap Space to back its physical memory with an overflow area. In most cases the suggested amount is a disk space equal to the amount of physical memory you have installed. You don’t want your system to ever run out of RAM+swap, but you usually would rather have enough RAM in the system. So twice the size of RAM doesn’t need to swap.

The free -m command shows that the swap memory in your current server.

We can increase 4GB of swap size now.

Create Swap file

touch /swapfile

Use the following command to create 4GB of swap file.

# dd if=/dev/zero of=/swapfile bs=1M count=4096

if=/dev/zero : Read from /dev/zero file. /dev/zero is a special file in that provides as many null characters to build storage file called /swapfile.
of=/swapfile1 : Read from /dev/zero write stoage file to /swapfile.
bs=1M : Read and write 1M at a time.
count=4096 : Copy only 4096 input blocks.
This will create a new partition with 4GB space. To make it a swap partition you need to execute the following command.

# mkswap /swapfile

Now the swap file is created.

activate /swapfile file swap space now.

# swapon /swapfile

Add entry on /etc/fstab file to activate after Linux system reboot.

# vi /etc/fstab

/swapfile swap    swap    defaults        0 0

save and close the file.

Now check your swap space now.

# free -m

In order to delete swap.

Run “swapoff /swapfile” command

Remove the entry from /etc/fstab file

Remove /swapfile  file (using rm command)

Bulut Hosting Bireysel Hosting Kurumsal Hosting Bayi Hosting Uygulama Hosting Wordpress Hosting Joomla Hosting Drupal Hosting E-Ticaret Hosting Haber Hosting Veritabanı Hosting MySQL Hosting MongoDB Hosting PostgreSQL Hosting
Bulut Sunucu Bulut Sunucu Sunucu Barındırma Sunucu Kiralama Sunucu Yük Dengeleyici Bulut Sunucu Standart Bulut Sunucu Enterprise Bulut Sunucu SSD Premium Bulut Sunucu Sunucu Yük Dengeleyici Kiralama Güvenlik Duvarı Kiralama
Kurumsal Email Sunucu Standart Email Sunucu Professional Email Sunucu Enterprise Email Sunucu Bulut Email Bulut E-Posta Hosting Hosted Zimbra Spam/Virüs Gateway Mail Back Up Smart Host ETRN Hizmeti E-Posta Servisleri
Domain Alan Adı Tescil Alan Adı Transfer Alan Adı Yenileme TÜrkçe Alan Adı Kayıt Marka Tescil Marka Tescil Başvuru
CDN Çözümleri Statik Cache Hizmeti İçerik Hızlandırma Coğrafi İçerik Dağıtımı CDN Depolama SSL Sertifika Comodo SSL QuickSSL True BusinessID SSL

LiveZilla Live Help