Results 1 to 10 of 10

Thread: Setting Swap Size

  1. #1
    Join Date
    Dec 2011
    Beans
    43

    Question Setting Swap Size

    Hi,

    My laptop uses 8 GB RAM.

    What's the size I should set for my "Ubuntu(64-bits) Swap partition"?

    And, my laptop runs Intel Chip. But the downloaded Ubuntu(13.04) shows "AMD 64-bit"

    Thanks.

    Ed

  2. #2
    Join Date
    Jan 2012
    Location
    'merica
    Beans
    61
    Distro
    Lubuntu Development Release

    Re: Setting Swap Size

    You should probably just set it to 4GB. As for the processor problem, where does it say AMD 64-bit?

  3. #3
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Setting Swap Size

    AMD64 is what the architecture is often referred to. I don't think it's incorrectly saying you have an AMD processor.

  4. #4
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    7,975

    Re: Setting Swap Size

    Hmm, it is a laptop, so you probably want to use Suspend when you snap the lid shut. Therefore you should set the swap size to at least 2x RAM size. The suspend process scribbles the machine state into the swap partition and if it is too small, then suspend will fail.

  5. #5
    Join Date
    Jul 2007
    Location
    Auckland, NZ
    Beans
    4,152
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Setting Swap Size

    Quote Originally Posted by HermanAB View Post
    Hmm, it is a laptop, so you probably want to use Suspend when you snap the lid shut. Therefore you should set the swap size to at least 2x RAM size. The suspend process scribbles the machine state into the swap partition and if it is too small, then suspend will fail.
    I think that applies to hibernate, not suspend. Hibernate writes to swap; suspend writes to RAM.

    My EeePC 900 has never had a swap partition, and I've suspended it on many occasions with no problems.

  6. #6
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Setting Swap Size

    Yep, the swap is needed for hibernate, not suspend, and it doesn't require twice as much swap as there is RAM, only as much as RAM currently used on the system. So if you want to know you will be able to hibernate in any situation you need as much swap as you have RAM.

    The rule about swap=2xRAM is an old one, and doesn't relate to hibernating or make any sense with the amounts of RAM PC's have these days.

    (There is a bit of confusion in the naming, though, as suspend/hibernate are sometimes referred as "suspend-to-RAM" and "suspend-to-disk")

  7. #7
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,610
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Setting Swap Size

    Quote Originally Posted by EDLIU View Post
    Hi,

    My laptop uses 8 GB RAM.

    What's the size I should set for my "Ubuntu(64-bits) Swap partition"?

    And, my laptop runs Intel Chip. But the downloaded Ubuntu(13.04) shows "AMD 64-bit"

    Thanks.

    Ed
    If you want to hibernate, set swap to slightly more than RAM. Mind the difference between gigabinarybytes and decimal gigabytes: 8GiB RAM=8192MiB RAM, necessiating 8590MB disk space, so make it 9000MB=9GB to be sure. If you don't hibernate, or if you accept that you won't be able to hibernate on the rare occasions that you actually use most of your RAM, you don't need that much. With 8GB RAM it's unlikely your computer will ever run out of RAM. Well, unless you like video editing, want a bunch of virtual machines or some other very memory-hungry things.

    It is labeled AMD 64-bit because AMD first introduced 64-bit processors. Intel followed quickly, but the name AMD 64-bit stuck.

  8. #8
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    5,424
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Setting Swap Size

    Strictly, Intel had their own 64-bit instruction set - IA-64 or Itanium. Nobody liked it. AMD's 64-bit instruction set (AMD64 or x64) was backwards-compatible with x86 in hardware and everybody liked that. Intel went with the market and used AMD's instruction set.
    None but ourselves can free our minds

  9. #9
    Join Date
    Jul 2009
    Location
    the Netherlands
    Beans
    36
    Distro
    Ubuntu

    Re: Setting Swap Size

    On a default Ubuntu install, the installer sets the amount of swap to the same amount as the RAM. I've checked this on numerous installs,
    and it's always the same. So if you have 8Gb of RAM, set 8Gb of swap. If Ubuntu does so by default, it must be a good guideline.

  10. #10
    Join Date
    Dec 2011
    Beans
    43

    Re: Setting Swap Size

    Thanks.

    Ed

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •