Results 1 to 9 of 9

Thread: Ram

  1. #1
    Join Date
    May 2011
    Location
    Thessaloniki,Greece
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Thumbs down Ram

    hi i have ubuntu 11.10.my pc had 1G RAM and yesterday i ve installed one 1G RAM more so now i have 2G RAM.Will this effect the swap memory partition made when i installed ubuntu?partition was made for 1G RAM. HOW TO FIX IT?

    THANX IN ADVANCE

  2. #2
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ram

    With 2 GiB of RAM, it's perfectly possible to use no swap at all. I don't forsee any problems having a 1 GiB swap partition with 2 GiB of RAM.

    If you really want, you can start up a Linux live CD and run GParted, and then resize the swap partition. But in your situation I wouldn't even bother to do that as there's probably no benefits.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  3. #3
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,703

    Re: Ram

    Your system should run as well or maybe better with the extra RAM and same size swap.

    The only issue you might have is with suspend, because I gather that the swap partition is used to store the RAM image. So for suspend to work, swap has to be slightly larger than the physical RAM. For that reason alone, you might want to do as 3rdalbum says and use a live CD to resize the partitions a bit.

    Do a backup first.

  4. #4
    Join Date
    Jan 2011
    Location
    Linux heaven
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ram

    Quote Originally Posted by The Cog View Post
    Your system should run as well or maybe better with the extra RAM and same size swap.

    The only issue you might have is with suspend, because I gather that the swap partition is used to store the RAM image. So for suspend to work, swap has to be slightly larger than the physical RAM. For that reason alone, you might want to do as 3rdalbum says and use a live CD to resize the partitions a bit.

    Do a backup first.
    In my case, the swap is 1.9GB but the ram is 2GB. When I installed 11.04 it set this amount. My suspend works ok though. So...... what does mean? Should I too enlarge the swap a bit?
    Don't touch the Linux hat!
    Linux user #572109


  5. #5
    Join Date
    Jan 2011
    Location
    Linux heaven
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ram

    Here's some FAQ about swap space if anyone needs it:


    https://help.ubuntu.com/community/SwapFaq
    Don't touch the Linux hat!
    Linux user #572109


  6. #6
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: Ram

    Quote Originally Posted by pretty_whistle View Post
    In my case, the swap is 1.9GB but the ram is 2GB. When I installed 11.04 it set this amount. My suspend works ok though. So...... what does mean? Should I too enlarge the swap a bit?
    How frequently do you completely fill your RAM before using suspend?
    http://xkcd.com/293/
    There are 10 kinds of people in this world: Those who understand ternary, those who don't, and those who confuse it with binary.

  7. #7
    Join Date
    Jan 2011
    Location
    Linux heaven
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ram

    Quote Originally Posted by WorMzy View Post
    How frequently do you completely fill your RAM before using suspend?
    I don't know the answer to that.
    Don't touch the Linux hat!
    Linux user #572109


  8. #8
    Join Date
    Jan 2011
    Location
    Linux heaven
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Ram

    I believe I have the answer to my question on the link I gave above. The answer is that I don't need to add more.
    Don't touch the Linux hat!
    Linux user #572109


  9. #9
    Join Date
    Jul 2009
    Beans
    101

    Re: Ram

    Threads discussing swap size are abundant on this forum and google, and opinions on swap size range from "do not need it" to a number of factors of ram size.

    Swap will be used when a system runs out of RAM, I.e. many, many programs running, and when you "suspend to disk". As long as you do not hit any of these conditions then your system will run just fine.

    On a desktop with 2Gig plus RAM and low to moderate usage load, you most likely will not see the system swapping. On a heavily loaded server this may be a different issue.

    For todays desktop, laptops etc, it really depends on the users usage. We do have tools to check this.

    For example:
    Open a terminal and type:
    Code:
    free -m
    It will produce an output similar to this:
    Code:
                  total       used       free     shared    buffers     cached
    Mem:          3963       3136        826          0        335       1731
    -/+ buffers/cache:       1070       2893
    Swap:        10484          0      10484
    Look at the "-/+ buffers/cache: " line and in the "free" column you will see how much free memory you are currently have. As long as that number is large and the "Swap: used" is zero or small then your system is not running out of RAM.

    When I use my laptop I DO suspend to disk often and thus have the swap space sized to accommodate the "suspend to disk" operation which requires swap to be sized at least to the size of my RAM.

    As a rule of thumb when I install a system I usually use a factor of 2 times the RAM size for my swap size. I'm old school and this is what we used in our data centers.

    Keep in mind that running a system into the swap carries a performance penalty with it. RAM these days are clocked and run in nano seconds, and hard-drives, even the SSD's, run in mili seconds. If my math is correct then that is a 1.000.000 time factor difference. With this in mind you will notice a performance decrease when your system runs over the cliff into the swapping zone.

    Happy swapping

    George
    Last edited by georgemc; December 18th, 2011 at 08:29 PM. Reason: SDK corrected typos
    Ubuntu User 29830, Linux User 500817

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
  •