Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2002 09:58:02 -0800 (PST)
From:      David Malone <dwmalone@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ufs/ufs ufs_dirhash.c
Message-ID:  <200203201758.g2KHw2o36141@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
dwmalone    2002/03/20 09:58:02 PST

  Modified files:
    sys/ufs/ufs          ufs_dirhash.c 
  Log:
  Two minor changes to dirhash, which result in some marginal benchmark
  improvements.
  
  1) If deleting an entry results in a chain of deleted slots ending in an
     empty slot, then we can be a bit more aggressive about marking slots as
     empty.
  
  2) The last stage of the FNV hash is to xor the last byte of data
     into the hash. This means that filenames which differ only in
     the last byte will be placed close to one another in the hash
     table, which forms longer chains. To work around this common
     case, we also hash in the address of the dirhash structure.
  
       news/cancel = news/articles/control/cancel for a tradspool inn server
       squid2 = squid level 2 directory (dirs called 00->FF)
       squid3 = squid level 3 directory (files called 00001F00->00001FFF)
  
                               mean #probes for
                    home dir  mh inbox  news/cancel  tmp    squid2  squid3
  old   successful  1.02      3.19      4.07         1.10    7.85   2.06
  new   successful  1.04      1.32      1.27         1.04    1.93   1.17
  
  old unsuccessful  1.08      4.50      5.37         1.17   10.76   2.69
  new unsuccessful  1.08      1.73      1.64         1.17    2.89   1.37
  
  Reviewed by:    iedowse
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.10      +15 -3     src/sys/ufs/ufs/ufs_dirhash.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203201758.g2KHw2o36141>