home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sun / apps / 3052 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.7 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.sys.sun.apps
  4. Subject: Re: Yes, f77 can be taught not to use /tmp
  5. Message-ID: <16565@auspex-gw.auspex.com>
  6. Date: 22 Jan 93 05:48:04 GMT
  7. References: <1993Jan20.185627.19507@mapsut.einstein.com> <1993Jan22.014443.17806@mapsut.einstein.com>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 30
  11. Nntp-Posting-Host: auspex.auspex.com
  12.  
  13. >Use virtual memory (tmpfs) for the tmp directory.  I did not try this, 
  14. >but several respondents said it does.
  15.  
  16. Does what? :-)
  17.  
  18. Basically, what it does is gives you a file system that you might think
  19. of as living on the "b" partition of your root disk.  I.e., its
  20. "metadata", including directories, are (wired-down) data structures in
  21. the kernel's address space, and its data are "anonymous" pages backed by
  22. swap space.
  23.  
  24. If you have the swap space to spare, it lets you use it for temporary
  25. files.  (If you don't, you run the risk of getting ENOSPC errors, just
  26. as you do on a "/tmp" directory on a regular file system.)
  27.  
  28. It also should run faster than does a "/tmp" directory on a normal file
  29. system (and seems to have done so when I've tried it).
  30.  
  31. For one thing, metadata operations don't have to touch the disk at all -
  32. creating or deleting files just means updating some data structures in
  33. the kernel.
  34.  
  35. For another thing, "update" or other users of "sync()" won't push dirty
  36. temporary-file pages out to their backing store, so you may avoid some
  37. UFS or NFS writes to the disk or the network.  (If the file is deleted
  38. before the pages get pushed, they'll *never* get pushed to the backing
  39. store.)
  40.  
  41. However, it does mean that anything that must survive a reboot had
  42. better not be in "/tmp"....
  43.