home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9843 < prev    next >
Encoding:
Internet Message Format  |  1992-09-04  |  3.3 KB

  1. Path: sparky!uunet!mcsun!corton!jussieu!card
  2. From: card@masi.ibp.fr (Remy CARD)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: efs - no bitmap?
  5. Message-ID: <1992Sep4.152159.27479@jussieu.fr>
  6. Date: 4 Sep 92 15:21:59 GMT
  7. References: <1992Aug31.174237.8185@crd.ge.com>
  8. Sender: news@jussieu.fr (Le Facteur)
  9. Organization: Laboratoire MASI - Universite Pierre et Marie Curie - Paris - France
  10. Lines: 63
  11. Nntp-Posting-Host: ares.ibp.fr
  12.  
  13. In article <1992Aug31.174237.8185@crd.ge.com> davidsen@crd.ge.com (bill davidsen) writes:
  14. >
  15. >  I was just looking through the README files for mcc 0.97p2 and noted
  16. >that the efs claims to use a linked list instead of a bitmap, "saving
  17. >all that wasted space" or some such. Since one of the major improvements
  18. >between the original Sys5 filesystem and bsd/usf was changing from a
  19. >linked list to a bitmap to reduce disk fragmentation and improve
  20. >performance, I hope this doesn't mean what I think it does.
  21.  
  22.     Well, I think that I have to react.  Yes, I am going to disappoint you
  23. but the ext fs really uses free inodes/blocks linked lists.  In fact, in
  24. the linked list of free blocks, there is one list header per 256 free blocks:
  25. the first free block contains the addresses of 254 other free blocks, which
  26. can be addressed directly when the former block is in memory, and the address
  27. of the next free block in the list which contains 254 addresses and so on.
  28.  
  29. >
  30. >  Use of a linked list saves space, but you pay forever in performance,
  31. >either by having fragmentation of by searching the list to insert newly
  32. >freed disk space in order. In either case it's a bad idea and I hope
  33. >that's not what is being used in efs. If it is someone should start
  34. >working on efs2 now, but I assume the people who wrote efa knew about
  35. >all this and the README is just unclear.
  36.  
  37.     I am not sure that a bitmap speeds up things: with a bitmap, you
  38. have to load every block containing the bitmap until you find a bit set to
  39. 0.  Of course, you can keep the whole bitmap in memory but it means memory
  40. waste if you mount a big fs.  With the current implementation of the ext fs,
  41. the first block of the free list is always in memory so you can allocate
  42. 254 blocks without reading a block (the 254 blocks whose addresses are contained
  43. in the first free block).  I think that it should be faster than the bitmap
  44. scheme if you don't keep the bitmap in memory.
  45.  
  46.     Of course, this scheme may lead to some important seeks because blocks
  47. can be allocated on different parts of the disk but I think that the problem
  48. also exists if you use a bitmap.  
  49.  
  50.     In fact, I think that performance can be improved in other ways.
  51. I have been working on the new ext fs and I think that performance should
  52. be better because :
  53.     - it uses a cache used by lookup() which is called by namei().
  54.       In fact, Linux (and other Un*x systems) spends a lot of time 
  55.       in namei() which converts a pathname to an inode number and 
  56.       and a cache really helps to get better performance,
  57.     - bigger blocks may be supported so there will be less seek
  58.       delays.  Fragments may also be supported to reduce disk
  59.       space waste.
  60.  
  61.     I must admit that I have not made performance measurements yet.
  62. I will do some soon and will try to tune the new ext fs to optimal
  63. performance.
  64.  
  65.  
  66. >
  67. >-- 
  68. >bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  69. >    I admit that when I was in school I wrote COBOL. But I didn't compile.
  70.  
  71.  
  72. --
  73.  
  74.     Remy Card
  75.     card@masi.ibp.fr
  76.