]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cache: stop requeuing negative entries on the hot list
authorMateusz Guzik <mjg@FreeBSD.org>
Fri, 27 Sep 2019 19:13:22 +0000 (19:13 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Fri, 27 Sep 2019 19:13:22 +0000 (19:13 +0000)
commite64314183897a2c47039fc8dfd32ec5f3bf77588
tree6b7c64e557afc23c826d9971aaf7f1e7512b545c
parent312196df0f80d81f8f44613fe6cd113567ed31cf
cache: stop requeuing negative entries on the hot list

Turns out it does not improve hit ratio, but it does come with a cost
induces stemming from dirtying hit entries.

Sample result: hit counts of evicted entries after 2 buildworlds

before:

           value  ------------- Distribution ------------- count
              -1 |                                         0
               0 |@@@@@@@@@@@@@@@@@@@@@@@@@                180865
               1 |@@@@@@@                                  49150
               2 |@@@                                      19067
               4 |@                                        9825
               8 |@                                        7340
              16 |@                                        5952
              32 |@                                        5243
              64 |@                                        4446
             128 |                                         3556
             256 |                                         3035
             512 |                                         1705
            1024 |                                         1078
            2048 |                                         365
            4096 |                                         95
            8192 |                                         34
           16384 |                                         26
           32768 |                                         23
           65536 |                                         8
          131072 |                                         6
          262144 |                                         0

after:
           value  ------------- Distribution ------------- count
              -1 |                                         0
               0 |@@@@@@@@@@@@@@@@@@@@@@@@@                184004
               1 |@@@@@@                                   47577
               2 |@@@                                      19446
               4 |@                                        10093
               8 |@                                        7470
              16 |@                                        5544
              32 |@                                        5475
              64 |@                                        5011
             128 |                                         3451
             256 |                                         3002
             512 |                                         1729
            1024 |                                         1086
            2048 |                                         363
            4096 |                                         86
            8192 |                                         26
           16384 |                                         25
           32768 |                                         24
           65536 |                                         7
          131072 |                                         5
          262144 |                                         0

Sponsored by: The FreeBSD Foundation
sys/kern/vfs_cache.c