Re: How does Debian load the kernel modules



zhengda wrote:

Matus UHLAR - fantomas wrote:

yes, probably so. most of kernels get loaded when (first) used, but not
unloaded. I guess hotplug scripts load modules for every existing piece of
hardware for the system to be able to use it. If you'd blacklist them, you
won't be able to use them, and some of your startup scripts may fail.

You can however check /etc/modules for modules you do not really need and
remove them.

I have removed the unnecessary modules listed in /etc/modules. But lsmod shows that there are 74 modules loaded, and 27 modules whose "used by" columns show 0.
So can I list all of these unused modules in /etc/hotplug/blacklist.d/?
By the way, does /etc/hotplug/blacklist have the same function of /etc/hotplug/blacklist.d/? In my system, there are both.


Well I wouldn't worry too much about the number of loaded modules. That, of course, assuming you are running a "modern" machine with several hundreds megabytes of RAM. Modules use just a tiny fraction of RAM: 30, 40k ... the largest one for me being Reiserfs with 200k. But assuming an average of 40k size, you'd be freeing up about 1MB of ram.

Of course if you're trying to run an embedded machine (for which you wouldn't be running debian) or an old machine with 24MB ram (the minimum for Debian), well in that case it would be an issue.

I wouldn't worry too much about it with a standard "modern" computer.

I wonder what happens to modules when the system needs RAM? I know Windows stupidly swaps the System memory by default (unless you enable the DisablePagingExecutive option in the registry). Does linux force the modules to stay in RAM or does it try to swap them when it's RAM-hungry?

Cheers,
Hernan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: How does Debian load the kernel modules
    ... Modules use just a tiny fraction of RAM: ... I wouldn't worry too much about it with a standard "modern" computer. ... I know Windows stupidly swaps the System memory by default. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Woody on 486 problem
    ... Remember when Win95 ran well with 16MB RAM? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Its strange that older debian distributions are failing to properly ... And all I need is just simple network client without gui or any services:) ...
    (Debian-User)
  • Re: Woody on 486 problem
    ... Even better, perhaps, would be DSL, which I have run on a ... 486 class machine with only 16MB of RAM. ... basis which runs MSDOS just fine. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: low-MHz server
    ... Both are far better than my Athlon64 @3.5 GHz. ... I'd get a modern ish server and underclock it, that way you'll be able to get more RAM and bigger hard drives, the Athlon XP was fairly easy to get down to 300 MHz with the FSB still @ 133, I never tried lower but I don't see why not, for comedy value see if you can get the CPU clocking lower than the RAM. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • We keep getting these from you
    ... Subject: 1GB RAM is missing. ... that on a 32bit install you are limited to 2gb maximum of memory that can ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)