Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo/Linux is just slow and unresponsive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Tue Oct 30, 2007 11:57 pm    Post subject: Gentoo/Linux is just slow and unresponsive Reply with quote

I'm not saying my system is coming to a halt, but let me give you a run down of my system specs before I begin.

2.2 GHz Core 2 Duo
2GB ram.
160GB 5400rpm SATA HD (This is a notebook)
Nvidia 8600M GT

Now, I should really have NO problems with speed with this setup, but I still am. It's just ridiculous. DMA is enabled by default with SATA, so that can't be the issue. I'm pretty sure I've got the correct option enabled for my SATA chipset.

I want to give a few examples of how it is slow. Right now, I am typing this post, but I have a couple of other tabs open in firefox. If I click on another one there is about a 2-3 second delay before the page completely changes. I have no other applications running besides firefox. Why in the hell is there this delay? Furthermore, if I go to ESPN.com and move my mouse across the menu area the drop down boxes don't appear until one second after my mouse has passed over the menu.

Also, Compiz fusion wobbly windows are not smooth at all and neither is page scrolling in firefox. It's just very annoying. All of this becomes worse if I try to emerge anything. I dual boot Windows Vista and Vista FLYS with this setup. Why doesn't Linux?


kyle@genkyle ~ $ emerge --info
Portage 2.1.3.16 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.23-gentoo i686)
=================================================================
System uname: 2.6.23-gentoo i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
Timestamp of tree: Tue, 30 Oct 2007 19:00:09 +0000
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python: 2.4.3-r4, 2.5.1-r3
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.23
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo"
LANG="C"
LINGUAS="en_US en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/xeffects"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 avahi berkdb bitmap-fonts cairo cdr cli cracklib crypt cups daap dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv ieee1394 ipod ipv6 ipw3945 isdnlog jpeg kerberos ldap lirc mad midi mikmod mmx mp3 mpeg mudflap musicbrainz mysql ncurses nfs nls nptl nptlonly nvidia ogg opengl openmp oss pam pcre pdf perl png pppd python qt3support quicktime readline reflection samba sdl session spell spl sse ssl svg tagwriting tcpd tiff truetype truetype-fonts type1 type1-fonts unicode v4l vim-syntax vorbis win32codecs x86 xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

kyle@genkyle ~ $ glxinfo | grep -i direct
direct rendering: Yes

kyle@genkyle ~ $ glxinfo | grep -i opengl
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 8600M GT/PCI/SSE2
OpenGL version string: 2.1.1 NVIDIA 100.14.19
OpenGL extensions:

genkyle kyle # hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 6666 MB in 1.99 seconds = 3341.73 MB/sec
Timing buffered disk reads: 138 MB in 3.03 seconds = 45.49 MB/sec
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Oct 31, 2007 12:36 am    Post subject: Re: Gentoo/Linux is just slow and unresponsive Reply with quote

SithMaddox wrote:
This is a notebook

So type its model into Google, sprinkle in the magic word "Linux", and see what other people say about it. Might need a BIOS update, who knows.


Last edited by PaulBredbury on Wed Oct 31, 2007 12:37 am; edited 1 time in total
Back to top
View user's profile Send private message
zach9824
n00b
n00b


Joined: 12 Apr 2004
Posts: 37

PostPosted: Wed Oct 31, 2007 12:36 am    Post subject: Reply with quote

It can be any number of things. Some ideas:

Have a look at
Code:
cat /proc/interrupts

Based on that output you may want to
Code:
emerge irqbalance && rc-update add irqbalance default

Don't forget to disable the "in-kernel" irq balancing under processor type & features.

Also can you post the kernel config? Settings for:
IO Schedulers & Processor type and features

Lastly it appears that you haven't made use of the optimized CFLAGS setting for your processor, for example you may try:

Code:
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"


I am sure that isn't your problem, however you most probably would see an increase in system response with that setting. Ofcourse changing that value now would require emerge -e system && emerge -e world, which may take some time.
Back to top
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 778
Location: Brooklyn, New York

PostPosted: Wed Oct 31, 2007 7:08 am    Post subject: Reply with quote

for a laptop system you should really be using -Os and prelinking. Also set your CPU scheduler to deadline. just a few suggestions.
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Wed Oct 31, 2007 1:30 pm    Post subject: Reply with quote

likewhoa wrote:
for a laptop system you should really be using -Os and prelinking. Also set your CPU scheduler to deadline. just a few suggestions.

Prelinking for sure - for a Core 2 I think -Os is leaning a little too far towards trading away performance, though, considering its huge cache. Also, I'm interested in why you'd recommend deadline over, for example, CFQ.

SithMaddox, are things any different if you use a non-compositing window manager instead? such as metacity or kwin instead of compiz?
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Wed Oct 31, 2007 5:53 pm    Post subject: Reply with quote

zach9824 wrote:
It can be any number of things. Some ideas:

Have a look at
Code:
cat /proc/interrupts

Based on that output you may want to
Code:
emerge irqbalance && rc-update add irqbalance default

Don't forget to disable the "in-kernel" irq balancing under processor type & features.

Also can you post the kernel config? Settings for:
IO Schedulers & Processor type and features

Lastly it appears that you haven't made use of the optimized CFLAGS setting for your processor, for example you may try:

Code:
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"


I am sure that isn't your problem, however you most probably would see an increase in system response with that setting. Ofcourse changing that value now would require emerge -e system && emerge -e world, which may take some time.

What is the advantage of irq balance package vs the in-kernel irq balancing?

And yes, cflags make such a minimal impact on performance and I have had many packages broken by aggressive CFLAGS that I don't even bother anymore. I used to really go all out on them with leaf pointers and unroll loops, etc, etc.
Back to top
View user's profile Send private message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Wed Oct 31, 2007 5:55 pm    Post subject: Reply with quote

tarpman wrote:
likewhoa wrote:
for a laptop system you should really be using -Os and prelinking. Also set your CPU scheduler to deadline. just a few suggestions.

Prelinking for sure - for a Core 2 I think -Os is leaning a little too far towards trading away performance, though, considering its huge cache. Also, I'm interested in why you'd recommend deadline over, for example, CFQ.

SithMaddox, are things any different if you use a non-compositing window manager instead? such as metacity or kwin instead of compiz?

Care to explain the difference between the scheduling algorithms?

What is prelinking?

As far as the window manager, no, there is no difference in performance between compiz and metacity except that compiz seems worse at fullscreen video playback.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Wed Oct 31, 2007 7:15 pm    Post subject: Reply with quote

SithMaddox wrote:
What is prelinking?
What prelinking is, in your case, is not worth the hassle. It boosts application startup times but does exactly squat for responsiveness problems as you describe.

(See definition here. Avoid it until you're otherwise happy with your system, it's not 100% foolproof.)
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Wed Oct 31, 2007 7:37 pm    Post subject: Reply with quote

likewhoa wrote:
for a laptop system you should really be using -Os and prelinking. Also set your CPU scheduler to deadline. just a few suggestions.


You can do that?! :shock:

Or did you mean the IO Scheduler?

(Just checking ;) Not too happy with the new scheduler at the moment; If anything it's less responsive than the old one! The only improvement is under heavy load, where lower-priority tasks are still useable whereas before they'd never get any CPU time at all...)
Back to top
View user's profile Send private message
zach9824
n00b
n00b


Joined: 12 Apr 2004
Posts: 37

PostPosted: Wed Oct 31, 2007 7:56 pm    Post subject: Reply with quote

SithMaddox wrote:

What is the advantage of irq balance package vs the in-kernel irq balancing?

And yes, cflags make such a minimal impact on performance and I have had many packages broken by aggressive CFLAGS that I don't even bother anymore. I used to really go all out on them with leaf pointers and unroll loops, etc, etc.


From the irqbalance project site - http://irqbalance.org/
irqbalance is a Linux* daemon that distributes interrupts over the processors and cores you have in your computer system. The design goal of irqbalance is to do find a balance between power savings and optimal performance.

I found with my dual core laptop the irqbalance dameon did a better job than the in-kernel balancing.

Also the CFLAGS I provided you are not aggressive by any means. The laptop specs you have provided are by today's standards considered "desktop replacment" status. However, I agree, this isn't causing the issue that you appear to be experiencing.

What is your kernel timing? 1000HZ? 350HZ?
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Thu Nov 01, 2007 8:56 am    Post subject: Reply with quote

Quote:

And yes, cflags make such a minimal impact on performance and I have had many packages broken by aggressive CFLAGS that I don't even bother anymore. I used to really go all out on them with leaf pointers and unroll loops, etc, etc.


there is a middle ground between no optimization rather than excessive optimation. without changing march you may as well be using ubuntu or debian packages, since they're all compiled for i686 and therefore expect no more from processors than pentium 2 abilities.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 778
Location: Brooklyn, New York

PostPosted: Thu Nov 01, 2007 4:04 pm    Post subject: Reply with quote

Cyker wrote:
likewhoa wrote:
for a laptop system you should really be using -Os and prelinking. Also set your CPU scheduler to deadline. just a few suggestions.


You can do that?! :shock:

Or did you mean the IO Scheduler?

(Just checking ;) Not too happy with the new scheduler at the moment; If anything it's less responsive than the old one! The only improvement is under heavy load, where lower-priority tasks are still useable whereas before they'd never get any CPU time at all...)


yes, if you set your schedulers as modules and or switch schedulers from he grub line, i rather keep them as modules. I have a bash function to help me change between scheduler easily also to manipulate the fifo_batch, front_merges, read_expire, write_expire, & writes_starved values.

Code:


ios() {

case $1 in
        cfq|deadline|anticipatory)
                echo "switching scheduler to $1"
                while read line; do echo $1 >$line; done < <(find /sys/block/ -type f -name 'scheduler')
                if (($?>0)); then echo "error occurred.";fi
                ;;
        -l|--list) echo "listing IO Scheduler(s) in use"
                find /sys/block/ -type f -name 'scheduler' -exec cat {} \;
                ;;
        fifo_batch|front_merges|read_expire|write_expire|writes_starved)
                if (($#<2)); then
                        echo "not enough arguments giving, try again."
                else
                        echo "changing $1 value to $2."
                        while read line; do echo $2 >$line; done < <(find /sys/block/ -type f -name "$1")
                fi
                if (($?>0)); then echo "error occurred.";fi
                ;;
        *) echo "atleast one argument is needed. try again."
                ;;
esac
}
Back to top
View user's profile Send private message
andreac
n00b
n00b


Joined: 03 Aug 2004
Posts: 14
Location: Mergo

PostPosted: Thu Nov 01, 2007 4:37 pm    Post subject: Re: Gentoo/Linux is just slow and unresponsive Reply with quote

SithMaddox wrote:

....
2.2 GHz Core 2 Duo
2GB ram.
160GB 5400rpm SATA HD (This is a notebook)
Nvidia 8600M GT
....
Right now, I am typing this post, but I have a couple of other tabs open in firefox. If I click on another one there is about a 2-3 second delay before the page completely changes. I have no other applications running besides firefox.
....
Furthermore, if I go to ESPN.com and move my mouse across the menu area the drop down boxes don't appear until one second after my mouse has passed over the menu.


With a system like this you should really go fast.
May be a memory problem, something may be using much of it, have you checked?
I read somewhere that Firefox can use MUCH memory in some situations,
if you close it the PC is still slow?
_________________
Andrea
Back to top
View user's profile Send private message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Thu Nov 01, 2007 7:14 pm    Post subject: Reply with quote

erik258 wrote:
Quote:

And yes, cflags make such a minimal impact on performance and I have had many packages broken by aggressive CFLAGS that I don't even bother anymore. I used to really go all out on them with leaf pointers and unroll loops, etc, etc.


there is a middle ground between no optimization rather than excessive optimation. without changing march you may as well be using ubuntu or debian packages, since they're all compiled for i686 and therefore expect no more from processors than pentium 2 abilities.

Another reason is that I don't know what march to use for a notebook core 2 duo.
Back to top
View user's profile Send private message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Thu Nov 01, 2007 7:17 pm    Post subject: Re: Gentoo/Linux is just slow and unresponsive Reply with quote

andreac wrote:
SithMaddox wrote:

....
2.2 GHz Core 2 Duo
2GB ram.
160GB 5400rpm SATA HD (This is a notebook)
Nvidia 8600M GT
....
Right now, I am typing this post, but I have a couple of other tabs open in firefox. If I click on another one there is about a 2-3 second delay before the page completely changes. I have no other applications running besides firefox.
....
Furthermore, if I go to ESPN.com and move my mouse across the menu area the drop down boxes don't appear until one second after my mouse has passed over the menu.


With a system like this you should really go fast.
May be a memory problem, something may be using much of it, have you checked?
I read somewhere that Firefox can use MUCH memory in some situations,
if you close it the PC is still slow?


Right now I'm using about 600MB of memory with firefox taking up 100MB of that. ESPN.com really slows down my computer...
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Thu Nov 01, 2007 7:43 pm    Post subject: Reply with quote

Have you seen the thread titled AMD64 system slow/unresponsive during disk access...?

I believe the problem exists for Core 2 Duo as well as AMD64.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Thu Nov 01, 2007 11:13 pm    Post subject: Re: Gentoo/Linux is just slow and unresponsive Reply with quote

SithMaddox wrote:
Right now I'm using about 600MB of memory with firefox taking up 100MB of that. ESPN.com really slows down my computer...

Just how are you counting that 600M? I've got a system with reasonably similar specs (a little faster CPU/hard drive, and a bit older a graphics card), and here's my output of free -m:
free -m:
             total       used       free     shared    buffers     cached
Mem:          2011       1214        796          0         13       1015
-/+ buffers/cache:        185       1825
Swap:            0          0          0


the line you want is the one that says "-/+ buffers/cache, NOT just the "Mem" line. The Mem line is counting all the cached/buffered data that's in RAM (read from hard drive, kept in RAM for quick access), and the other line is just the *actively* used memory. Depending on desktop environment/programs running in the background, anywhere from 150M to about 400M actively used is acceptable.

As far as Firefox goes, which seems to be your only real issue with performance you've mentioned (Compiz is flaky normally).. Emerge Firefox with USE="moznopango" and turn off smooth scrolling in the preferences. This may fix a lot.

Also, your system looks selectively out-of-date... Glibc 2.5, GCC 4.1.1. Both of these were upgraded at least weeks ago in portage... You may wish to consider upgrading your installed packages.
Back to top
View user's profile Send private message
SithMaddox
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 149

PostPosted: Sat Nov 03, 2007 12:52 am    Post subject: Re: Gentoo/Linux is just slow and unresponsive Reply with quote

broken_chaos wrote:
SithMaddox wrote:
Right now I'm using about 600MB of memory with firefox taking up 100MB of that. ESPN.com really slows down my computer...

Just how are you counting that 600M? I've got a system with reasonably similar specs (a little faster CPU/hard drive, and a bit older a graphics card), and here's my output of free -m:
free -m:
             total       used       free     shared    buffers     cached
Mem:          2011       1214        796          0         13       1015
-/+ buffers/cache:        185       1825
Swap:            0          0          0


the line you want is the one that says "-/+ buffers/cache, NOT just the "Mem" line. The Mem line is counting all the cached/buffered data that's in RAM (read from hard drive, kept in RAM for quick access), and the other line is just the *actively* used memory. Depending on desktop environment/programs running in the background, anywhere from 150M to about 400M actively used is acceptable.

As far as Firefox goes, which seems to be your only real issue with performance you've mentioned (Compiz is flaky normally).. Emerge Firefox with USE="moznopango" and turn off smooth scrolling in the preferences. This may fix a lot.

Also, your system looks selectively out-of-date... Glibc 2.5, GCC 4.1.1. Both of these were upgraded at least weeks ago in portage... You may wish to consider upgrading your installed packages.

total used free shared buffers cached
Mem: 2023 1414 609 0 267 649
-/+ buffers/cache: 497 1526
Swap: 494 0 494
Back to top
View user's profile Send private message
pigeon768
l33t
l33t


Joined: 02 Jan 2006
Posts: 683

PostPosted: Sat Nov 03, 2007 3:51 am    Post subject: Reply with quote

SithMaddox wrote:
Another reason is that I don't know what march to use for a notebook core 2 duo.
Once you update to gcc 4.2.x use -march=native

Until then, I believe it's -march=prescott that you should be using.

And whoever said -Os is generally worse than -O2 for core 2 duos is right - they have massive caches.
Back to top
View user's profile Send private message
choogi
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2007
Posts: 105

PostPosted: Sun Nov 04, 2007 7:18 am    Post subject: Reply with quote

I've been following this thread for a little while now. I have almost the same specs. What have you done with your gentoo install? Is it feeling any more responsive? It usually takes about 2-3 seconds for my firefox to fire up after I click the icon.
Back to top
View user's profile Send private message
Pazuzuzu
n00b
n00b


Joined: 21 Feb 2005
Posts: 5

PostPosted: Sun Nov 11, 2007 4:27 am    Post subject: Reply with quote

I also found that my Firefox was painfully slow on Gentoo, especially compared to similar machines I've used recently running Fedora. I found that switching to firefox-bin (the precompiled version) helped quite a bit - perhaps because of the removal of Pango?

Does anyone know the how Firefox is configured and with what CFLAGS etc for the firefox-bin package?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum