Re: which is faster (modules or monolithic)?

Helge Hafting (helge.hafting@c2i.net)
Wed, 10 Mar 1999 20:16:23 +0100


> I understand the concept of a modular vs monolithic kernel.
>
> What is the speed tradeoff for each method ?.
>
> I have a P100 with 32M memory and 50M or so swap {which hardly seems to
> get used} but the systems _feels_ slow.
>
> Is a smaller Kernel (ie using modules) with the auto modle loader (what's
> it called again) running in the background going to operate faster than the
> same items made into a monlithic one ?. Or is the currently 'inactive'
> parts of a monolithic kernel going to suck more CPU cycles than the module
> loader would use.
The inactive parts of an monolith kernel does not suck any cycles. It
consumes memory that could be put to better use as diskcache or
application memory though.

Not using modules gives you a bigger kernel. That means less memory
for your applications. Not a problem at all if you aren't swapping
much anyway. Your 32M machine will probably not see much difference between
a 1M kernel and a 2M kernel.

Using modules takes time whenever a module needs to be loaded, that
is when you use some modularized feature you haven't been using for a
while. This tends to happen fast though. I know of no performance
penalty when using an already loaded module.

The memory & performance stuff is probably not noticeable with 32M
and little swapping. Base your desicion on other criteria, such as:
*- The additional work of setting up module stuff
*+ Modules can be patched, recompiled and reloaded without rebooting.

If performance is what you want, look for lightweight software.
If using X, find a lightweight window manager. (icewm, twm,...)
That can make a difference. Consider avoiding KDE/Gnome if your machine
is sluggish. Don't run stuff you don't use, this applies to programs,
system daemons, and kernel drivers. Don't be afraid of dropping support
for stuff in the kernel, you can always turn things back on if you find you
need it later.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/