[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: static vs modules



On Wed, Jan 17, 2001 at 08:36:18AM -0800, Jon Pennington wrote:
> On Wed, Jan 17, 2001 at 08:17:25AM +0000, Cliff Sarginson wrote:
> > > On Tue, Jan 16, 2001 at 12:59:34PM +0100, Sebastiaan wrote:
> > > > Hello,
> > > > 
> > > > I was wondering if there is a speed/operating difference when compiling
> > > > kernel daemons like knfs static in the kernel or in modules. 
> > > > Anyone know something about this?
> > > 
> > > I think there is no measurable (is this spelled right?)
> > > difference. (That's what I think, I haven't tested it)
> > > 
> > > Modules are more flexible. For example if you get a new soundcard you
> > > only have to insert the new module, you don't need to recompile the
> > > whole kernel.
> > 
> > I expect there is a few picaseconds latency when the module is first
> > loaded :) Other than that I should think not.
> 
> It depends on what you're talking about.  Take, for instance, the
> Intel EtherExpressPro100 (eepro100) network card.  Loading it as a
> module on a HEAVILY laden web server exposed a major weakness in the
> overall robustness of the card.  The card started dropping packets and
> causing collisions under only 50% of what the interface would have been
> capable of if it were built-in to the kernel.

why is that (just curious) -- has anybody got an idea?

Afaik, the only performance related difference between static and
shared object code (once the module is loaded) comes from the
requirement of .so-code to be 'relocatable', which means that a few
extra machine code instructions need to be generated by the compiler.
The performance decrease is normally negligible, according to my
experiences far below 10%.

So, either the code of that module is somewhat weird, or there is some
highly nonlinear interaction between CPU load and network throughput...
In that case, I would expect the same drop in performance with the static
module version when the load rises just another few percent above the
point where the dynamic version gets into problems...

any other explanations?
I'd appreciate comments -- though I know it's somewhat off-topic... :)

Erdmut



-- 
Erdmut Pfeifer
science+computing gmbh

-- Bugs come in through open windows. Keep Windows shut! --



Reply to: