Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what is ksoftirqd_CPU0? it's just started showing up in top and i can't find any practical information on it. it seems to be some sort of daemon related to wireless networking that eats CPU cycles ? or what? i don't have wireless. ? how can i turn it off?
5.3 Softirq
When an IRQ comes, task switching is deferred until later to get better performance. Some Task jobs (that could have to be done just after the IRQ and that could take much CPU in interrupt time, like building up a TCP/IP packet) are queued and will be done at scheduling time (once a time-slice will end).
In recent kernels (2.4.x) the softirq mechanisms are given to a kernel_thread: ''ksoftirqd_CPUn''. n stands for the number of CPU executing kernel_thread (in a monoprocessor system ''ksoftirqd_CPU0'' uses PID 3).
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
That means some device in your system is sending the processor a slew of IRQs so that the softirqd for your processor is being consistenly woken up, which ends up using most of your CPU cycles. What needs to be done is to identify the 'culprit' and stop the interrupts. What does your syslog say?
oh man, it says a ton of stuff going back weeks. starting from the bottom, there are a lot of these:
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:46 localhost modprobe: modprobe: Can't locate module sound-slot-1
maybe having something to do with onboard sound chip, even though i have that disabled in the BIOS and am using a PCI sound card?
then there's a ton more stuff, a lot looking similar to what i get during booting (e.g., some md/ RAID/ "personality" stuff that i hate seeing every time and can't figure out how to turn off). and this looks maybe related to IRQ issues:
then it basically repeats a few times, i guess reflecting the times i rebooted after making changes. i tried to keep it short, but should i just post one whole "cycle" of messages?
any help appreciated, i am in over my head with this stuff!
-----------------------------
>edit: here's some top:
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
Add this to your /etc/modules.conf
Code:
alias sound-slot-1 off
alias sound-service-1-0 off
Although I don't think the problem you're having is due to the sound-slot issue, that should stop the related messages.
Your top output looks good. softirqd is 'S' -> sleeping. When you notice your CPU going through the roof, take a ps/top snapshot and your dmesg output and post it to the group.
18/19 is the priority/niceness of your softirqd. I have the same values for the said process. In linux, a process's 'niceness' is indicated by a value between -20 and +19, -20 being the 'rude' end ( only the superuser can set a negative nice value) and 19 the heights of niceness itself. The nicer the process is, the more it 'yeilds' to other process or it becomes less 'competitive' to grab CPU cycles. Read up on nice and renice on how you can use those commands to ru a program with a modified scheduling priority. Priority of a certain process, is a dynamic entity that the scheduler keeps changing indicative of the actual scheduling priority of the process with respect to the other jobs.
Originally posted by nxny In linux, a process's 'niceness' is indicated by a value between -20 and +19, -20 being the 'rude' end ( only the superuser can set a negative nice value) and 19 the heights of niceness itself.
<snip>
thanks a ton for that explanation! i have been meaning to find out what nice meant for a while now (seems there is always something else coming up to research ). now hopefully i can figure out how to disable that RAID probing and messages during boot up, and that damn mdrecoveryd (which i believe is somehow related to RAID?) and which is always at -19 and -20 niceness! (i'm kind of obsessive compulsive about achieving total "sleekness," ie., having only those processes, daemons, services etc, running and booting that are absolutely necessary lots to learn! ) i'll see what the changes to modules.conf do, also. appreciate.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
Total sleekness, I hear you.
Forgot about the RAID messages. The kernel will probe for raid devices at startup as part of hardware probe, but if you see stuff about personality, it is likely that one of your mounted volumes reside on a RAID partition. Can you post the relevant part from syslog?
Please post your
/etc/fstab
/proc/mounts
/etc/raidtab
/proc/devices
/proc/mdstat
That should tell us what's going on.
As you know, RAID is a set of disks made to look like a single large disk and/or provide redundancy by simple mirroring or storing parity information to protect against disk failures.
If the md devices (RAID or LVM) are not shutdown properly, the data on those disks will need to be rearranged so that it complies to the original set of rules it was designed for. If a discrepancy is found at bootup, the needful is done by the kernel process 'mdrecoveryd'. The superuser can control the RAID rebuild process. Anyway, you do shutdown your system properly don't you?
i am getting messages about personality (listed below). the strange thing is, i don't even have RAID on this mobo, an Epox 8RDA+. and afaik i've always shut down properly using shutdown -h now. usually i don't even shut down, actually, but just logout with the gnome logout manager, and then either "reboot," "shutdown -r now," log back in, etc.
here are the logs, thanks again for the help.
dmesg:
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 3162.000 MB/sec
32regs : 1818.000 MB/sec
pIII_sse : 6063.200 MB/sec
pII_mmx : 5163.200 MB/sec
p5_mmx : 6588.800 MB/sec
raid5: using function: pIII_sse (6063.200 MB/sec)
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
We're talking software RAID here ( the linux kernel controls your RAID volumes and can be administered via userspace applications such as the set of raidtools and mdadm ). For example, anyone with just 2 partitions can run a minimal RAID mirror for 'limited' protection (against bad sectors etc., but not a device failure). A RAID controller is not necessary for software RAID.
You are not using software RAID. The kernel's md driver ( if built in) will probe your disks to see if have any md drivers unless you compile your own kernel without the said drivers.
find /lib/modules/$(uname -r)/kernel/drivers/md/
If the command above comes back with results such as raid1.o, raid5.o etc, you have them built as modules.
In which case you should create another initrd and boot from it ( see man mkinitrd option --omit-raid-modules )
thanks. the find command didn't come back with any raid modules, but i'm going to try to compile a new kernel anyway. think i will go with 2.4.21. i've only been using linux for a few weeks so it seems a bit daunting, but i've been really curious about this whole "compile your kernel" thing, and i want to try to do it. hope i don't mess anything up!
Cudos to you. I think you are going about this the right way. The best way to learn linux is to just jump in and try everything you can.
Dont worry about messing things up, because you WILL mess things up. Its normal. Luckily everything can be fixed and it is difficult to permanently damage your hardware.
So have fun, mess things up and learn from your mistakes.
In my syslog, there are many lines about the sound module.
"...modprobe: Can't locate module sound-slot-0
...modprobe: modprobe: Can't locate module sound-service-0-3
"
So I added these 2 lines to /etc/module.conf.
alias sound-slot-0 off
alias sound-service-0-3 off
But I still have three questions:
1). What should I do after modifying module.conf? Is there any daemon I need to restart?
2). Is it possible to get rid of ksoftirqd and display CPU in its normal way?
3). What's ksoftirq good for? (Otherwise I really dislike it.) Is ksoftirq for the kernel-level threading?
4). In my case, why 4 CPU showed up while there are only 2 CPU? Is there a simple command to find out the number of CPUs physically there? /proc/cpuinfo is also wrong because I know there are only 2 CPU.
Any help is greatly appreciated. Thanks for your time and help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.