Subject: Re: behaviour of null mounts
To: Michael van Elst <mlelstv@serpens.de>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/21/2006 09:30:36
--z6Eq5LdranGa6ru8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Feb 18, 2006 at 09:48:18AM +0000, Michael van Elst wrote:
>=20
> To isolate the problem I have timed a simple 'find /usr/pkgsrc/fonts'
> in both environments. That directory consists of 302 directories
> and 1016 files.
>=20
> In the pkg_comp chroot:
> 1st run       15.28 real 0.01 user 0.28 sys
>               603*getattr, 2768*lookup, 605*access
> 2nd run       10.49 real 0.00 user 0.20 sys
>               603*getattr, 2136*lookup, 0*access
>=20
> Directly in /usr/pkgsrc:
> 1st run        6.74 real 0.00 user 0.14 sys
>               1244*getattr, 2*lookup, 606*access
> 2nd run        3.23 real 0.04 user 0.04 sys
>                914*getattr, 0*lookup, 0*access
>=20
>=20
> Obviously the speed difference comes from the number of NFS operations
> which is 3 times as high in the 2nd run when lots of data is already
> cached and still 2 times as high in the 1st run.
>=20
> The pkg_comp environment is a chroot that uses a null mount to access
> /usr/pkgsrc from outside the chroot. Mounting the NFS server directly
> into the chroot shows the same performance as using the NFS mount
> outside the chroot. The impact must come from the null mount.
>=20
> Now, what creates the extra operations when using the null mount
> and why does it cause different operations?

No idea. The way that null mounts work should have no impact on this.=20
There should be a 1:1 mapping between calls made to the null layer and=20
calls made to the lower nfs client.

The biggest difference might be that caching somehow isn't happening. But=
=20
the calls made to the nfs client via nullfs should be exactly the same as=
=20
those made w/o nullfs, so the caching should be the same.

Take care,

Bill

--z6Eq5LdranGa6ru8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFD+048Wz+3JHUci9cRAtxeAKCDvn24Po+YVWx8p007lVOEY2p/XQCbBWLn
a3DPbBku8iIWvQYuBMLp+VY=
=i/VH
-----END PGP SIGNATURE-----

--z6Eq5LdranGa6ru8--