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

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

    guardhosts comunmetered ovh kimsufi dedicated server from $35 monthfr

    stop dreaming get ready for the future get 2gbps unmetered unmetered dedicated servers today mmmm

    Super Bowl Deals 1st month FREE 15% OFF Recurring Managed Dedis dedicated server

    2 x Quad Core Xeon8GB RAM4x73GB SAS 15k gt120€ 157$ dedicated server

    Hong Kong Intel C2D E6600 2G RAM 80GB HDD 100Mb s Only USD99 dedicated server

    Sandy Bridge Sale i52500 500G HDD 32G RAM 20TB BW from $74 m Great for Asia dedicated server

    ScarabWeb 33% OFF FOR LIFE Free cPanel Or Windows 100 TB Dual Quadcore dedicated server

    INFINITIE net Xeon E3 8GB RAM120GB SSDIPMIIpv6 $99 Mo Hex Core 16GB RAM $199 dedicated server

    $84 Quad Q9550 4GB RAM $123 Xeon E31230 Quad HT 4G RAM 6TB 500GB 24x7KVM IPMI dedicated server

    TMS Sale Best Selling X34xx Systems are Back From $89 mo Same Day Setup dedicated server

    id usa cheapest dedicated server from $120 mo very limited stock

    fortnode security systems giant dos server sale ddos secure dedicated server 25% off

    egihosting high end 100mbps dedicated server starting at $85 mo 3 months free

    WebNX Specials 48 core 64gb ram$479 12core 64gb ram raid10$299 8 core 32gb ram $169 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