swap and tempfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

be careful about using tmpfs for /tmp though. As Gene says, you can run out 
of temp space. What I want to add to that is that you most likely will. 
Often times, a program creates a temporary file because the structure it is 
working with has the potential to grow outside of the available ram. If it 
does, well, your in trouble, and the hole purpose for the program using the 
temp file was useless. Of course, this is not always the reason for a temp 
file, but...
- ---
Joseph C. Lininger
jbahm at pcdesk.net
note, the following is used for automated processing. Please leave in tact 
if quoting me in a reply.
Verification: 5eab38a77ac40416e075be8f50607ff7
- ----- Original Message ----- 
From: "Gene Collins" <collins@xxxxxxxxxxxxxxxxxxxxx>
To: <speakup at speech.braille.uwo.ca>
Sent: Monday, May 17, 2004 9:21 AM
Subject: swap and tempfs


> Hello all.  I've lost Cheryl's original message, but here are a couple
> of thoughts about swap and tempfs.
>
> Tempfs has nothing do do with swap space.  It is a temporary ram based
> file system which can have parts of it's allocated memory swapped out to
> swap space if necessary.  It is like a ram disk, but you don't need to
> make a file system for it, and it will dynamicly add or free memory,
> depending on what is stored on the tempfs file system.  It will use up
> to a maximum of 1 half of whatever amount of ram you have installed in
> the machine.  So if you have 256 meg of ram, the maximum amount of ram
> the tempfs file system will use is 128 meg.  If you have 512 meg of ram,
> the maximum ram usage will jump to 256 meg, etc.  The upshot of this is
> that you use tempfs anywhere that you would normally use a ram disk.  It
> can be mounted where ever you would like a dynamicly sized ram disk to
> be mounted.  You could, for example, mount it on /tmp, and all your
> temporary files such as the ones created by lynx the cat would be
> created on the ram disk, instead of on your hard disk.  This means that
> the file access for these files will be faster, since it takes place in
> ram, but the trade off is the ram disk, in this case tempfs, has a
> maximum size, which means you could run out of temporary file space.
> Look at the kernel help for tempfs for more info about tempfs and how to
> mount it.
>
> Swap space on the other hand is overflow space for data or applications
> that aren't active.  It is the equivalent of the Windows virtual memory
> that most of you are familiar with.  When your system starts, no swap
> space will be used, because all the processes will be in active memory.
> As other processes get started and stopped, inactive or low priority
> applications and data memory pages can be swapped out to the disk swap
> space.  When memory becomes available, or the need arises to execute an
> application that has been swapped, or to read or write data pages that
> have been swapped, other applications or dat are written to swap and the
> needed swap pages are read back in to ram.  The more actual ram you have
> installed in the system, the longer it will take before it becomes
> necessary to use swap space.  Thus, the longer the system has been
> running, the more likely it is that swap space will be used.  Unlike
> windows, it is not necessary to assign a two to one ratio of swap space
> to ram, a one to one ratio is sufficient.  Thus, if you have 256 meg of
> ram, then a 256 meg swap space is a good idea, and not the 512 meg of
> swap that Windows would want.
>
> Have a nice day.
>
> Gene
>
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQKlVLCenap9Jqj2wEQIK7ACfXsnLB8/AM8NJE5+g3PqJZpfMjbkAmQEC
GLqqoX93g3IV4ob2q7DjpoOy
=pUEO
-----END PGP SIGNATURE-----





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux