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

  1. Path: sparky!uunet!spool.mu.edu!agate!agate.berkeley.edu!cgd
  2. From: cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: Dumb Question: Why 512 byte block?
  5. Date: 19 Dec 92 00:07:39
  6. Organization: Kernel Hackers 'r' Us
  7. Lines: 62
  8. Message-ID: <CGD.92Dec19000739@eden.CS.Berkeley.EDU>
  9. References: <1992Dec18.005050.20594@decuac.dec.com>
  10.     <1992Dec18.030833.7395@fcom.cc.utah.edu> <1gt736INNjje@menudo.uh.edu>
  11.     <1992Dec18.235623.27538@fcom.cc.utah.edu>
  12. NNTP-Posting-Host: eden.cs.berkeley.edu
  13. In-reply-to: terry@cs.weber.edu's message of 18 Dec 92 23:56:23 GMT
  14.  
  15. In article <1992Dec18.235623.27538@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
  16. >>I did not think that Fast Unix File System works this way.
  17. >>If you have 6 1.5K files using 1K blocks,
  18. >>   6 1k blocks will take each 1K from each file, and 
  19. >>   3 1k blocks will take 0.5k from each file.
  20. >>This was my understading from the famous FUFS paper.
  21. >
  22. >You can't split blocks between files.  A block is, by definition, the
  23. >smallest possible allocation unit.  Thin about the case where you have
  24. >a 1 byte file and a 1 block - 1 byte file; what would you do when
  25. >adding one or two characters to the first (1 Byte)?  TReallocate?  Shift
  26. >and reallocate for the last byte of the second file?
  27.  
  28. sorry.  you guys *both* sound confused.  first of all, i've never
  29. seen a FFS with 1k blocks; the most "standard" configuration
  30. is 4k or 8k blocks, with 8 fragments.
  31.  
  32. this yields fragments of (obviously) 512bytes and 1k.
  33.  
  34. you can't split *fragments* between one file.
  35. you *can* split blocks between one file, but this tends not to happen,
  36. because the FFS doesn't do this unless it's necessary.
  37.  
  38. so:  if you have 6 1.5k files, and the following filesystem setups,
  39. you get the following results:
  40.  
  41. 8k blocks, 8frags/block:  6 blocks assigned, but major fragmentation...
  42.               (actually, only 12 frags are used.  if your
  43.               filesystem is near full, < 6 blocks will be
  44.               assigned).
  45.  
  46.               total space "actually used": 12k
  47.  
  48. 8k blocks, 4frags/block:  6 blocks assigned, but major fragmentation...
  49.               (actually, only 6 frags are used.  if your
  50.               filesystem is near full, < 6 blocks will be
  51.               assigned).
  52.  
  53.               total space "actually used": 12k
  54.  
  55. 4k blocks, 8frags/block:  6 blocks assigned, but major fragmentation...
  56.               (actually, only 18 frags are used.  if your
  57.               filesystem is near full, < 6 blocks will be
  58.               assigned).
  59.  
  60.               total space "actually used": 9k
  61.  
  62. 4k blocks, 4frags/block:  6 blocks assigned, fragmentation "not too bad"...
  63.               (actually, 12 frags are used.  if your
  64.               filesystem is near full, < 6 blocks will be
  65.               assigned).
  66.  
  67.               total space "actually used": 12k
  68.  
  69.  
  70.  
  71. Chris
  72. --
  73. Chris G. Demetriou                                    cgd@cs.berkeley.edu
  74.  
  75. "Sometimes it is better to have twenty million instructions by
  76.         Friday than twenty million instructions per second." -- Wes Clark
  77.