Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2011 23:04:07 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Jesse Smith <jessefrgsmith@yahoo.ca>
Subject:   Re: Prebind from OpenBSD
Message-ID:  <20110327200407.GL78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <alpine.BSF.2.00.1103272049440.50590@fledge.watson.org>
References:  <1301189037.4069.43.camel@hp-laptop> <alpine.BSF.2.00.1103272049440.50590@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--erUiqtqS2BgH8+NE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 27, 2011 at 08:54:18PM +0100, Robert Watson wrote:
> On Sat, 26 Mar 2011, Jesse Smith wrote:
>=20
> >I'm interested in working on the "Port prebind from OpenBSD" project=20
> >mentioned on the FreeBSD Ideas page. (=20
> >http://wiki.freebsd.org/IdeasPage#head-d28cdd95ca1755d5afe63d653cb4926d4=
bdc99de=20
> >)
> >
> >There isn't much to go on from the project description and I'm curious=
=20
> >what FreeBSD devs are looking for specifically. For example, should the=
=20
> >entire ldconfig program be ported from OpenBSD (it looks like it's close=
=20
> >enough to FreeBSD's to make that suitable), or should just the prebind=
=20
> >code be merged into FreeBSD's ldcnfig?
> >
> >Once the project is complete, who should the work be submitted to? Has=
=20
> >anyone else worked on this and made any progress?
>=20
> Hi Jesse:
>=20
> I think the intent of the ideas list entry is more a research project tha=
n=20
> a direct-to-commit project: the question is whether prebinding of some so=
rt=20
> would observably help performance for important FreeBSD applications or,=
=20
> for example, the boot process.  If so, then certainly the OpenBSD=20
> prebinding code is a possible model -- Mac OS X also has prebinding, of=
=20
> course, and it's done quite differently (and probably less reusably from=
=20
> our perspective as they use Mach-O rather than ELF); however, there might=
=20
> be interesting ideas as well.
>=20
> I think therefore I'd structure a project along the following lines: firs=
t,=20
> you want to establish to what extent synchronous waiting on linkage at=20
> run-time is a significant problem.  It could be that some combination of=
=20
> hwpmc and DTrace would be the right tools for this.  I'd especially pay=
=20
> attention to boot time, since we know that quite a lot of executing takes=
=20
> place then as part of rc.d.  I'd also investigate large applications like=
=20
> Firefox, Chrome, KDE, Gnome, etc.  KDE already integrates prebinding tric=
ks=20
> in its design, but I don't think the others do.
>=20
> Next, I'd dig a bit more into the areas where it's hurting performance --=
=20
> can you add up all the time spent waiting and cut 10 seconds from boot, o=
r=20
> 5 seconds from Firefox startup?  Or is the best win going to be .2 second=
s=20
> in Firefox?  Does the OpenBSD optimisation actually address the problem=
=20
> we're experiencing?  Perhaps perform some experiments with prebinding-lik=
e=20
> behaviour, working up to an implementation.
>=20
> It's worth remembering that prebinding comes with some baggage as well, o=
f=20
> course.  Perhaps less relevant in the world of 64-bit address spaces, but=
=20
> there are some design trade-offs in this department...
The most serious issue with prebind is a consistency.
It is very easy to get prebind data out of date, and this is
esp. easy in the FreeBSD where buildworld and source port upgrades
are everyday activity.

Before this goes much further, yes, we need a benchmarks that demonstrate
that system spends significant time in the symbol resolution for often
started images [*], and second, we need to have a workable model for source
upgrades.

* - so that Firefox, OpenOffice etc do not qualify, IMHO.

--erUiqtqS2BgH8+NE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk2PmDcACgkQC3+MBN1Mb4gc6ACfT4DP0q6jrC2iOywJW4A3qxtw
Wr8AoLdAg9q7mbr6jnh8Y+7Vo/QUVwc6
=nPgl
-----END PGP SIGNATURE-----

--erUiqtqS2BgH8+NE--



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