LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-14-2003, 12:27 PM   #1
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
100% CPU usage-Slackware 9?


Alright. Slack 9 (installed fresh again 20 mins ago) will just intermittantly soak up all my Athlon 2500+. After install, I installed the nForce2 drivers, modprobe nvnet (for my eth0), and did adsl-setup ; adsl-start.

Thats the extent of the work since the newest install. It's done this on every install though. I have only been using it like 3 days, but after using Mandrake for a year, I've messed up and had to reinstall Slack several times since I got it

Any suggestions? Hardware list in sig:
 
Old 09-14-2003, 12:37 PM   #2
arakno
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 10

Rep: Reputation: 0
If you happen to be using Swaret, it may be the problem, I had this 100% CPU problem while using it, but solved changing it's config file (swaret.conf) and changing DINTERFACE=0 to 1.
 
Old 09-14-2003, 01:02 PM   #3
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
Ok. What is swaret, and where is the .conf? I tried whereis, and get nothing, and get: warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
when trying the 'locate' command.
 
Old 09-14-2003, 01:27 PM   #4
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
You will not have swaret unless you installed it yourself, so its not that.
For slocate first time you will need to build the database, updatedb or slocate -u. (its in the man pages)
You might try the top command to see what is hogging your cpu.

good luck
tobyl
 
Old 09-14-2003, 01:27 PM   #5
mrpdaemon
Member
 
Registered: Jun 2003
Distribution: Slackware 9.1
Posts: 41

Rep: Reputation: 15
run the command "top" and see what is hogging the CPU. If it is a user process that you see over there, you can stop it with "killall -9 processname" or "kill processID"

If you don't see anything in "top" using CPU, yet your cpu is at 100% (used by system processes and such) it would be some kernel code that is causing it, and you'd be lucky if it is a module (if so, "rmmod modulename" , and comment the module name in /etc/rc.d/rc.modules so it wont load in next boot) - try to rmmod all modules and see if the CPU cools down

If you have no modules, and no process in "top" that is using the CPU, yet you are still at 100% , then that would be weird.

Good luck.

Last edited by mrpdaemon; 09-14-2003 at 01:29 PM.
 
Old 09-14-2003, 01:52 PM   #6
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
I had tried updatedb and got this:
warning: updatedb: could not open database: /var/lib/slocate/slocate.db: No such file or directory

I will try the top command and see if I can catch what is causing it. It only happens a few times per 30 mins for around 1 min at a time. I am working (once again) at compiling a new kernel (2.4.22) from the above guide in hopes that a custom kernel will help. I know it will solve some of the other issues anyway.

Thanks
 
Old 09-14-2003, 03:35 PM   #7
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
Using top for awhile, I noticed that kupdated frequently hogs the cpu. It is actually competing with CC1 (which i assume is the compiler) while I recompile my kernel.

Anyone know what kupdated is all about?
 
Old 09-14-2003, 03:55 PM   #8
zsejk
Member
 
Registered: Apr 2003
Distribution: Slackware
Posts: 345
Blog Entries: 5

Rep: Reputation: 30
Guessing here, but prolly the update daemon for something or other. Are you connected to the internet while this CPU hogging is occuring? If so, perhaps some update program or other is downloading/installing stuff automatically (and most likely in a faulty manner), and thereby is taking up all your CPU (much like Windows Update trying to download stuff over a dial-up connection... *shivers*).



-zsejk

edit: did I mention yet that I was guessing?

Last edited by zsejk; 09-14-2003 at 04:11 PM.
 
Old 09-14-2003, 04:32 PM   #9
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
Yes, always-on DSL. I saw another process: "ksoftirqd" the last time. Each of these 2 was using around 50% of my cpu. I plan to search around on these, but it will have to wait till I get this kernel compile done successfully
 
Old 09-14-2003, 04:39 PM   #10
zsejk
Member
 
Registered: Apr 2003
Distribution: Slackware
Posts: 345
Blog Entries: 5

Rep: Reputation: 30
Yeah, my "top" shows those processes too, but mine aren't using *any* CPU. So definitely do a search on what possible things could be causing them to hog the CPU.

-zsejk
 
Old 09-14-2003, 07:23 PM   #11
mrpdaemon
Member
 
Registered: Jun 2003
Distribution: Slackware 9.1
Posts: 41

Rep: Reputation: 15
bad news then, they are both kernel daemons.

Get latest kernel and recompile. Be sure to set the processor type correct. The problem is probably due to some buggy driver, of things like motherboard or hard drives. What is your HD? Is it a very slow one? Are you doing many reads/writes? Some googling tells me that kupdated will use lots of CPU when doing disk accesses a lot.

Be sure to enable DMA for your disks, as it is not default in slackware installs. You can do it with "hdparm -c1 -d1 /dev/hda" , replace hda with your drive. this enables 32-bit IO and DMA on this particular hard drive. You might want to add this to some boot script so that you have DMA on every time you reboot. (rc.local is fine, I think mine are in rc.S somewhere early on)


Be sure that your drives are using DMA, and then see if this kupdated problem persists. The irq stuff could be related to not using DMA as well.
 
Old 09-14-2003, 08:44 PM   #12
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
I enabled DMA like first thing on the first few installs w/ hdparm, then on the next installs I compiled it in the kernel. My drives are pretty quick 7200rpm Maxtors. Only a 2mb cache, but that still nowhere near slow.

I am going to try 2.4.22 since it prob better supports my hardware and we'll see what happens. Pretty aggravating though, cause I really haven't had much time to 'play' with Slack since I been messing with this issue since install. This box is super fast in windows xp and mandrake 9.1 but it acts like an old celeron with Slack. I'm sure after I get the configuration right it will be smokin' with Slack.

This is just pure learning anyway. I already pre-ordered 9.1 so in a few weeks I'll be reinstalling anyway
 
Old 09-14-2003, 10:47 PM   #13
g00$e
Member
 
Registered: Sep 2003
Location: Norfolk, VA
Distribution: Slackware
Posts: 119

Rep: Reputation: 15
Quote:
Originally posted by Scruff
I had tried updatedb and got this:
warning: updatedb: could not open database: /var/lib/slocate/slocate.db: No such file or directory
Thanks
I believe 'updatedb' needs to be run as root by default if you have not already tried this.
 
Old 09-14-2003, 10:54 PM   #14
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
I ran it as root. I don't understand what could be causing that.
 
Old 09-15-2003, 12:14 AM   #15
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
mrpdaemon you were right. I didn't realize that the settings would default every time I rebooted. Which /etc/rc.d/ scripts do I need to add this line so I get these settings at boot?

After doing some googling, it seems like a lot of people are having this trouble with the nForce2 chipset, and in most cases it's due to incorrect IDE settings. I have gotten a significant performance increase from playing with these settings a bit.

Before# hdparm /dev/hda = 180mb/s cache, and 2.6mb/s read.
Pretty piss poor...

Then
# hdparm -x66 -d1 -u1 -m16 -c2 /dev/hda
426mb/s cache
23.5mb/s read
A nice improvement. Slack is now totally responsive as it should be. Still need to get the #'s up a bit, but not bad.

I don't remember the default settings, but they were pretty much all 0 or disabled including Ultra DMA and 32 bit transfer.
Here's the current settings provided by the above command:

/dev/hda:
setting 32-bit IO_support flag to 2
setting multcount to 16
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
multcount = 16 (on)
IO_support = 2 (16-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)

Hope this helps fellow nForce2 owners
I am going to tweak some more...

Which /etc/rc.d/ scripts do I need to add this line so I get these settings at boot?

Last edited by Scruff; 09-15-2003 at 01:09 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Usage goes to 100% when pthread_cond_wait is being used zen_buddha Linux - Software 4 10-19-2005 04:28 PM
BZFlag 100% CPU Usage pjpeter Linux - Games 5 10-10-2004 08:48 PM
CPU on 100% usage after sleep... Jestrik Linux - General 8 12-22-2003 09:18 AM
CPU usage 100% ecsfan Red Hat 17 11-19-2003 03:06 PM
100 % CPU usage ???? rolandi Linux - Newbie 1 10-07-2003 11:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration