Learn about Centmin Mod LEMP Stack today
Become a Member

Linode Custom Linode Swap size?

Discussion in 'Virtual Private Server (VPS) hosting' started by RoldanLT, Oct 26, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:15 AM
    1.11
    10.2
    How to?
    When you deploy a server on Linode maximum SWAP size is only 512MB.
    How can we have a half size of our VPS Ram? like 4GB.
     
  2. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:15 AM
    1.11
    10.2
  3. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    7:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    Linode uses dedicated disk partition images for swap hence default max size of 511MB.

    Provided you have disk free space, you can create a new image disk set for swap type partition and then edit your configuration profile via Linode dashboard to change the old 511MB swap disk partition for the newly created image disk swap type partition. See Disk Images and Configuration Profiles - Linode Guides & Tutorials

    on my 2GB Linode Xen VPS server staging test server with 2GB newly created disk partition via Linode dashboard
    Code:
    free -m
                 total       used       free     shared    buffers     cached
    Mem:          1994       1272        722          0         17        468
    -/+ buffers/cache:        786       1208
    Swap:         2047          0       2047
    Code:
    swapon -s
    Filename                                Type            Size    Used    Priority
    /dev/xvdb                               partition       2097148 0       -1
    Create a new Disk Image

    linode_disk_images_03.png
    You'll end up with old 512MB swap image and New Swap Image I created.

    linode_disk_images_04.png
    change my existing 512MB Swap Image at /dev/xvdb to the newly created 2048MB swap image I created and hit Save Changes at bottom

    linode_disk_images_05.png

    Then reboot Linode Xen VPS server
     
    • Like Like x 1
  4. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:15 AM
    1.11
    10.2
    Ow easy to follow :)
    I thought I would do it via CLI :D
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    7:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    Well technically, you can do it the Vultr thread's outlined method too, just disable the existing 512MB swap and unmount it from Linode dashboard's configuration profile. Then you'd be creating a swap partition via SSH command line using the same main primary disk partition instead.