LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-12-2006, 10:33 AM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
Swap


Since systems these days are now are hitting the GB range in ram, how will this affect the swap partition? Swap is limited to some 2,050GB according to partition magic, but with cfdisk you can make a swap partition to any size you want, though if you do a free command, it will show swap to maybe around 2xxxx instead. So, at this point when having say 2GB of ram, should swap be kept around the same range? And what if you have even more ram then that? Should swap not even be considered? Also, I do not know how Linux handles hibernate/sleep. Does it actually use swap for that? I know in windows it create it's own file, called hiberfil.sys. Though I think I read that Linux might use swap for the hibernate function as well as swapping memory, but I don't remember where I read this, and in fact I may just be totally wrong.

Right now on my notebook, I have 2GB, and so I decided to just not even bother with a swap partition, though some might say it would be a good idea to create one just in case, but I don't see the purpose, since now the usual swap rule no longer seems valid because of the limitation to 2GB. (amount of ram * 2 = size of swap). Thoughts anyone?
 
Old 10-12-2006, 10:52 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
With hard disk space so cheap, I generally keep around a 512MB swap partition "just in case". But neither my desktop w/ 2GB RAM or my notebook w/ 768MB RAM ever use it...
 
Old 10-12-2006, 12:12 PM   #3
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
I have 1gb of RAM at home, and keep a 2gb swap partition. The price of hard drives per gb is so dirt cheap now it really isn't an issue to have even a 2gb swap partition.
Plus, I've found the swap handy the few times either something has gone wrong (logs overflowing, processes out of control, etc.), or I have done some really heavy work (like opening tons and tons and tons of images in Gimp).
Crashing without swap is rather messy, with swap you at least have the slight buffer of safety "just in case". Like I said, 2gb of 400gb is no big deal on today's hard drives.
 
Old 10-12-2006, 12:44 PM   #4
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Necessity of a swap partition depeneds on what use you out your machine to. If you are into video editing or into other multimedia apps that consume tons of resources then 2GB of RAM aint' enough !! You will require several GBs of swap for a good performance.

Otherwise, if you are using your machine only document management, browsing and the like stuff you can do away with 1GB RAM.

If you want to use the suspend to disk (hibernate) functionality, you should have a swap partition big enough to hold the contents of RAM and other data.

It is definitely possible to use a file instead of a partition for swapping. I am not sure if you can do the same with suspend2disk. Maybe, I'll try it out sometime and post the results here !!
 
Old 10-12-2006, 07:39 PM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
Quote:
Originally posted by Kevkim55
If you are into video editing or into other multimedia apps that consume tons of resources then 2GB of RAM aint' enough !! You will require several GBs of swap for a good performance.
Ok, but if you have 2 GB of ram, that means a 4GB swap, but how would that work, if the technical limit of swap is 2GB? Multiple swap partitons? I doubt that would be feasable.
 
Old 10-12-2006, 08:59 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Jeebizz
Ok, but if you have 2 GB of ram, that means a 4GB swap, but how would that work, if the technical limit of swap is 2GB? Multiple swap partitons? I doubt that would be feasable.
Has been supported for (very many) years. Current (x86) limit is 32 extents of 2 Gig. Should suffice for a while. If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
 
Old 10-13-2006, 11:46 AM   #7
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Quote:
Has been supported for (very many) years. Current (x86) limit is 32 extents of 2 Gig. Should suffice for a while. If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
Exactly ! I've been using two swap partitions and it does help a lot and performs well !!
 
Old 10-13-2006, 12:53 PM   #8
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by syg00
...If you use more than one kswapd will use them concurrently (i.e. a software stripe-set). Not much benefit on a single disk, but it does its best to help.
Note that this only can happen if you give your swap partitions exactly the same priority (the pri option in fstab). Otherwise your swap spaces are used like lineal RAID, first fills the top priority swap, then the next one, etc
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 08:04 AM
Swap not being used? blackspade Linux - Laptop and Netbook 1 08-24-2005 02:06 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration