LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-19-2004, 03:02 AM   #1
snooggums
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
Question Is swap required?


I've got 1 gig of RAM on my primary machine, which I will be dual booting with Slackware 9.1. As I will not be doing intensive tasks am I required to make the SWAP partition for Slackware to work or will it just crash should I happen to run out of memory?
 
Old 05-19-2004, 04:24 AM   #2
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
You don't need swap. It won't crash.
 
Old 05-19-2004, 04:31 AM   #3
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
oh great now i have extra 500MB of disk space.
 
Old 05-19-2004, 11:25 PM   #4
snooggums
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you sir!
 
Old 05-19-2004, 11:34 PM   #5
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
Has there ever been an official pronouncement from Linus or someone on the kernel team. THe last blurb from Linus was about 2.4.8 or so and he was still recommending swap.
 
Old 05-20-2004, 03:35 AM   #6
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
/me wonders if there are programs in linux similar to Ramdisk (windows), which copies your swap into ram... should be fun
 
Old 05-20-2004, 04:52 AM   #7
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
For home use, on that setup I could say that you'll never, ever touch your swap partition.

For servers, you might need some.

Anyway... if you're "afraid" of running out of memory, you might as well allocate some... say 128MBs worth of swap.

I run on 384MB RAM... and after about a year of running Slack, I've never hit my swap (256MB) at all.
 
Old 05-20-2004, 06:35 AM   #8
snooggums
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Yes it is for home use and mostly I would be doing movies, small image editing (web images) music and web surfing. My main worry was that the install or the program would fail if it didn't see any swap, as I am used to windows stupid unnecissary requirements.
 
Old 05-20-2004, 08:05 AM   #9
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
The install will not fail. If you need swap and don't have it, the kernel will start killing running processes on your system. As cheap as a couple hundred MB of HD space is..... it is up to you.

Until Linus says otherwise I will keep mine. I figure he knows more about it than .... well you get the idea.
 
Old 05-20-2004, 09:50 AM   #10
coffeedrinker
Member
 
Registered: Sep 2003
Posts: 173

Rep: Reputation: 30
I have no swap file on my laptop and run a lot of stuff (but not server). I have 640 MB of RAM with 64 given to video. I don't even come close to using all my memory. Right now am running XFCE with Mozilla, konqueror, konsole, and OpenOffice (one text, one spreadsheet) running. I am using 203 of 567 MB of memory.
 
Old 05-20-2004, 06:35 PM   #11
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Quote:
Originally posted by ringwraith
The install will not fail. If you need swap and don't have it, the kernel will start killing running processes on your system. As cheap as a couple hundred MB of HD space is..... it is up to you.

Until Linus says otherwise I will keep mine. I figure he knows more about it than .... well you get the idea.
Have you ran out of swap? And how much RAM do you have at that time? And on what kernel?

It won't "start killing running processes"... on the 2.6 series kernels at least, the pre-emptive scheduling feature is really remarkable.

To run out of RAM on 1GB on a machine which is for day-to-day home use is really impossible, unless of course you purposely want to find out how much pain your machine can handle.

I may not be Linus... but I also don't shoot my mouth off... And for God's sake, do we really need written/oral endorsement from him to do anything at all with Linux?
 
Old 05-20-2004, 11:20 PM   #12
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
There is very little need for a swap partition on a home system.

And even on a server, I feel that if your server runs out of RAM and needs to use the swap, it is time to upgrade your memory. Swap is an emergency replacement to your RAM, your machine takes a serious hit in performance if it is using swap instead of RAM.

I have heard rumors that some programs would not install unless it detected a swap partition, but if that is the case, that software is broken in the first place, so it isn't worth worrying about (or installing).
 
Old 05-21-2004, 02:39 AM   #13
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Quote:
And for God's sake, do we really need written/oral endorsement from him to do anything at all with Linux?
I hope not - from what I hear, he doesn't even use Slackware
 
Old 05-21-2004, 03:08 AM   #14
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Even if you have HUGE amount of RAM the kernel will always be happier if it has a nominal amount of swap space. I think it's like Linus' security blanket!
To avoid having to have a separate swap partition you can create a small swapfile in /root
Even 512K will help your system, but have a heart and make it 8MB.

dd if=/dev/zero of=/root/swapfile bs=1k count=8192
mkswap /root/swapfile

The put this line in fstab
/root/swapfile swap swap defaults 0 0
 
Old 05-21-2004, 12:21 PM   #15
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Quote:
Originally posted by gnashley
Even if you have HUGE amount of RAM the kernel will always be happier if it has a nominal amount of swap space. I think it's like Linus' security blanket!
To avoid having to have a separate swap partition you can create a small swapfile in /root
Even 512K will help your system, but have a heart and make it 8MB.

dd if=/dev/zero of=/root/swapfile bs=1k count=8192
mkswap /root/swapfile

The put this line in fstab
/root/swapfile swap swap defaults 0 0
This is one of the most useful swap info that I've read in a very long time (and it's not from Linus at that , heh... sorry, can't resist).

Thanks for sharing it with us.
 
  


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
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
Help Required kdjambotkar Linux - Hardware 6 12-09-2004 02:46 PM
Some help required. Dsavage Linux - Newbie 1 07-23-2004 08:50 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 12:46 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