nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2007, 12:02 PM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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
  #2 (permalink)  
Old 12-03-2007, 03:38 AM
B!n@ry's Avatar
Senior Member
User
 
Join Date: Dec 2006
Location: B!n@ry-z0ne
OS: Ojuba 3
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
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 12-03-2007, 11:44 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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 12-03-2007, 07:49 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
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 Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 13-03-2007, 12:03 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hrishikesh
Default Thanks a lot!

Thanks nixcraft, my ideas got cleared. Yes!!!
Reply With Quote
  #6 (permalink)  
Old 13-03-2007, 10:41 AM
B!n@ry's Avatar
Senior Member
User
 
Join Date: Dec 2006
Location: B!n@ry-z0ne
OS: Ojuba 3
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
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 16-03-2007, 12:39 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

B!n@ry is getting old he need to wear eye specs :P .. LOL
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #8 (permalink)  
Old 16-03-2007, 01:31 AM
B!n@ry's Avatar
Senior Member
User
 
Join Date: Dec 2006
Location: B!n@ry-z0ne
OS: Ojuba 3
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
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 16-03-2007, 01:56 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Haha ...shooo don’t talk about age man
But I'm young at heart \/
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #10 (permalink)  
Old 16-03-2007, 02:08 AM
B!n@ry's Avatar
Senior Member
User
 
Join Date: Dec 2006
Location: B!n@ry-z0ne
OS: Ojuba 3
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
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


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 Off


Similar Threads

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


All times are GMT +5.5. The time now is 04:46 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38