Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jun 2011 13:41:41 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        Garrett Cooper <yanegomi@gmail.com>, Gary Palmer <gpalmer@freebsd.org>, Gustau P?rez <gperez@entel.upc.edu>, freebsd-current@freebsd.org
Subject:   Re: rc.d script to load kernel modules 
Message-ID:  <20110612204141.D6BFF1CC0B@ptavv.es.net>
In-Reply-To: Your message of "Sun, 12 Jun 2011 12:42:28 PDT." <4DF516A4.9040308@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Sun, 12 Jun 2011 12:42:28 -0700
> From: Doug Barton <dougb@FreeBSD.org>
> Sender: owner-freebsd-current@freebsd.org
> 
> On 6/12/2011 12:34 PM, Garrett Cooper wrote:
> > On Sun, Jun 12, 2011 at 12:24 PM, Gary Palmer<gpalmer@freebsd.org>  wrote:
> >> On Sun, Jun 12, 2011 at 02:56:31PM -0400, Jason Hellenthal wrote:
> >>> So technically here a ZFS only install is lacking the speed in which
> >>> modules are loaded. I would prefer to find out why and fix that before
> >>> we go about adding new functionality to rcNG.
> >>
> >> As I believe Doug has already said, its not just loading modules from ZFS.
> >> In my experience, loading modules via loader.conf from UFS on i386 is
> >> significantly slower than once the kernel has booted on both of my systems
> >> here.  I think I've tried it and its not a disk thing as its slow loading from
> >> flash media also.
> >
> >      Dumb questions:
> 
> 0. Does anyone actually read what I write?
> 
> >      1. Has anyone benchmarked the two methods in parallel? If so
> > what's the delta?
> 
> As I've said several times now ... Loading modules in the boot loader 
> takes an average of 2 seconds per module. Loading 6 of them from disk 
> happens so fast I can't read the probe messages in real time. (I.e., 
> less than 1 second total for all 6.)
> 
> >      2. Has anyone tried to determine why it is that way?
> 
> Repeating myself again ... read the threads on -arch and the svn list. 
> There you will find the answers from people a lot smarter than I. Short 
> version, it's a known issue that cannot be changed.

I think some people are missing a point that Doug assumes is obvious. (I
did, too, until this last question pointed out that I was wrong.)

The deal is that the loader is loading modules BEFORE the kernel is
loaded. FreeBSD is NOT running and a very limited tool (please read the
loader(8) man page) is doing the work. It knows UFS just well enough to
do the job, but is nothing approaching efficient or optimal. It was not
intended to be. It originally just loaded and started the kernel.
Modules came later and putting a real VFS or anything else into the
loader is just not sane, so...

If modules are loaded by the loader, it is VERY slow. As the modularity
of FreeBSD has increased, this has become a significant issue and is
likely to get worse. Hence Doug's approach to loading modules not
needed to boot the kernel to rc.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634
Last work day before retirement is Jun 17, 2011



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