LinuxQuestions.org
Visit Jeremy's Blog.
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 01-08-2003, 06:30 PM   #1
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
No Swap File


Oooh, I was doing a periodic health check of my system and I noticed that I had no swap space available or used! I seems that swap was never turned. Here's my fstab:

/dev/hda1 / ext3 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0


I don't see a swap file in there do you? I'm using Slackware-current. How do I activate it?

--tarballedtux
 
Old 01-08-2003, 06:53 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
Do you have a partition to use or are you going to create a file?
fstab
Code:
/dev/??? swap swap defaults 0 0
or
Code:
/root/swapfile swap swap defaults 0 0
create file

Code:
dd if=/dev/zero of=/root/swapfile bs=1k count=262144

mkswap /root/swapfile

mount all swap files ( uses fstab entries )

Code:
swapon -a

Last edited by DavidPhillips; 01-08-2003 at 06:54 PM.
 
Old 01-08-2003, 07:18 PM   #3
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Original Poster
Rep: Reputation: 30
Yes! I did have a partition ready to go. I must of botched the SWAPADD I guess. Well it works at least I have swap available. That's sweet that Linux will turn on swap usage on live instead rebooting.


--tarballedtux
 
Old 01-09-2003, 06:29 AM   #4
Bluesuperman
Member
 
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Depending on your system and the performance you want you do not need swap. I am running a PII 600, 128 MB RAM as a desktop. I am using KDE I always have at least 6 web browsers going, XMMS, Licq and a couple of konsoles. I turned off SWAP for about 4 days and really didn't notice a difference until I trid to installed WINE.
 
Old 01-09-2003, 03:07 PM   #5
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
Why not have it for when you do need it.

This way you can use the memory you have, and avoid the system from crashing.


The kernel uses up to twice the physical ram for swap, and handles it well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
what is a swap file...? zameer_india Linux - Newbie 8 01-09-2005 11:35 PM
swap file linuxhippy Linux - General 4 10-11-2004 05:07 PM
Swap File Cyric Slackware 13 10-05-2004 12:19 AM
Swap file not being used...why? ganja_guru Linux - General 6 12-08-2003 04:41 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 10:09 AM


All times are GMT -5. The time now is 12:03 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration