LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-01-2004, 09:49 AM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,185

Rep: Reputation: 47
Question swap file


I'm about to install Slackware 10 on my laptop pc. I've already installed it beside 2 other Linux distros on my desktop and like Slack. My question is can I install everything on 1 drive and 1 partition (no swap partition) and then make a swap file. I don't have much memory on my laptop pc (96 megs), so a 200 meg swap partition seems like wasted space that I may need on this small 4 GB drive.
 
Old 10-01-2004, 10:51 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
Yes, you can make a swap file. Use dd to create an empty file (copy from /dev/zero to the appropriate destination) and mkswap to make a swap area on it. List the file in /etc/fstab as if it were a swap partition, and activate it with:
Code:
swapon -a
See the various man-pages for more.
 
Old 10-01-2004, 05:03 PM   #3
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,185

Original Poster
Rep: Reputation: 47
Question are swap partitions quicker and more reliable?

are swap partitions quicker and more reliable?
 
Old 10-01-2004, 06:54 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Quicker and more relliable than what?

Due to the fact that swap usage involves physical I/O to your hard drive, which is several orders of magnitude slower than access within RAM, you want to keep swap usage as low as possible, and the more time it's at zero usage, the better your system will perform. If you've got 96Mg of RAM then I'd suggest just creating a 128Mg swap partition. Even on a 4G drive, that gives approx 95% of the usable space to Linux and data storage. -- J.W.
 
Old 10-11-2004, 04:07 PM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
Swap files are no more reliable than swap partitions. They are, however, slower than partitions, particularly if the swap file becomes fragmented on the disk (as the disk head has to seek in the middle of reads and writes to what would otherwise be contiguous space).
 
  


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 On
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 10:35 PM
Swap File Cyric Slackware 13 10-04-2004 11:19 PM
Swap file not being used...why? ganja_guru Linux - General 6 12-08-2003 03:41 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 09:09 AM
No Swap File tarballedtux Slackware 4 01-09-2003 02:07 PM


All times are GMT -5. The time now is 02:52 AM.

Main Menu
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