Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My question is what is swap? I am planning to install Ubuntu 12.10 version. I have 2.5 gigabytes of ram and want to use it all. How do I do the right way. I plan to use 500 gigabytes and a Sempron core processor. Do I need the swap?

share|improve this question
    
Reading this might help :) –  Seth Jan 25 '13 at 16:27
    
Visit Ubuntu Help –  Pandya Jun 7 at 13:27

2 Answers 2

SWAP can best be described as "virtual memory" I am not an expert on explaining this, but what it does is create a small partition that your system sees as RAM. It then uses this space BEFORE accessing ram when you are running applications, thus allowing your computer to be faster because applications use less actual RAM.

The recommendations I have seen the most (& that I follow) is create a Swap of approximately half your physical ram (if you have 2GB RAM, create 1GB swap) Keep in mind however, if you install Ubuntu 12.10, you don't really have to worry about this since the installer can do it all for you. Unless you want to do it yourself of course!

share|improve this answer
1  
Actually, RAM is way faster than Swap because Swap is stored on your hard drive. Swap is mainly used for hibernation where the computer moves everything from the RAM into the Swap and shuts down. –  Seth Jan 25 '13 at 16:23
    
I stand corrected! As I said, not really an expert on this! –  LinuxPCplus Jan 25 '13 at 16:25
    
It's OK. The rest of your answer is good. +1 –  Seth Jan 25 '13 at 16:28
1  
Swap is not "used before accessing ram" and it does not make things faster, it makes them slower. Swap is used when you are low on ram, and it is several orders of magnitude slower than ram, so using it bogs down the system. –  psusi Jan 25 '13 at 16:55
    
Like I said, I stand corrected. –  LinuxPCplus Jan 26 '13 at 5:35

The correct way to think of SWAP memory is to think of it as RAM that exists on your hard drive. When your actual RAM gets full, memory that you don't need right now gets copied to the swap ram on your hard drive. When that memory is needed it is swapped (get it? swapped?) into main ram and that ram is copied into the swap ram. This allows the operating system to function as having more available ram than it actually has but incurs quite a severe performance penalty. It is always a good idea to have more ram :)

With 2GB of RAM it is preferred to provide 2GB of swap disk ram.

share|improve this answer
    
Hmm,,, guess I got schooled! LOL! My apologies for my misunderstanding of the topic! –  LinuxPCplus Jan 26 '13 at 5:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.