This project is sponsored by the Innovative Software AG!



Definitions and Objectives

Introduction


Definition of Terms
  • internal-fragmentation
  • external-fragmentation
  • standard formulation
  • fragmentationX
  • fragmented path


  • Link to my old page


    Copyright and Contact



    Tool: Fibmap

    Description
  • download



  • Tool: Read

    Description
  • download



  • Tool: Agesystem

    Description
  • download


  • Gauge Measurements

  • Test System

  • 500 MB Partition

  • file size distribution
  • results for Ext2FS
  • results for ReiserFS
  • results for JFS
  • results for XFS


  • 1GB Partition
  • file size distribution
  • all results


  • 4 GB Partition
  • file size distribution
  • all results


  • Gauge Verifications

  • Test System

  • 500 MB Partition

  • 1 GB Partition

  • 4 GB Partition


  • TODO



    Gauge Performance

    Description
  • download


  • Measurements on 2.4.5

  • Test System

  • Output Explanation

  • variable file size
  • create fixed size
  • append variable size


  • Measurements on 2.4.8

  • Test System

  • Output Explanation

  • variable file size



  • Append Tests

    Description
  • download


  • Measurements on 2.4.8

  • Test System

  • Output Explanation

  • fixed append size
  • variable append size
  • low statistics


  • With Preallocation

  • Output Explanation

  • fixed append size


  • Measurements on 2.4.10
  • Test System

  • Output Explanation

  • fixed append size


  • With Preallocation

  • Output Explanation

  • fixed append size


  • Tool: Agesystem3

    Description
  • download



  • Aging Tests

    Description
  • download


  • Measurements on 2.4.8

  • Test System

  • Explanation of Terms

  • generic file size dist


  • Measurements on 2.4.10
  • Test System

  • Explanation of Terms

  • generic file size dist



  • External Links

    Filesystem Homepages
  • ReiserFS
  • Ext2FS
  • Ext3FS
  • XFS
  • JFS


  • Benchmarks & Results
  • ReiserFS benchs
  • Denis'+Kresimir's site
  • Randy's tests
  • Yves' YAFB tests


  • Literature
  • Smith's site
  • My master thesis




  • Additional Notes

    Copyright 2001 by
    Constantin Loizides,
    loizides AT informatik DOT uni-frankfurt DOT de

    Last changes:
    Do Feb  5 09:40:02 CET 2004
    

    Journaling-Filesystem Fragmentation Project

    Tool: Fibmap




    Description

    To measure the fragmentation of a file or a partition I have written a small program called fibmap.
    This program makes use of the ''ioctl'' system call
    fib_res=ioctl(fd,FIBMAP,&fib_blk);
    
    on a file descriptor ''fd''. In ''fib_blk'' one specifies which block number of the file to get
    (e.g. you start with zero for the first block). On success ''fib_res'' is not minus one and
    the resulting value in ''fib_blk'' is the logical block number of that block. It is zero if the
    block number is not available or implemented for the filesystem under question (e.g. for tails
    in ReiserFS). In that way fibmap proceeds for all blocks of a file at the end knowing the block
    layout of it. A tricky part of the program was that one has to use
    fib_res=ioctl(fd,FIGETBSZ,&fib_bsize);
    
    in order to find the block size which the underlying filesystem uses for the FIBMAP call.
    Fibmap is able to detect holes and tails and does recognize hardlinks though not very
    efficiently at the moment. One thing it does wrong: a hole at the end of a file will always be
    counted as a tail.

    Fibmap then uses the found layout to measure the different
    definitions of fragmentation I have stated.
    On start you can specify a single file, a directory or many directories which fibmap will
    recursively proceed. At the end a statistic summary is shown.

    Download

    You may download fibmap and try it yourself.
    After downloading the package create a directory where to untargz it. In the Makefile you probably
    want to change some paths. Then type ''make fibmap'' followed by ''fibmap -h'' to get additional help.

    Usage of fibmap v0.2
             -b blks        work only on blocks greater than blks
             -h,-?          this text
             -s             don't show stats after fibmaping
             -v             increase verbosity by one
                            output is as follows:
                            name size_in_bytes blocks_total - blocknumbers - f1 f10 f100 f1000 - fragmax - fragpath1 fragpath2
    


    The statistical result for my /usr directory on ext2 looks as follows (see below for a explanation)

    Result for 198783 files 12372 dirs: Int: 0.869 Ext: 0.989 0.993 0.993 0.993 - 285.374 - Path 647.303 1981.829
    Mean Internal frag: 0.869
    Mean External frag: 0.989
    Mean Frag. Path 647.303
    Hist for frag
                       1         2         4         8        16        32        64       128       256       512      1024      2048      4096      8192     16384
             0         0       734       161        21         0         0         0         0         0         0         0         0         0         0         0       916
     0.0909091         0         0         0         0         2         0         0         0         0         0         0         0         0         0         0         2
      0.181818         0         0         0         6         1         0         0         0         0         0         0         0         0         0         0         7
      0.272727         0         0         0        17         7         5         0         0         0         0         0         0         0         0         0        29
      0.363636         0         0       154         9        19        11         0         0         0         0         0         0         0         0         0       193
      0.454545         0         0         0         5        24        16         3         0         0         0         0         0         0         0         0        48
      0.545455         0         0       342        88         8        31         3         0         0         0         0         0         0         0         0       472
      0.636364         0         0         0        65        11        44        16         5         1         1         0         0         0         0         0       143
      0.727273         0         0       173        71        20        15        20        13         7         7         2         0         0         0         0       328
      0.818182         0         0         0       224       126        12        29         9         4         5         1         0         0         0         0       410
      0.909091         0         0         0       132       330       134        10        10         3         2         2        13         0         0         0       636
             1    119548     28347     20652     12975      7192      3920      1667       724       352       114        76        23         5         3         1    195599
                  119548     29081     21482     13613      7740      4188      1748       761       367       129        81        36         5         3         1    198783
    
    Hist for frag path
                       1         2         4         8        16        32        64       128       256       512      1024      2048      4096      8192     16384
             1    119548     29066     21291     13253      7357      3683      1510       688       340       111        74        21         5         3         1    196951
            10         0         2       142       222       234       226       137        24         7         1         1         1         0         0         0       997
           100         0         0         0         1         4        17         2         5         3         0         1         1         0         0         0        34
          1000         0         1         2         1         7        13         1         4         0         3         1         0         0         0         0        33
         10000         0         8         5         4         5        60         7         4         7        14         1        13         0         0         0       128
        100000         0         0         4        48        82       165        76        34         9         0         3         0         0         0         0       421
       1000000         0         3        24        67        51        24        15         2         1         0         0         0         0         0         0       187
      10000000         0         1        14        17         0         0         0         0         0         0         0         0         0         0         0        32
                  119548     29081     21482     13613      7740      4188      1748       761       367       129        81        36         5         3         1    198783
    
    The internal fragmentation is 1 - minus the printed value (e.g. 13 % in the shown case). It is followed
    by the standard fragmentation value, fragmentation10, fragmentation100, fragmentation1000.
    For those values one is best and zero worst (you can also take 1 minus the fragmentation value, it is a matter of taste.
    Then of course zero is best and one is worst).
    These values are followed by fragmax, which I did not explain yet: it is the maximum logical block number
    minus the smallest number of a file divided by the blocks the file occupies; averaged over all files like the other fragmentation values).
    Then there come two definitions of the average of the fragmentation path, the first is averaged over
    all files (as explained in the definition part), the second is calculated by first adding all
    fragmentation paths divided at the end of run by the number of blocks of all files fibmap has seen.
    These values are followed by two histograms, one for the standard fragmentation and
    one for the fragmentation path. On the left there are the bins for the fragmentation values and
    on top the number of blocks in powers of two. On the right and bottom there are the summaries
    each row and column respectively.