LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2004, 07:29 AM   #1
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
swap & /tmp


What is the difference between swap and /tmp ?

Should i always create a separate partition for /tmp and how big this must be?
 
Old 03-18-2004, 07:41 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
swap is used by the OS kernel. when it runs out of memory
it uses it as temporary storage. You can't touch it.
/tmp is just a general users/programs temp area
anyone can use it.

you don't need a /tmp partition.
a seperate /home partition is a good idea at least though.


billy
 
Old 03-18-2004, 07:41 AM   #3
Baldrick65
Member
 
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
The swap partition is like virtual memory and /tmp is a place where Linux stores temporary files (like Windows Paging file and Temp directory). /tmp does not have to be on a separate partition and the Swap partition should be 2x the physical ram up to 500MB.

Baldrick
 
Old 03-18-2004, 07:57 AM   #4
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
Swap does not have to be 2x the physical memory, though that should be safe with most situations. Personally, I have 320 MB of ram, and 176 MB of swap, and given that this is my home machine where I do not use many memory intensive applications (besides mozilla), the following (with fedora 1) is about as full as I have ever seen swap:

$ free
total used free shared buffers cached
Mem: 322132 305280 16852 0 36908 123200
-/+ buffers/cache: 145172 176960
Swap: 177876 85660 92216
$ swapon -s
Filename Type Size Used Priority
/dev/sdf8 partition 49436 28576 2
/dev/sdc1 partition 64220 28480 2
/dev/sda5 partition 64220 28604 2
$


Since I am now getting up to about 50% swap usage, I am thinking of adding a bit more swap, maybe to about the equivalent of memory. If I added more memory, I would need less swap. I had a work machine once however, where I needed 3X swap (back when memory was expensive). The point is, just keep an eye occasionally on the usage to fit your own needs.
 
Old 03-18-2004, 10:28 AM   #5
dominant
Member
 
Registered: Jan 2004
Posts: 409

Original Poster
Rep: Reputation: 30
thank you for your help guys!!
 
  


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
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
reinstall --> /tmp & noexec issue Fuel Slackware 1 11-30-2004 10:43 PM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:25 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
Open Source Consulting | Domain Registration