test hash functions for fsid

Rick Macklem rmacklem at uoguelph.ca
Thu May 9 16:15:59 UTC 2019


Peter Eriksson wrote:
>Ah, of course. Sorry about that :-)
Nothing to be sorry about. I didn't realize that f_fsid would be 0 for non-root
in the getmntinfo() reply.
The test uses a hash table size of 256 and doesn't print Ave or Ave variation,
so I added those manually.

>Here’s some output (as root):
>
># Balur01 - 72352 zfs filesystems
>root at balur01:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=340 min=237 totvari=3384.937500
>H2: max=338 min=238 totvari=3760.296875
>H3: max=333 min=241 totvari=3373.703125
>H4: max=487 min=277 totvari=36364.765625
>H5: max=324 min=107 totvari=36425.234375
Mean: 283
Ave variation about mean for best one: 13.2 (about 4.6%)

># Balur03 - 42023 zfs filesystems
>root at balur03:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=202 min=135 totvari=2530.750000
>H2: max=203 min=128 totvari=2792.500000
>H3: max=196 min=127 totvari=2597.500000
>H4: max=288 min=166 totvari=20886.000000
>H5: max=165 min=55 totvari=20887.250000
Mean: 164
Ave variation about mean for best one: 9.8 (about 6%)

># Filur01 - 21182 zfs filesystems
>root at filur01:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=111 min=60 totvari=1902.765625
>H2: max=113 min=56 totvari=1962.921875
>H3: max=116 min=58 totvari=1870.000000
>H4: max=158 min=83 totvari=10640.921875
>H5: max=79 min=23 totvari=10640.000000
Mean: 83
Ave variation about mean for best one: 7.3 (about 9%)

># Filur02 - 20981 zfs filesystems
>root at filur02:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=115 min=60 totvari=1905.117188
>H2: max=106 min=62 totvari=1737.164062
>H3: max=105 min=57 totvari=1961.210938
>H4: max=157 min=77 totvari=10462.023438
>H5: max=84 min=26 totvari=10451.976562
Mean: 82
Ave variation about mean for best one: 6.8 (about 8%)

># Filur04 - 7500 zfs filesystems
>root at filur04:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=43 min=14 totvari=1030.890625
>H2: max=48 min=16 totvari=1145.218750
>H3: max=46 min=17 totvari=1049.328125
>H4: max=63 min=25 totvari=3804.109375
Mean: 29
Ave variation about mean for best one: 4.0 (about 13%)

># Filur05 - 1478 zfs filesystems
>root at filur05:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=14 min=1 totvari=505.429688
>H2: max=17 min=0 totvari=569.273438
>H3: max=14 min=1 totvari=509.234375
>H4: max=19 min=2 totvari=890.671875
>H5: max=10 min=0 totvari=806.742188
Mean: 6
Ave variation about mean for best one: 2.0 (about 33%)

># testy - 53 zfs filesystems
>root at testy:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=2 min=0 totvari=91.531250
>H2: max=2 min=0 totvari=91.078125
>H3: max=3 min=0 totvari=92.437500
>H4: max=3 min=0 totvari=107.187500
>H5: max=3 min=0 totvari=79.046875
I won't bother with Mean, etc. since most lists would have been 0-2 entries.

The first 3 hashes appear to work about equally well, with H1 being the winner
by a small margin. (H1 is fnv_32_buf() with an initial value of 0.)

>Just for fun I’ve also attached a screenshot from our “management console” with a >current status of our FreeBSD fileserver (11:30, so is just before lunch here). >Currently the number of NFS users are a bit on the low side (more NFS clients are >being integrated all the time, but a lot is student-driven (depends on what >classes/labs they are taken if the use the Linux labs or not).

Thanks for running the test Peter, rick
ps: If anyone else has a server with a lot of file systems (particularily a lot of UFS
       file systems), feel free to post test results.
       However, I think Peter's results have given me what I need, at least for ZFS.
pss: As a guy who code NFS when disk drives stored Mbytes and were the size of
       washing machines, I still can't quite wrap my head around a server with
       over 72,000 file systems on it;-)



More information about the freebsd-fs mailing list