Add swap file under linux
web hosting directory web hosting dedicated server colocation hosting web hosting services servers web hosting company web hosting article web host news web host news

web hosting
Cheap web hosting
Windows web hosting
Linux web hosting
Unrestricted hosting
Ecommerce web hosting
Virtual server VPS
Reseller hosting
by US State
by US City
Web Hosting coupons
VPS coupons
Articles

Cheap dedicated servers
Best dedicated servers
Windows dedicated servers
Linux dedicated servers
Unrestricted server
dedicated managed server
dedicated server unmetered
by US State
by US City
Dedicated server coupons
Articles

Cheap colocation hosting
Unrestricted Colocation
by US State
by US City
Coupons Promotion
Articles

Domain Registration
SSL Certificate
Website Statistics
Merchant account
Control panel
WebSite monitor

Intel Servers
AMD servers
SCSI Servers
Cheap Servers

Web hosting company
Dedicated Hosting
Colocation hosting
Web Hosting Services
Server manufacturer
Reviews

So you want to know how you decide what web host is best!

What is 1Mbps 95th percentile ?

Top 10 Dedicated servers May 2010

Westmere Dedicated server the best deal

Using CMS to create Websites

Top 10 Dedicated Servers March 2010

Control Panel Benefits

Top 10 Dedicated servers January 2010

More Articles


Ring the Christmas Bells with Infrenion Networks 50% Discount!

WebHost.UK.Net: offering web hosting great deals this Christmas.

Action Web Group Introduces The All New RubberBand Plan To Take The Place Of Unlimited Web Hosting!

Vision Helpdesk Christmas Madness is back! HO-HO-HO Huge Discounts!

Codero Names Jonathan Ewert as President and CEO

Lunarpages Boosts Reseller Plan

More News




Add swap file under linux

Add swap file under linux



Add swap file under linux

If you are adding more memory on your dedicated server, you will need to add more swap space. You have two choices: add or upgrade a swap partition or create a swap file. Because changing the size or create a new swap partition is not easy, the best solution is to create a new swap file. Since the 2.6 Linux kernel, the swap files are just as fast as swap partitions.

RECOMMENDED SIZE OF LINUX SWAP.

  • 1 GB RAM ---> 2 GB of Swap file
  • 2 GB RAM ---> 4 GB of Swap file
  • 4 GB RAM ---> 8 GB of Swap file
  • 8 GB RAM ---> 12 GB of Swap file
  • 16 GB RAM ---> 24 GB of Swap file
  • 32 GB RAM ---> 32 GB of Swap file


  • Create a swap file

    To create a swap file, use the "dd" command to create an empty file. Next you need to use mkswap command to set up a Linux swap area on a device or in a file

    1) Login as the root user

    2) Create and Determine the size of the new swap file in megabytes and multiply by 1024 to determine the number of blocks.You can do this with the linux command "dd". For example, the block size of a 1GB swap file is (1024 * 1024MB = 1048576 block size). Type following command to create 1GB swap file

    # dd if=/dev/zero of=/swapfile bs=1024 count=1048576

    Note: "swapfile" is the name of your swapfile.

    3) Setup the swap file with the command: mkswap. Type following command to setup your swap file:

    # mkswap /swapfile

    4) To enable the swap file immediately but not automatically at boot time. Type:

    # swapon /swapfile

    5) To enable the new swap file automatically at the boot, you need to edit the file /etc/fstab and add the following line.

    /swapfile swap swap defaults 0 0

    The swap file will be enabled at each time the system boots.

    6) You can verify the swap file is working fine with these commands:

    # cat /proc/swaps
    or
    # free


    This article has been written for AskWebHosting. Each day, you will find the best dedicated servers deals on AskWebHosting.com. Don't miss the Best dedicated servers selected by AskWebHosting.


    Related Articles

    100Mbps or 10Mbps uplink port dedicated server
    10Mbps or 100Mbps uplink port speed, What should I choose when I'am purchasing a dedicated server? ...
    Written by: AskWebHosting
    Dedicated Hosting
    Add swap file under linux
    Add swap file under linux If you are adding more memory on your dedicated server, you will need to...
    Written by: AskWebHosting
    Linux
    Cheap Dedicated Servers the best deals
    Cheap Dedicated Servers the best deals This is a reccuring question, where can I find the best...
    Written by: AskWebHosting
    Dedicated Hosting
    Cloud web hosting what is it?
    Cloud web hosting, what is it? Cloud Web Hosting is a type of web hosting that operates on multiple...
    Written by: AskWebHosting
    Web Hosting
    Control Panel Benefits
    Control Panel Benefits A dedicated server is only as good as the software used to manage it....
    Written by: AskWebHosting
    Hosting
    Control Panel What is it
    My Hosting Provider Offer Control Panel, What Is It? A control panel is additional software,...
    Written by: AskWebHosting
    Hosting
    Dedicated Hosting Provider How to evaluate it
    How To Evaluate A Dedicated Hosting Provider? If your web site is experiencing increase in...
    Written by: AskWebHosting
    Dedicated Hosting
    Dedicated Hosting Purchasing Guide
    A four part series on purchasing the best dedicated web hosting plan for your needs. Part 1 What is...
    Written by: AskWebHosting
    Dedicated Hosting
    Green Web Hosting What is it?
    What is Green Web Hosting? The effects of Global Warming are forcing people to take one or the...
    Written by: AskWebHosting
    Web Hosting
    How to Switch Your Web Hosting Provider
    How to Switch Your Web Hosting Provider? Many people stay with their web hosting company even...
    Written by: AskWebHosting
    Web Hosting


    Related special offers



    TOP 10 Best Dedicated Servers January 2011


    AskWebhosting.com recommends 3dstats.com real time web statistics for tracking your visitors.

    SingleHop Review
    Codero Review
    1&1 USA Review
    DedicatedNOW Review
    TurnKey Review
    iWeb Review
    ServerPronto Review

    iPage Review
    JustHost Review
    FatCow Review
    CoolHandle Review
    midPhase Review
    HostMonster Review
    BlueHost Review
    Hostgator Review

    NL Dedicated INSTANT SETUP 6x 3 2 GHz 12 GB 2x 1 TB HDD 10 TB BW 129 euro dedicated server

    dreamservers uk dedicated servers quad amp dual cores

    CORE2QUAD Q6600 8Gb RAM 1TB HDD Just $159 95 Month dedicated server

    Special Offer Double RAM on Sandy Bridge E31240 Cheap customisation Budget dedicated server

    NovaNodes DDOS Protected Dedicated ServersSemi ManagedFree MigrationEurope Servers dedicated server

    EzyHost me 100Mbps 1Gbps 2Gbps 100TB Unmetered ServersDE NL RO FR dedicated server

    Hong Kong Intel C2Q Q6600 2G RAM 80GB HDD 100Mb s Only USD139 dedicated server

    prohosta com own a dedicated server today $200 00 off

    Takeover VolumeDrive Jacksonville FL server dedicated server

    Singapore Dedicated Hosting dedicated server

    Psychz Networks Los Angeles – Atom D525 4GB RAM 500GB HD 5000GB BW 50% 1st Month dedicated server

    soladrive com up to $15 off dedicated server ipmi included

    Blowout Dual Xeon L5420 8 Cores 500GB HDD 8GB RAM $69 99 Month dedicated server

    Amd X2 8GB Ram 8TB HDD Raid5 1Gbps 10TB NLWS $65 dedicated server

    EU S p e c i a l s Powerful Xeon amp QuadCore Servers dedicated server

    SingleHop coupon

    Web Hosting deals

    VPS Hosting deals

    Colocation deals

    More Deals


    Free Web Stats
    Web Statistics
    Web Templates
    Free Photos


    2010 AskWebHosting.com    Contact-us    Advertise    Register    Web Hosting Questions    Privacy Policy