# gentoo is slow for me

## wasisme

running gentoo fine drivers etc are fine but it seems to kill my cpu doesnt really matter what i run. it almost takes all my cpu. i have athlon xp 1800 and i have dma on my hardrive which seemed to be the problem with most when i searched. my cpu should be able to run firefox without using 95% of my cpu. does anyone know the problem?

----------

## BitJam

How much memory do you have?

In a console or xterm window, run the "top" command and see what program(s) are using up the most CPU.

----------

## Parasietje

What is the system you have? Which application is using cpu, WHEN? If you do nothing, what is your cpu%? Have you tried less-bogged window managers like WindowMaker or Blackbox-clones (fluxbox)? Have you tried emerging mozilla-firefox again, or tried a different version?

etc. We need more info  :Smile: 

----------

## Mallow005

My firefox frequently takes up 99% of my cpu when I change tabs, load new pages, SCROLL, etc. I have a mobile Pentium 4 1.6ghz, 256megs of ram. This is a Dell Inspiron 8200.

Not doing anything, Firefox sits at around 12% of my cpu. I use fluxbox. I use minimal optimizations (march and O2), I have no swap usage and only half my ram is used. It's pretty horrible. Is there any other browser that is lightweight and standards compliant with tabs etc?

----------

## shockertwin

yeah well, runnign kde i constantly use over a gig of ram. i am almost always pushing into my swap space while using any sort of window system. I cant figure this out either.

That is a pretty small cpu though...same with the ram.

----------

## BitJam

 *shockertwin wrote:*   

> yeah well, runnign kde i constantly use over a gig of ram. i am almost always pushing into my swap space while using any sort of window system. I cant figure this out either.
> 
> 

 

I had a similar problem with KDE then I went to Konqueror Settings --> Performance and set "Minimize Memory Usage" to "Always".

On the other hand, Linux is designed to push a little into swap space.  If it is not doing this then something is wrong.  Linux will chew up ram with buffers and cache, this is a feature, not a bug.   But if swapping is significant and slowing you down then try changing the setting above.

----------

## Mallow005

 *shockertwin wrote:*   

> yeah well, runnign kde i constantly use over a gig of ram. i am almost always pushing into my swap space while using any sort of window system. I cant figure this out either.
> 
> That is a pretty small cpu though...same with the ram.

 

Were you referring to my 1.6Ghz P4 and 256 megs of ram? Excuse me, but when konsole and firefox are not loaded, my desktop takes up about 12 megs of ram and with everything, it never exceeds 130megs used, so ram is not the issue (no swap is used). A 1.6 P4 should be overkill for just running a browser. I only started having problems with 1.5, I've been using firefox since 0.8

----------

## BitJam

Hey Mallow005, I've got the same computer:  i8200, 1.6 GHz P4.  It came 256 meg ram but I boosted it to 640 meg, I've also put in an 7200 rpm, 80 gig hard drive which also speeded things up.

----------

## a5friemen

What kernel are you using?

I was having a problem with some of the 2.6.16 patched kernels.  I was using 95% cpu to write 1.3Mb to the disk.  I have no idea why.  The best I've found for disk transfer speed is 2.6.16-ck3.  I'm up to 13-14MB disk transfers only using 10-15% CPU.

Hope this helps.

----------

## Mallow005

I'm currently on 2.6.16-ck1, I shall try upgrading to ck3. How do you test disk-transfer speeds v cpu usage?

----------

## a5friemen

I have gkrellm2 on my desktop.  It shows both in graphical form.  you can also use:

```
 hdparm -Tt /dev/hd? 
```

 This won't give CPU usage at the same time, though.

----------

## wasisme

its not my hardware was the point i was trying to make ive got 512 memory and 512 swap it has nothing to do with firefox its just one example of a problem i have ive ran other distros and never had this problem its my first time using gentoo so i assumed that i messed up and hoped that someone else more experienced would have known my mistake

----------

## a5friemen

I never said it was your hardware.  I gave you a sugestion to try kernel changes and a couple of ways to check your hard drive transfer speeds and cpu usage which are two things that can make your computer seem "slow".  You then have numbers to look at while trying different kernel configs rather than a "feeling".  As I said in an earlier post, there are kernel changes made between releases.  Sometime they affect you hardware differently.  It may not be that your doing anything wrong.  There's no 

```
"Push button 'X' and that wil fix it"
```

 instruction I can give you.  Try upgrading your kernel, or changing the configuration, or using different patch sets...or not.  That's the great thing about Linux it's YOURS.

----------

## wasisme

well thanks a lot for the help i guess ill experiment with kernel patches and in time ill fix it

----------

## Mallow005

I *think* changing my kernel improved cpu usage during disk usage. But firefox is still pretty slow. It's slower than windows on both my desktop and my laptop (I dual boot both). I guess it's just plain slower on linux.

----------

## Ast0r

It should be noted that Firefox 1.5 isn't marked as stable in portage yet. Have you tried downgrading to 1.0.x?

----------

## smithjd15

Also worth noting the Firefox 1.5 is designed to use more memory than <1.5 versions with its new page-caching 'feature'.

----------

## DeepBass909

One thing that comes to my mind is, you're using a mobile processor. Have you set up any frequentie scaling functions?

I use a AMD AthlonXP 2500+ Mobile (should preform about the same as a P4 1.6GHz), and I notice a big difference between performance using different frequentie scaling settings. When I use the 'ondemand' governor my system is fast en reactive (and the cpu speed hits maximum as soon as cpu usage hits 100%), but when I use the 'conservative' governor it takes some time to hit the max. speed. And I can really notice it when starting up Firefox.

An other thing, 256MB of RAM is indeed a bit on the low side. I have 512Mb and am still thinking about upgrading it... FireFox uses a lot of memory, so a lack of memory could (in theory) cause your problems.

Also, my laptop idles at 20% cpu usage, but at only 864MHz, instead of 1.8GHz it's capable of...

----------

## Mallow005

All your points might explain the slowness on other computers/situations, but not mine.

I said firefox 1.5 was slower on both of my computers in linux than on both of my computers in windows. Is Firefox 1.5 more stable/faster in windows? If so, that proves my point.

Memory is not an issue, I hardly ever reach 3/4 usage of my ram (I run a very minimalist desktop with flux).

Funny you mention cpufreq changers. With "performance", firefox is actually tolerable on my laptop. With "ondemand", it becomes slow as molasses. I can't even think of using "conservative". I do plan on upgrading my laptop to a MBP or some other laptop (suggestions?) as soon as I have the money.

----------

## DeepBass909

 *Mallow005 wrote:*   

> All your points might explain the slowness on other computers/situations, but not mine.
> 
> I said firefox 1.5 was slower on both of my computers in linux than on both of my computers in windows. Is Firefox 1.5 more stable/faster in windows? If so, that proves my point.
> 
> Memory is not an issue, I hardly ever reach 3/4 usage of my ram (I run a very minimalist desktop with flux).
> ...

 

I know there's a way of influencing how fast the governers respond. Ondemand should react instantly, but ACPI setting may state that your cpu has to be on 100% for some time before it changes. Performance only means that any cpu-scaling is switched off. I wouldn't recommend it on a laptop, because your cooling might not be up to the job (as is with my laptop).

I have to admit that FireFox 1.5 is a bit disapointing, I'm having troubles with embedded media and I can't find any way to influence it...

----------

## Mallow005

Should I not use ACPI on my laptop? I never figured out if I should use ACPI or APM..

----------

## Ion Silverbolt

ACPI is the better option.

Oddly, I have a P3 1Ghz laptop and it doesn't slow down in Firefox 1.5 at all and I run in coservative mode almost all the time. The main difference I notice is it just takes longer for it to load, but runs fine once loaded. 

Out of curiousity, what does your make.conf look like?

----------

## Mallow005

```
USE="-motif mouse dri dlloader glibc-omitfp xine ofx hbci bash-completion bzip2 -arts -cjk -ipv6 exif mozsvg acpi    nsplugin mplayer subtitles kdexdeltas kdeenablefinal rtc -eds -esd sdk usb joystick aac win32codecs ruby fastcgi     nptl nptlonly -font-server session xvid mysql postgres php vidix pic nvidia opengl divx4linux xv dvdread samba avi   mpeg mmx mmxext sse sse2 qt gtk gtk2 live X -gnome -nautilus tiff dvd alsa gif jpeg png xft"

CHOST="i686-pc-linux-gnu"

CFLAGS="-march=pentium4 -mtune=pentium4 -msse -msse2 -O2 -pipe -fweb -fomit-frame-pointer"

ACCEPT_KEYWORDS="~x86"

MAKEOPTS="-j2"

```

What kind of cpu scaling program do you use and what's your config? I use laptop-mode

----------

## DeepBass909

 *Mallow005 wrote:*   

> 
> 
> ```
> USE="-motif mouse dri dlloader glibc-omitfp xine ofx hbci bash-completion bzip2 -arts -cjk -ipv6 exif mozsvg acpi    nsplugin mplayer subtitles kdexdeltas kdeenablefinal rtc -eds -esd sdk usb joystick aac win32codecs ruby fastcgi     nptl nptlonly -font-server session xvid mysql postgres php vidix pic nvidia opengl divx4linux xv dvdread samba avi   mpeg mmx mmxext sse sse2 qt gtk gtk2 live X -gnome -nautilus tiff dvd alsa gif jpeg png xft"
> 
> ...

 

I use the klaptop daemon from KDE and cpufreqd.

I notice you use -fweb CFLAG, any special reson for that, because I can't find it in the GCC manual?

Most of the time a simpel CFLAGS-line will do just fine, making your system maybe a bit slower but more stable, with might improve on the speed again.

It's also useless to include both -march and -mtune

form the GCC manual:

 *Quote:*   

> -march=cpu-type
> 
>     Generate instructions for the machine type cpu-type. The choices for cpu-type are the same as for -mtune. Moreover, specifying -march=cpu-type implies -mtune=cpu-type. 

 

And an other thing, which Firefox version do you install? The binairy or source-code version? The source-code version takes a lot of time to compile, but in the end runs much smoother than the binairy-version.

----------

