PDA

View Full Version : Unbelievably high utilization with Fedora 9



tiger762
27th July 2008, 09:30 PM
Holy cow, where do I begin.

Firefox 3 is a CPU hog. The bloody XTerm is a CPU hog. No kidding. I slide the window back to get a previously run command, and the CPU fan spools up. Even editing a program in VI, and holding down the cursor key (so that the text rolls off the top or bottom of the screen) makes the CPU fan spool up.

No, it's not for lack of CPU power (Pentium 945 Dual-core 3.4GHz):

[root@electron 80c552]# more /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) D CPU 3.40GHz
stepping : 2
cpu MHz : 3400.631
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pebs bts pni m
onitor ds_cpl vmx cid cx16 xtpr lahf_lm
bogomips : 6805.04
clflush size : 64

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) D CPU 3.40GHz
stepping : 2
cpu MHz : 3400.631
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc pebs bts pni m
onitor ds_cpl vmx cid cx16 xtpr lahf_lm
bogomips : 6799.95
clflush size : 64

Neother is it for lack of memory (1GB Corsair):

[root@electron 80c552]# more /proc/meminfo
MemTotal: 1026344 kB
MemFree: 185760 kB
Buffers: 29272 kB
Cached: 319052 kB
SwapCached: 12300 kB
Active: 535340 kB
Inactive: 137360 kB
HighTotal: 122496 kB
HighFree: 592 kB
LowTotal: 903848 kB
LowFree: 185168 kB
SwapTotal: 1015800 kB
SwapFree: 956400 kB
Dirty: 56 kB
Writeback: 0 kB
AnonPages: 319944 kB
Mapped: 59572 kB
Slab: 32396 kB
SReclaimable: 13804 kB
SUnreclaim: 18592 kB
PageTables: 5568 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 1528972 kB
Committed_AS: 894284 kB
VmallocTotal: 110584 kB
VmallocUsed: 5196 kB
VmallocChunk: 105076 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB

Neither for lack of HDD space (400GB Maxtor):

[root@electron 80c552]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
377347196 17284424 340585476 5% /
/dev/sdb1 101086 30139 65728 32% /boot
tmpfs 513172 96 513076 1% /dev/shm
/dev/sda1 8080084 7132128 537500 93% /media/_
/dev/sdd1 3988348 48 3988300 1% /media/disk
/dev/sdc1 1006304 613952 392352 62% /media/STORE'N'GO

Basically, I upgraded from Fedora 6 to 9, by doing a hard drive installation. (Downloaded the DVD image onto my thumb drive, copied over vmlinuz and initrd to /boot, etc). That all went fine, if not a little slow (coming from a USB drive, which is to be expected), and everything seemed like it installed fine.

Then the CPU fan spins and spins and spins and spins and spins and spins. This is driving me insane. Something has been broken. I NEVER saw this kind of CPU usage with Fedoras 2,3,4,5,6. For the love of God, can anyone help? Thanks in advance and let me know if more info is needed.

p.s. I did search all posts and nothing jumped out for Fedora 9 in general. While it was with Firefox 3.0 that I first saw this problem (and indeed, is the worst CPU hog), like I was saying, even VI is dog slow, and drives the CPU usage up.

SlowJet
27th July 2008, 10:43 PM
in a root terminal
setenforce 0
yum clean all --enablerepo=updates-testing
yum check-update --enablerepo=updates-testing
# do last 2 yum's until until good list from mirrors
# good list? Yes? continue
telinit 3
#drops into command mode
# press enter until logon prompt
# logon as root
# continue

yum update yum --enablerepo=updates-testing
yum update --enablerepo=updates-testing
touch /.autorelabel
reboot

SJ

tiger762
28th July 2008, 01:26 AM
Well, I ran through all that and rebooted. VI is a little more responsive. Firefox is still hideous. I turned off the "warn me..." options. I went into about:config and turned off(false) the browser.cache.enable option. I'm at my wit's end with firefox. Going back to firefox 2 didn't help. It's as if anything to do with the redrawing of the screen makes the CPU groan. Thanks for the setenforce 0 command. I have absolutely zero use for SELinux anyway, so whatever help turning that off provides, is appreciated.

marko
28th July 2008, 01:48 AM
What is the video card?
Did you install the closed driver or a generic open driver?
Maybe you're running the vesa driver, that would be super slow...



Thanks for the setenforce 0 command. I have absolutely zero use for SELinux anyway, so whatever help turning that off provides, is appreciated.

BTW, the "setenforce 0" only turns off selinux in a 'one-shot' manner, at
the next bootup selinux will be running in whatever mode you have setup.

You can set it permissive so it sticks, which will allow you to see events
but it won't actually stop anything from happening.

su -
system-config-selinux

pick "Status" and set the modes to "Permissive" for System default and Current

or if you like changing the config file, edit the /etc/selinux/config and
make this line look like this:

SELINUX=permissive

and it will take effect next boot

tiger762
28th July 2008, 02:45 AM
That's funny you mention that. After I went through the HDD installation, it never configured X. I fiddled with an xf86config file until I could get X to start. I bet it isn't setup optimally for the video card, which is built into the motherboard (ASUS P5LD2-VM). What is the command to run the X configuration? Thanks!


What is the video card?

Nokia
28th July 2008, 03:06 AM
su
echo "if
you tell me your video card type and manufacturer
then
I might be able to help
else
/sbin/init 6
"

That should be all. :cool:

tiger762
28th July 2008, 03:58 AM
Monitor is a Samsung 204B and video "card" is an Intel 82945G/GZ. system-config-display calls the monitor a "SyncMaster" and it is where I got the video card information. Thanks



su
echo "if
you tell me your video card type and manufacturer
then
I might be able to help
else
/sbin/init 6
"

That should be all. :cool:

Hlingler
28th July 2008, 06:01 AM
Well, that's a little more info. Please post:
> attach a copy of file: /etc/X11/xorg.conf and whatever file you edited: "I fiddled with an xf86config file until I could get X to start."
> attach copy of file: /var/log/Xorg.0.log
> Output of command (run as root user): lspci -vv (actually only need section on VGA)
> output of command: top (as any user) - 'top' is an interactive utility, so try to identify the processes using the highest amount of CPU%, maybe there's a runaway app chewing up CPU power.

V

P.S. I've used the gkrellm system monitor suite almost since the day I first installed Fedora, but I just last week discovered the gkrellm-top package, which displays (up to) the three "top" CPU-sucking processes (and per-centage sucked by each) right below the process monitor. Very nice, very handy. Let's one see at a glance the "top" offenders. FireFox is usually at the "top" of the stack when running....

marko
28th July 2008, 06:19 AM
You can force a rebuild of a new xorg.conf file at anytime by running this as
root (probably a good idea to run this only when the desktop is down):

X -configure

the new file is dumped in /root/xorg.conf
only copy it to the /etc/X11 directory to replace the existing one
after you think it's ok. The xf86config file hasn't existed in Fedora for
ages, I guess that came with the F6 you updated from.

tiger762
28th July 2008, 01:34 PM
lcpci -vv (showing only VGA section):

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Unknown device 817a
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at cfd00000 (32-bit, non-prefetchable) [size=512K]
Region 1: I/O ports at 7800 [size=8]
Region 2: Memory at d0000000 (32-bit, prefetchable) [size=256M]
Region 3: Memory at cfd80000 (32-bit, non-prefetchable) [size=256K]
Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
Address: 00000000 Data: 0000
Capabilities: [d0] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Kernel modules: intelfb, i915

Abbreviated output of top:

top - 08:32:39 up 11:40, 2 users, load average: 0.06, 0.12, 0.11
Tasks: 139 total, 2 running, 137 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.3%us, 0.7%sy, 0.0%ni, 95.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1026348k total, 954472k used, 71876k free, 164376k buffers
Swap: 1015800k total, 8k used, 1015792k free, 323532k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8942 root 19 -1 453m 92m 7800 S 7.3 9.3 22:38.14 X
9361 root 20 0 296m 97m 25m R 1.7 9.7 11:48.49 firefox
9329 root 20 0 27052 8692 7420 S 0.7 0.8 0:35.11 fish-applet-2
835 root 20 0 2364 1052 800 R 0.3 0.1 0:00.01 top
9471 root 20 0 102m 27m 14m S 0.3 2.8 1:02.58 gnome-terminal
1 root 20 0 1948 744 536 S 0.0 0.1 0:01.35 init
2 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT -5 0 0 0 S 0.0 0.0 0:00.03 migration/0
4 root 15 -5 0 0 0 S 0.0 0.0 0:00.36 ksoftirqd/0

Let me know if there's more I need to provide. Basically, sliding any window (gnome-terminal or firefox) up and down drives the cpu load waaaaay high. Something to do with redrawing the screen. Thanks for your help!



Well, that's a little more info. Please post:
> attach a copy of file: /etc/X11/xorg.conf and whatever file you edited: "I fiddled with an xf86config file until I could get X to start."
> attach copy of file: /var/log/Xorg.0.log
> Output of command (run as root user): lspci -vv (actually only need section on VGA)
> output of command: top (as any user) - 'top' is an interactive utility, so try to identify the processes using the highest amount of CPU%, maybe there's a runaway app chewing up CPU power.

V

P.S. I've used the gkrellm system monitor suite almost since the day I first installed Fedora, but I just last week discovered the gkrellm-top package, which displays (up to) the three "top" CPU-sucking processes (and per-centage sucked by each) right below the process monitor. Very nice, very handy. Let's one see at a glance the "top" offenders. FireFox is usually at the "top" of the stack when running....

rasjani
28th July 2008, 01:58 PM
if its firefox that leeches all your cpu then the culprint is definetly in flash. Its just a feeling but flash pages in firefox3 (and new flash obviously) seem to be generating even more cpu drainage then with older versions and firefox..

Hlingler
28th July 2008, 02:27 PM
This can be fixed fairly easily to eliminate one potential cause of problems:
(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
(II) No APM support in BIOS or kernelInstall packages (if not already installed):
acpi
acpid
acpitool

Then, start the acpid service daemon, and also set it to start on boot. If that doesn't work, you may need to add boot option(s) acpi=force and/or lapic to get it to fly. Turn off the apm service daemon and set it not to start on boot. Re-start X-server (or reboot PC) after making such changes.

This is new to me, and a little alarming:
(WW) intel(0): ESR is 0x00000001, instruction error
(WW) intel(0): Existing errors found in hardware state.
(II) intel(0): Output configuration:
(II) intel(0): Pipe A is on
(II) intel(0): Display plane A is now enabled and connected to pipe A.
(II) intel(0): Pipe B is off
(II) intel(0): Display plane B is now disabled and connected to pipe B.
(II) intel(0): Output VGA is connected to pipe A
(II) intel(0): [drm] dma control initialized, using IRQ 16
(II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(II) intel(0): DPMS enabled
(II) intel(0): Set up textured video
(II) intel(0): Set up overlay video
(II) intel(0): direct rendering: EnabledNot sure what that means, or if the subsequent lines indicate the software compensating/fixing the problem. However, DRI is ultimately enabled. Verify with:
glxinfo|grep render

Should return: "Direct Rendering: Yes"

There are a number of X11/Xorg options set by default for this driver/chipset combo. Recommend that you install package 'driconf' and play with them. Start driconf the first time as root user to generate default /etc/drirc file, then any user can use driconf to adjust personal settings, even per-app. Read: man intel and man xorg.conf, and play with settings, these especially look good:
> Option "PageFlip" "boolean" - default=off, try "on"; use with next:
> Option "TripleBuffer" "boolean" - default=off, try "on"
> Option "AccelMethod" "string" - default=EXA, try "XAA"
> Option "BackingStore" "boolean" - default=off, try "on"
> any other(s) that look promising.

Apply changes one at a time and re-start X-server, log back in and assess impact.

Looks like VRAM is shared memory with system RAM?
(II) intel(0): Kernel reported 238848 total, 1 used
(II) intel(0): I830CheckAvailableMemory: 955388 kB availableThe lower the resolution, the better the performance. Looks like you set default to 1280x1024, that's OK but don't push it any higher. Reduce it if you can tolerate a lower screen resolution ("1280x960" "1152x864" available).

Check interrupts:
cat /proc/interrupts

See if there's other stuff on the same IRQ with the VGA, if possible adjust BIOS settings to move the other stuff to different IRQs. Use care with these settings.

That should be enough to keep you busy for a while.... :D

V

tiger762
15th August 2008, 11:10 AM
I want to smash the computer with a sledgehammer. The droning on and on and on and on of the damned CPU fan. It's X and firefox that is doing it. I was using Fedora 6 and never had this amount of problem. Now, I can't so much as scroll an xterm window up and window without the CPU getting really !@#$%^&* hot.

For the love of God, does anyone else have any ideas? I can not believe my situation is unique, nor that it is tolerated.

Thanks

xawen
15th August 2008, 12:48 PM
I want to smash the computer with a sledgehammer. The droning on and on and on and on of the damned CPU fan. It's X and firefox that is doing it. I was using Fedora 6 and never had this amount of problem. Now, I can't so much as scroll an xterm window up and window without the CPU getting really !@#$%^&* hot.

For the love of God, does anyone else have any ideas? I can not believe my situation is unique, nor that it is tolerated.

Thanks

Unfortunately, I don't have any suggestions, but I can tell you it's not just you. I have two separate systems with the same exact problem. The hardware on them couldn't be more different...a laptop with an Intel CPU and ATI GPU and a desktop with an AMD CPU and NVIDIA GPU.

Xorg is ALWAYS at the very top of my...er...top results and runs at 30-50% CPU even for the simplest of tasks (moving a window, scrolling...even typing).

I have tried everything I can think of or find on the forums, other forums, google... I'm game to test just about anything, but I'm out of ideas myself. My last ditch effort may be to downgrade Xorg to the F8 version, but I really don't want to deal with the updates pain that'll cause.

forkbomb
15th August 2008, 03:29 PM
Unfortunately, I don't have any suggestions, but I can tell you it's not just you. I have two separate systems with the same exact problem. The hardware on them couldn't be more different...a laptop with an Intel CPU and ATI GPU and a desktop with an AMD CPU and NVIDIA GPU.

Xorg is ALWAYS at the very top of my...er...top results and runs at 30-50% CPU even for the simplest of tasks (moving a window, scrolling...even typing).

I have tried everything I can think of or find on the forums, other forums, google... I'm game to test just about anything, but I'm out of ideas myself. My last ditch effort may be to downgrade Xorg to the F8 version, but I really don't want to deal with the updates pain that'll cause.
Just 1.5 cents worth of a hunch... I'd imagine the culprit here is probably the beta Xorg in F9.

xawen
17th August 2008, 06:30 PM
Just 1.5 cents worth of a hunch... I'd imagine the culprit here is probably the beta Xorg in F9.

That's probably a safe guess. The part I think is strange is that no one else I've talked to seems to be having this problem. I'm having this issue on two separate systems, so it must be something I've done. Problem with that is all of my third party updates have been done through Livna and the Compiz repo from Leigh123's howto.

If it's an actual problem with the new Xorg, I guess I can revert. But since I seem to be one of the very few having an issue, I'd love to figure out how to pinpoint the problem.

marcrblevins
18th August 2008, 04:27 AM
How about this one. Don't mouse over your any of your buttons on the taskbar. Mine always shoot 99%. I leave my mouse pointer on web browser or anywhere on the desktop, goes back down to 6% or less. You can mouse over your Fedora start button, just don't mouse over the rest of the taskbar.

marko
18th August 2008, 04:53 AM
How about this one. Don't mouse over your any of your buttons on the taskbar. Mine always shoot 99%. I leave my mouse pointer on web browser or anywhere on the desktop, goes back down to 6% or less. You can mouse over your Fedora start button, just don't mouse over the rest of the taskbar.

If you update to KDE4.1, that problem goes away

xawen
18th August 2008, 05:23 AM
I can replicate my problem in KDE (any version) or Gnome. Just dragging a window is all it takes to put the processor up to 20-30%.

marcrblevins
18th August 2008, 05:35 AM
marko,
Talking about getting it from "fedora-updates-testing.repo"?
I prefer to wait it out when they move it over to Fedora Updates. I'm not in a hurry. Thanks for sharing.

Was just wondering since its the OP's fresh installation and left his mouse pointer over it and rants about it when thinkigin it was Firefox, etc. Tried to be helpful. Just can't figure how Firefox would peg the CPU, I don't get that on my PC. I'm using Fedora 9 x86.

Mariano Suárez-
18th August 2008, 05:44 AM
Dragging a window of course needs to use your cpu. There is no magin involved: simply computation. 20-30% of utilization is absolutely negligible for such a task.

tiger762
18th August 2008, 01:33 PM
Scrolling windows is sluggish, whether in a console or Firefox, but Flash seems to be absolutely the worst at CPU consumption. What the !@#$#$%%^%? This is a dual 3.4GHz Pentium D. Give me a break. There is something in a tight loop, consuming every bit of CPU power available.

xawen
18th August 2008, 03:01 PM
Dragging a window of course needs to use your cpu. There is no magin involved: simply computation. 20-30% of utilization is absolutely negligible for such a task.

It'd be unreasonable not to expect to see some CPU utilization from the Xorg process when moving a window, scrolling or typing. 20-30% (aggregate total) of a dual core processor simply to move a 600x600px window on a 1280x1024px screen is well past what should be needed. This same setup with that same activity used around 3-5% with Fedora 7. That number makes sense.

Also, note that this is a VERY mild example. If I try to use something CPU intensive (Flash video or scrolling Firefox) my systems often slow to a crawl and the Xorg process goes nuts until I can manage to close the program.

As tiger762 pointed out, something is running out of control...I just have no idea how to figure out what it is.

DavidMcCann
24th August 2008, 11:37 PM
I found Firefox hogging the CPU (just on some sites, but to the extent of becoming usable) and cured it with the recipe from here:
http://isaytech.blogspot.com/2008/06/how-to-optimize-firefox-3.html

marko
25th August 2008, 12:33 AM
I found Firefox hogging the CPU (just on some sites, but to the extent of becoming usable) and cured it with the recipe from here:
http://isaytech.blogspot.com/2008/0...-firefox-3.html

Cranking up max connections and turning on pipelining will have just the opposite result, firefox will be processing more connections and thus using more cpu. It will feel faster because it will complete a given page faster. Before doing this people should look this over:

http://egonitron.com/2007/05/25/the-truth-about-the-firefox-pipelining-trick/

Firefox ignores network.http.pipelining.maxrequests values above 8 anyway, so if you set it high like 32, it's just going to limit that to 8

Turning off ipv6 will have zero effect on the cpu usage, it only reduces the lag between when you request a page and when it starts downloading. So ipv6 disable improves the responsiveness but does nothing about reducing how much cpu it uses.

xawen
26th August 2008, 04:58 PM
In my case, it's not the firefox process that's causing the problem. It's the xorg process. Using firefox with flash just seems to be one of the things that really sets it off.