home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10385 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!wjin
  2. From: wjin@cs.uh.edu (W. Woody Jin)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: Dumb Question: Why 512 byte block?
  5. Date: 18 Dec 1992 18:59:50 GMT
  6. Organization: University of Houston
  7. Lines: 48
  8. Message-ID: <1gt736INNjje@menudo.uh.edu>
  9. References: <1992Dec18.005050.20594@decuac.dec.com> <1992Dec18.030833.7395@fcom.cc.utah.edu>
  10. NNTP-Posting-Host: rodin.cs.uh.edu
  11.  
  12. In article <1992Dec18.030833.7395@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
  13. >In article <1992Dec18.005050.20594@decuac.dec.com>, darryl@vfofu1.dco.dec.com (Darryl Wagoner) writes:
  14. >|> Why is everything in 1/2 k block instead the BSD standard of 1024 byte blocks?
  15. >|> Yes, I know there is a '-k' switch, but it seems to me it should be
  16. >|> the otherway around.
  17. >
  18. >Think of disk blocks as the curve-fitting algoritm they taught you when you
  19. >first learned integral calculus:  the smaller your slices, the closer you
  20. >come to approximating the area under the curve.
  21. >
  22. >If I have a set of 6 512 byte files, I will use up 3K of disk for them;
  23. >similarly, if I had a blocking factor of 1K, I would use of 6K (since the
  24. >smallest fragment usable by a file is now 1K.
  25. >
  26. >If I have 6 1.5K files, this translates to 9K of disk(512B) or 12K of disk(1K).
  27. >Obviously, if I have 6 1.6K files, both blocking factors take up 512K.
  28.  
  29. I did not think that Fast Unix File System works this way.
  30. If you have 6 1.5K files using 1K blocks,
  31.    6 1k blocks will take each 1K from each file, and 
  32.    3 1k blocks will take 0.5k from each file.
  33. This was my understading from the famous FUFS paper.
  34.    
  35.  
  36. >The offset into the disk is a _block_offset_; what this means is that you
  37. >will start looking for data at the offet*blocking_size when given an address,
  38. >and that reads/write into kernel cache are done (usually) in block_size
  39. >increments.  A device accessed this way is a blocked device.
  40. >
  41. >When you store a lot of little files on the disk, small blocks are wasteful
  42. >of disk space (for instance, 1024 empty files take 512K vs 1M of disk for
  43. >the smaller blocking factor).
  44.  
  45. And choosing a disk block size is a performance issue rather than
  46. disk space issue. One should tune disk block size and fragment size
  47. to get the best performance.
  48.  
  49. I thought that 386BSD uses this Fast Unix File System.
  50.  
  51. -- 
  52. ____   ____  ____ ____________________________________ (___) _________________
  53. |  |   |  |  |  |  W. Woody Jin (wjin@cs.uh.edu)       (o o)      Moo.... 
  54. |  |   |  |__|  |  PhD Student. Research Asst.  o=======\ /  I'm  a Cow Lover.
  55. |  |   |        |  Dept. of Computer Science   / |     ||O   My wife  was born
  56. \  |---|  |--|  |  University of Houston      `  ||'---||    in Cow year. Mooo
  57.  \____/|__|  |__| _______________________________^^    ^^_____________________
  58.  
  59.  
  60.