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.

Possible Duplicate:
Is it safe to turn swap off permanently?

In my PC there is two OS, windows7 and Ubuntu . I installed Ubuntu after the installation of Windows 7. During installation i provided one windows partition as swap area. After the completion of installation I changed the swap area in to ntfs using windows. now i use ubuntu without swap area. any problem......

share|improve this question

marked as duplicate by Tachyons, devav2, belacq, Ringtail, Stephen Myall Nov 14 '12 at 10:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
i like to know there is any relation with swap area and speed of computer os (ubuntu) –  ani Nov 13 '12 at 15:33
    
Please help..... –  ani Nov 13 '12 at 15:39

2 Answers 2

Swap partition considerations

Swap area is necessary only to supplement RAM. Simplifying a bit: When your computer is running short of Ram it uses Swap as virtual RAM.

In my experience, Ubuntu uses very little RAM when compared to other OS's. SO if you have, say 4 Gb of RAM, it is unlikely you'll ever need it unless you run programs that require a lot of RAM (photo and video editing are examples).

In any case it is good to have a Swap area just in case. 3 to 4 Gb should be enough.

How to add a swap partition

To create a Swap partition you'll need to modify your partitions using gparted. If you want to reduce the Ubuntu partition by 4gb to make space for Swap you'll have to boot from a liveDVD or live USB because you cannot modify a partition that is mounted.

How to create a swap partition depends on your current partition table. You can only have 4 primary partitions. So if you do not have an extended partition (which can contain many logical partitions) and you already have 4 primary partitions, you'll have to delete one partition, create a new extended one and then recreate two new partitions or whatever is needed. Make sure you keep a backup of anything important on the drive, because partitioning is a low-level operation and a mistake or a power failure at the wrong moment might cause data loss.

So boot from a liveDVD or liveUSB Ubuntu, run gparted, reduce the Ubuntu partition by 4 Gb or so. create a new partition setting it as swap.

Update Grub

After you do this you might need to update grub by typing sudo update-grub in a terminal before restarting your computer.

If you require more specific information, specify how your disk is partitioned.

share|improve this answer
1  
i have only 2 GB ram. intel i3 processor, hdd 300GB. I provided single partition of 85 GB for ubuntu. Is there any option for providing swap area after installation of ubuntu. if yes then how ? –  ani Nov 13 '12 at 15:46
    
Yes. See modified answer. –  To Do Nov 13 '12 at 15:51
    
Helo To Do please help –  ani Nov 13 '12 at 15:52
    
no modification in the above answer –  ani Nov 13 '12 at 15:54
    
i have only 2 GB ram. intel i3 processor, hdd 300GB. I provided single partition of 85 GB for ubuntu. Is there any option for providing swap area after installation of ubuntu. if yes then how –  ani Nov 13 '12 at 15:58

Not sure about this but I believe that swap is also used to save what is in the RAM when you hibernate the computer, as it will last even when power is off.

If I'm correct you may not be able to hibernate.

share|improve this answer
1  
Hibernate is no longer provided by default in recent Ubuntu's. –  To Do Nov 13 '12 at 16:00
    
partition details are as follows: –  ani Nov 13 '12 at 16:35
    
windows have c, d partition and one system partition (automaticaly done during windows installation) one partition in ubuntu –  ani Nov 13 '12 at 16:37

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