What's swap? - Questions

This is a discussion on What's swap? - Questions ; Hi Guys, This is the answer for ur question. Swap is same as RAM(Virtual Memory Space) as the linux is slow when compare to the Windows Operating systems this concept has been introduced.Its some space thats allocated in the HDD. ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: What's swap?

  1. What's swap?

    Hi Guys,
    This is the answer for ur question.

    Swap is same as RAM(Virtual Memory Space) as the linux is slow when
    compare to the Windows Operating systems this concept has been
    introduced.Its some space thats allocated in the HDD.

    As far as size is concern the size of the Swap Space is double the
    size of the RAM(That leads to optimum performance).

  2. Re: What's swap?

    Kranthi Sekhar wrote:

    > Hi Guys,
    > This is the answer for ur question.
    >
    > Swap is same as RAM(Virtual Memory Space) as the linux is slow when
    > compare to the Windows Operating systems this concept has been
    > introduced.Its some space thats allocated in the HDD.
    >
    > As far as size is concern the size of the Swap Space is double the
    > size of the RAM(That leads to optimum performance).



    This answer is wrong on many counts.

    "Swap" is not the same as RAM. "Swap", used as a noun, refers to disk space
    allocated as temporary storage for the virtual memory system where it can
    store chunks of memory in order to free up physical memory (RAM) for
    executing processes. "Swap", used as a verb, refers to the process of
    moving chunks (pages) of memory between disk and physical memory.

    Swapping was not introduced because "Linux is slow compared to Windows". The
    concept of swap has been integral to operating systems with virtual memory
    for decades. Linux, with it's aim to be UNIX-like, provides the equivalent
    facility. For what it is worth, Linux' implementation performs quite a bit
    better than Windows on the same hardware.

    Finally, optimum performance is NOT obtained by making swap twice as big as
    RAM. Optimal performance is obtained by not using swap at all (i.e., go buy
    more RAM). The purpose of swap is to address two conditions: the exhaustion
    of physical memory, and the presence of applications that lie dormant for
    prolonged periods of time. In the case of dormant applications, performance
    can be boosted by swapping it out to disk until needed. In the case of
    using up all physical memory -- with swap the system may operate more
    slowly, but applications will not fail due to lack of memory issues.

    The optimal swap usage is 0M, provided you have RAM in gross excess of your
    requirements. The proper amount of swap is simply more than your peak
    memory demand. Ultimately you want RAM + Swap to equal at least as much as
    you can ever imagine using at once (the trick is determining what that
    figure is; for a desktop workstation, perhaps 100% more than the average
    usage). If you find that you are using swap frequently, you need more RAM
    (if the performance becomes uncomfortable for you).



  3. Re: What's swap?

    Thankyou for putting that crazy notion to rest about "double your ram"
    I have been telling people for years essentially the ssame thing you wrote.
    It seems a lot of these myths get started and people hang onto them.
    With todays prices, people ought to be buying RAM and get a standard system
    up to at least 512 megs. Once your at that amount of RAM probably a 64 meg
    swap disk would be more than adequate. Better yet, put in a gig to a gig
    and a half of RAM and eliminate the swap altogether. I'll bet at 512 I
    probably dont even need a swap file for most normal usage.
    You can actaully play with it by using the swapon and swapoff commands.
    Eric

  4. Re: What's swap?

    Just a follow up note:
    I'm using Mandrake 9.0 on an x86 system with 512 megs of ram
    I turned my swap file off (swapoff -a), and I am running
    setiathome
    setidriver
    X (kde)
    evolution
    knode
    KCalc
    doing a kernel compile
    Kate
    3 console windows open
    ssh'd to another box
    top is running -d1 (1 second updates)
    GQView is open with a 3000 x 2222 pixel jpg open
    Mozilla is open loading numerous jpg's from my website.
    My desktop background is a picture of the Shuttle columbia
    There are 161 processes in memory at this time, no zombies.
    Given all that, top still shows
    10508K free, 91236K buff 157996K cached

    Everything is running smooth as silk.
    Eric






+ Reply to Thread