nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Difference between Linux Swap partition & Swap file

This is a discussion on Difference between Linux Swap partition & Swap file within the Linux software forums, part of the Linux Getting Started category; It is recommended that a swap partition shoul be created during install. Can I know the reason why it recommended? ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 03-10-2007, 01:02 PM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Rep Power: 0
hrishikesh
Default Difference between Linux Swap partition & Swap file

It is recommended that a swap partition shoul be created during install. Can I know the reason why it recommended? Are there any performance issues regarding swap file creation?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-12-2007, 04:38 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

swap file in linux is just like the page file in windows.

It is needed in case ur RAM gets consumed by ur system, so if there is no SWAP what shalll ur system do ? It shall crash for sure or freeze.
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
  #3 (permalink)  
Old 03-12-2007, 12:44 PM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Rep Power: 0
hrishikesh
Default Swap file instead of Swap Partition

I think B!n@ry did'nt get my question. If I can create a swap file in my distro, then why it is recommended to create a swap partition separately. Did you get it?
Reply With Quote
  #4 (permalink)  
Old 03-12-2007, 08:49 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default Re: Swap file instead of Swap Partition

Quote:
Originally Posted by hrishikesh
I think B!n@ry did'nt get my question. If I can create a swap file in my distro, then why it is recommended to create a swap partition separately. Did you get it?
Swap file == slow, slow performance, ext3/ext2 format, not dedicated
Swap partition == good performance, dedicated for swapping only, in swap format

Always use swap partition and make sure it is double the RAM size (<=2Gig)
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #5 (permalink)  
Old 03-13-2007, 01:03 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Rep Power: 0
hrishikesh
Default Thanks a lot!

Thanks nixcraft, my ideas got cleared. Yes!!!
Reply With Quote
  #6 (permalink)  
Old 03-13-2007, 11:41 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default Re: Swap file instead of Swap Partition

Quote:
Originally Posted by nixcraft
Quote:
Originally Posted by hrishikesh
I think B!n@ry did'nt get my question. If I can create a swap file in my distro, then why it is recommended to create a swap partition separately. Did you get it?
Swap file == slow, slow performance, ext3/ext2 format, not dedicated
Swap partition == good performance, dedicated for swapping only, in swap format

Always use swap partition and make sure it is double the RAM size (<=2Gig)
Yep, thats it ... sorry didnt understand your question.
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
  #7 (permalink)  
Old 03-16-2007, 01:39 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

B!n@ry is getting old he need to wear eye specs :P .. LOL
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #8 (permalink)  
Old 03-16-2007, 02:31 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

Quote:
Originally Posted by rockdalinux
B!n@ry is getting old he need to wear eye specs :P .. LOL
Yes My Dear I think so
But I think you are older than me Rocky
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
  #9 (permalink)  
Old 03-16-2007, 02:56 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Haha ...shooo don’t talk about age man
But I'm young at heart \/
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #10 (permalink)  
Old 03-16-2007, 03:08 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

Quote:
Originally Posted by rockdalinux
Haha ...shooo don’t talk about age man
But I'm young at heart \/
Oh ya man you really have that
hehehe from your anger I can suggest your age is more than 35 years old
I wish you good luck...
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Why Swap=2 x RAM diptanjan Getting started tutorials 5 03-25-2008 02:14 AM
Swap piggy Getting started tutorials 3 07-17-2007 10:44 AM
difference between Swap and Virtual memory ricc Linux software 3 03-16-2007 02:35 AM
how to find swap in solaris raj Solaris/OpenSolaris 1 02-05-2007 07:48 PM
Deleted SWAP partition sonaikar Linux software 1 02-05-2005 07:20 PM


All times are GMT +5.5. The time now is 10:34 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36