Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2019 16:15:56 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@FreeBSD.org>
Subject:   Re: test hash functions for fsid
Message-ID:  <YQBPR0101MB2260825EACF2A293BD305FC7DD330@YQBPR0101MB2260.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YQBPR0101MB22606FACAD31932AC46DCD6EDD330@YQBPR0101MB2260.CANPRD01.PROD.OUTLOOK.COM>
References:  <YQBPR0101MB2260D82BAE348FB82902508CDD320@YQBPR0101MB2260.CANPRD01.PROD.OUTLOOK.COM> <D27D3F7A-22B3-4EDA-AD61-1B95366D1A2D@lysator.liu.se> <YQBPR0101MB2260AA6B2642A5DDE49D4A35DD320@YQBPR0101MB2260.CANPRD01.PROD.OUTLOOK.COM>, <0CA718D0-3853-4DDE-B6E1-5BF828EEE19B@lysator.liu.se>, <YQBPR0101MB22606FACAD31932AC46DCD6EDD330@YQBPR0101MB2260.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
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 variati=
on,
so I added those manually.

>Here=92s some output (as root):
>
># Balur01 - 72352 zfs filesystems
>root@balur01:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D340 min=3D237 totvari=3D3384.937500
>H2: max=3D338 min=3D238 totvari=3D3760.296875
>H3: max=3D333 min=3D241 totvari=3D3373.703125
>H4: max=3D487 min=3D277 totvari=3D36364.765625
>H5: max=3D324 min=3D107 totvari=3D36425.234375
Mean: 283
Ave variation about mean for best one: 13.2 (about 4.6%)

># Balur03 - 42023 zfs filesystems
>root@balur03:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D202 min=3D135 totvari=3D2530.750000
>H2: max=3D203 min=3D128 totvari=3D2792.500000
>H3: max=3D196 min=3D127 totvari=3D2597.500000
>H4: max=3D288 min=3D166 totvari=3D20886.000000
>H5: max=3D165 min=3D55 totvari=3D20887.250000
Mean: 164
Ave variation about mean for best one: 9.8 (about 6%)

># Filur01 - 21182 zfs filesystems
>root@filur01:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D111 min=3D60 totvari=3D1902.765625
>H2: max=3D113 min=3D56 totvari=3D1962.921875
>H3: max=3D116 min=3D58 totvari=3D1870.000000
>H4: max=3D158 min=3D83 totvari=3D10640.921875
>H5: max=3D79 min=3D23 totvari=3D10640.000000
Mean: 83
Ave variation about mean for best one: 7.3 (about 9%)

># Filur02 - 20981 zfs filesystems
>root@filur02:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D115 min=3D60 totvari=3D1905.117188
>H2: max=3D106 min=3D62 totvari=3D1737.164062
>H3: max=3D105 min=3D57 totvari=3D1961.210938
>H4: max=3D157 min=3D77 totvari=3D10462.023438
>H5: max=3D84 min=3D26 totvari=3D10451.976562
Mean: 82
Ave variation about mean for best one: 6.8 (about 8%)

># Filur04 - 7500 zfs filesystems
>root@filur04:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D43 min=3D14 totvari=3D1030.890625
>H2: max=3D48 min=3D16 totvari=3D1145.218750
>H3: max=3D46 min=3D17 totvari=3D1049.328125
>H4: max=3D63 min=3D25 totvari=3D3804.109375
Mean: 29
Ave variation about mean for best one: 4.0 (about 13%)

># Filur05 - 1478 zfs filesystems
>root@filur05:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D14 min=3D1 totvari=3D505.429688
>H2: max=3D17 min=3D0 totvari=3D569.273438
>H3: max=3D14 min=3D1 totvari=3D509.234375
>H4: max=3D19 min=3D2 totvari=3D890.671875
>H5: max=3D10 min=3D0 totvari=3D806.742188
Mean: 6
Ave variation about mean for best one: 2.0 (about 33%)

># testy - 53 zfs filesystems
>root@testy:/usr/home/Lpeter86 # /tmp/testhash
>H1: max=3D2 min=3D0 totvari=3D91.531250
>H2: max=3D2 min=3D0 totvari=3D91.078125
>H3: max=3D3 min=3D0 totvari=3D92.437500
>H4: max=3D3 min=3D0 totvari=3D107.187500
>H5: max=3D3 min=3D0 totvari=3D79.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 win=
ner
by a small margin. (H1 is fnv_32_buf() with an initial value of 0.)

>Just for fun I=92ve also attached a screenshot from our =93management cons=
ole=94 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 st=
udent-driven (depends on what >classes/labs they are taken if the use the L=
inux 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 w=
ith
       over 72,000 file systems on it;-)




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