LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   loaded modules? (https://www.linuxquestions.org/questions/slackware-14/loaded-modules-570795/)

lilili 07-19-2007 05:29 PM

loaded modules?
 
Hello everyone
When I do lsmod it shows a bunch of modules that are currently loaded in my system.
I'm wondering do I really need all those modules to be loaded ? As I see the used by column and some of the modules score 0 in this column.

I'd like to remove the modules that are not used by anything without effecting my system just to speed things up

Thank you

wjevans_7d1@yahoo.co 07-19-2007 05:39 PM

How do these loaded modules slow you down? When they're not in use, they're swapped out.

lilili 07-19-2007 05:51 PM

What I had in my was if nobody is using the modules, isn't it better not to load the modules at all?
So are you saying that when the used by column shows a 0 it means the modules are swapped out/not in the kernel?
who will swap back in the modules when they are needed after they got swapped out?

How do I know whether I really a need a module or not?

Thank you

BCarey 07-19-2007 06:36 PM

Quote:

Originally Posted by lilili
How do I know whether I really a need a module or not?

If you are into experimentation, unload the modules you think you might not need with "rmmod" or "modprobe -r" and see what happens. Expect things to break, though.

Brian

onebuck 07-19-2007 06:37 PM

Quote:

Originally Posted by lilili
What I had in my was if nobody is using the modules, isn't it better not to load the modules at all?
So are you saying that when the used by column shows a 0 it means the modules are swapped out/not in the kernel?
who will swap back in the modules when they are needed after they got swapped out?

How do I know whether I really a need a module or not?

Thank you

Hi,

The kernel uses the modules. If you have a module that is loaded then remove it. If the module is the wrong one then find out which is to be used for the hardware you want functional. Just don't arbitrarily remove a module.

Do a 'lspci -vv' from console then see what is loaded to support the device(s). If you want to know a little more about the kernel then read the; 'Linux Kernel in a Nutshell' link which was referenced in 'Slackware-Links' formerly 'Slackware LQ Suggestions Links!' for other good online reference.

The 'Linux Kernel in a Nutshell' has a good example on how to trace for hardware and modules needs.

wjevans_7d1@yahoo.co 07-20-2007 06:29 AM

To answer one question which has not yet been addressed:

Quote:

who will swap back in the modules when they are needed after they got swapped out?
There are many things which can get swapped out, not just modules: programs which are being run, the memory they're using, and so forth.

In every case, when a program tries to access a segment of memory that has been swapped out, it's the kernel's job to bring the image of that memory back from swap space into real memory and then schedule the process to continue running.


All times are GMT -5. The time now is 01:43 AM.