Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My gentoo is getting slow!!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
wokick
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 97

PostPosted: Thu Jun 09, 2005 2:10 am    Post subject: My gentoo is getting slow!!! Reply with quote

Recently, I noticed that lots of programs are not so resposive as before.
What can be wrong? Is it normal?
Back to top
View user's profile Send private message
abz
n00b
n00b


Joined: 18 Nov 2004
Posts: 64
Location: Melbourne

PostPosted: Thu Jun 09, 2005 3:39 am    Post subject: Reply with quote

How have you got your hard drive partitioned?

How full is your hard drive (df -h)?

Are you using prelink?

What is your system specifications?

What have you got installed (cat /var/lib/portage/world)?
Back to top
View user's profile Send private message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 430

PostPosted: Thu Jun 09, 2005 4:16 am    Post subject: Reply with quote

In addition to the questions already asked, what is the time frame? Is it days, weeks, months, or years?
Back to top
View user's profile Send private message
wokick
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 97

PostPosted: Thu Jun 09, 2005 3:37 pm    Post subject: Reply with quote

abz wrote:
How have you got your hard drive partitioned?

How full is your hard drive (df -h)?

Are you using prelink?

What is your system specifications?

What have you got installed (cat /var/lib/portage/world)?


1. I only partioned my harddrive once, when I did the gentoo installation

2.
Filesystem Size Used Avail Use% Mounted on
/dev/hdb2 8.9G 3.2G 5.7G 36% /
udev 252M 2.6M 249M 2% /dev
/dev/hdb1 54M 3.5M 47M 7% /boot
/dev/hdb3 36G 3.4G 33G 10% /home
/dev/hdb6 141G 72G 62G 54% /data
none 252M 28K 252M 1% /dev/shm

3. Yes. I use prelink, and I run the following command daily by cron
/usr/sbin/prelink -amuR

4. P4 2.4Ghz
512M memory

5. word file
media-sound/alsa-utils
media-gfx/gqview
x11-misc/xscreensaver
media-gfx/grace
media-gfx/labplot
sys-fs/udev
media-video/ati-drivers
app-admin/localepurge
sys-apps/pciutils
app-office/lyx
net-ftp/gftp
app-portage/gentoolkit
app-arch/unrar
gnome-base/gnome-light
dev-java/blackdown-jdk
sys-apps/eject
net-misc/tightvnc
xfce-base/xfce4
net-im/gaim
dev-util/ddd
app-i18n/scim
x11-terms/mrxvt
sys-fs/dosfstools
app-text/acroread
media-video/ldvd
media-video/gxine
app-text/tree
sys-kernel/reiser4-gentoo-dev-sources
net-firewall/kmyfirewall
media-gfx/xfig
xfce-extra/xfce4-sensors
sys-process/vixie-cron
app-editors/xemacs
app-dicts/stardict
net-misc/iperf
x11-wm/wmii
media-gfx/gimp
net-misc/dhcpcd
app-admin/torsmo
net-mail/gml
sys-libs/glibc
media-video/lsdvd
app-dicts/stardict-cdict-en-zh-gb
app-editors/nano
sys-apps/module-init-tools
dev-python/python-docs
mail-client/mozilla-thunderbird
app-dicts/stardict-dictd-devils
app-text/gv
sys-apps/ethtool
media-video/mplayer
sys-apps/fbset
media-video/streamdvd
xfce-extra/xfce4-showdesktop
dev-libs/elfutils
app-editors/vim
net-misc/d4x
dev-python/scientificpython
media-sound/rhythmbox
media-gfx/xv
x11-wm/wmi
app-doc/abs-guide
media-gfx/gnuplot
app-admin/sysklogd
x11-libs/cairo
sys-fs/reiser4progs
media-video/vobcopy
dev-util/ccache
dev-util/strace
sci-libs/gsl
xfce-extra/xfce4-taskbar
app-admin/logrotate
app-dicts/stardict-langdao-zh-en-gb
sys-devel/gettext
app-dicts/stardict-langdao-en-zh-gb
media-video/dvdbackup
gnome-base/gdm
app-portage/genlop
app-dicts/stardict-cedict-zh-en-big5
app-dicts/stardict-oxford-en-zh-gb
dev-python/menumaker
media-video/dvdrip
dev-python/pygtk
app-admin/sudo
media-fonts/terminus-font
app-editors/nvu
sys-devel/prelink
app-arch/rar
media-gfx/gthumb
sys-boot/grub
sys-apps/slocate
net-misc/netkit-telnetd
x11-misc/qterm
x11-misc/xchm
media-video/lxdvdrip
media-video/realplayer
sys-apps/coldplug
app-i18n/scim-pinyin
www-client/mozilla-firefox
app-cdr/k3b
sys-libs/slang
app-office/openoffice
media-gfx/imagemagick
sys-apps/hotplug
app-misc/screen

6. Around two weeks ago, I notied the slowing down.
Back to top
View user's profile Send private message
lotw
Guru
Guru


Joined: 09 Jan 2005
Posts: 342
Location: Palmdale

PostPosted: Fri Jun 10, 2005 2:15 am    Post subject: Reply with quote

wokick wrote:
abz wrote:
How have you got your hard drive partitioned?

How full is your hard drive (df -h)?

Are you using prelink?

What is your system specifications?

What have you got installed (cat /var/lib/portage/world)?


1. I only partioned my harddrive once, when I did the gentoo installation

2.
Filesystem Size Used Avail Use% Mounted on
/dev/hdb2 8.9G 3.2G 5.7G 36% /
udev 252M 2.6M 249M 2% /dev
/dev/hdb1 54M 3.5M 47M 7% /boot
/dev/hdb3 36G 3.4G 33G 10% /home
/dev/hdb6 141G 72G 62G 54% /data
none 252M 28K 252M 1% /dev/shm

3. Yes. I use prelink, and I run the following command daily by cron
/usr/sbin/prelink -amuR

4. P4 2.4Ghz
512M memory

5. word file
media-sound/alsa-utils
media-gfx/gqview
x11-misc/xscreensaver
media-gfx/grace
media-gfx/labplot
sys-fs/udev
media-video/ati-drivers
app-admin/localepurge
sys-apps/pciutils
app-office/lyx
net-ftp/gftp
app-portage/gentoolkit
app-arch/unrar
gnome-base/gnome-light
dev-java/blackdown-jdk
sys-apps/eject
net-misc/tightvnc
xfce-base/xfce4
net-im/gaim
dev-util/ddd
app-i18n/scim
x11-terms/mrxvt
sys-fs/dosfstools
app-text/acroread
media-video/ldvd
media-video/gxine
app-text/tree
sys-kernel/reiser4-gentoo-dev-sources
net-firewall/kmyfirewall
media-gfx/xfig
xfce-extra/xfce4-sensors
sys-process/vixie-cron
app-editors/xemacs
app-dicts/stardict
net-misc/iperf
x11-wm/wmii
media-gfx/gimp
net-misc/dhcpcd
app-admin/torsmo
net-mail/gml
sys-libs/glibc
media-video/lsdvd
app-dicts/stardict-cdict-en-zh-gb
app-editors/nano
sys-apps/module-init-tools
dev-python/python-docs
mail-client/mozilla-thunderbird
app-dicts/stardict-dictd-devils
app-text/gv
sys-apps/ethtool
media-video/mplayer
sys-apps/fbset
media-video/streamdvd
xfce-extra/xfce4-showdesktop
dev-libs/elfutils
app-editors/vim
net-misc/d4x
dev-python/scientificpython
media-sound/rhythmbox
media-gfx/xv
x11-wm/wmi
app-doc/abs-guide
media-gfx/gnuplot
app-admin/sysklogd
x11-libs/cairo
sys-fs/reiser4progs
media-video/vobcopy
dev-util/ccache
dev-util/strace
sci-libs/gsl
xfce-extra/xfce4-taskbar
app-admin/logrotate
app-dicts/stardict-langdao-zh-en-gb
sys-devel/gettext
app-dicts/stardict-langdao-en-zh-gb
media-video/dvdbackup
gnome-base/gdm
app-portage/genlop
app-dicts/stardict-cedict-zh-en-big5
app-dicts/stardict-oxford-en-zh-gb
dev-python/menumaker
media-video/dvdrip
dev-python/pygtk
app-admin/sudo
media-fonts/terminus-font
app-editors/nvu
sys-devel/prelink
app-arch/rar
media-gfx/gthumb
sys-boot/grub
sys-apps/slocate
net-misc/netkit-telnetd
x11-misc/qterm
x11-misc/xchm
media-video/lxdvdrip
media-video/realplayer
sys-apps/coldplug
app-i18n/scim-pinyin
www-client/mozilla-firefox
app-cdr/k3b
sys-libs/slang
app-office/openoffice
media-gfx/imagemagick
sys-apps/hotplug
app-misc/screen

6. Around two weeks ago, I notied the slowing down.


Out of curiosity, when you run fschk on the / hd what is the non-contiguous number?
Back to top
View user's profile Send private message
Q-collective
Advocate
Advocate


Joined: 22 Mar 2004
Posts: 2071

PostPosted: Fri Jun 10, 2005 9:32 am    Post subject: Reply with quote

lotw wrote:
Out of curiosity, when you run fschk on the / hd what is the non-contiguous number?

s/fschk/fsck
And don't run this on a mounted partition!

Tot the topic stater: could you provide us with the results of "hdparm -tT /dev/hda"?

And what do you mean by "slow"? Could you give us an indication?
Back to top
View user's profile Send private message
abz
n00b
n00b


Joined: 18 Nov 2004
Posts: 64
Location: Melbourne

PostPosted: Fri Jun 10, 2005 9:36 am    Post subject: Reply with quote

99.99% of the time, if a system is running slow, its due to I/O devices, most likely the hard drive. Hence this is the reason why I asked you all those questions regarding your hard drive.

As a file system gets used more and more (and as it gets full), the OS has a harder time trying to putting file segments all on the one track along with its inode. Secondly, it has an even harder time putting things in the rotationally optimal position. This can lead to the head thrashing around during normal execution. You can prevent against this by having a more sophisticated partitioning structure. You are on the right track by having /home and /data, but should consider breaking it up further. I'm sure most of the people reading this would.

Your / partition isn't that full. What is /boot doing mounted? (just for this post?)

One thing to note is that if you are listening to music or some sort of file stream from your hard drive, the disk head has to go all the way to /data (way up the end of the hard drive to get the next 10 seconds of music assuming the music is held on /data). Then you click firefox, and the head goes all the way down the very start of your hard drive to /usr/bin/. This would be a mayor source of concern for me. I put the music I'm listening to on /home and my dvd's is /home/adamdp/archive.

I would recommend repartition your hard drive to suit your use. The long term health of you system start at installation and hence partitioning.

Here is my laptops partitioning scheme:
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc6             1.6G  761M  871M  47% /
/dev/hdc5             1.6G  137M  1.5G   9% /home
/dev/hdc7             3.3G  2.6G  738M  78% /usr
/dev/hdc8             2.4G  272M  2.1G  12% /var
/dev/hdc9             965M  474M  492M  50% /opt
/dev/hdc10            3.3G  3.0G  321M  91% /usr/portage/distfiles
/dev/hdc12             36G   12G   25G  32% /home/adamdp/archive
none                  501M     0  501M   0% /dev/shm


What files system type are you using and with what mount options?

Your system is bound to slow down a little after long term use, but this can be minimise by the aforementioned points.

Finally, the thing that slows linux down the most (but it would be even slower without it) is swap. Nothing chugs like the linux kernel once its hit swap. You will lose a significant factor of speed at this point. Therefore, if you are that worried about speed you should minimise you memory usage. With only 512 MB of memory, your system is going to hit swap after about 10 minutes of usage?

Abz.
Back to top
View user's profile Send private message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 430

PostPosted: Fri Jun 10, 2005 4:03 pm    Post subject: Reply with quote

abz wrote:

One thing to note is that if you are listening to music or some sort of file stream from your hard drive, the disk head has to go all the way to /data (way up the end of the hard drive to get the next 10 seconds of music assuming the music is held on /data). Then you click firefox, and the head goes all the way down the very start of your hard drive to /usr/bin/. This would be a mayor source of concern for me. I put the music I'm listening to on /home and my dvd's is /home/adamdp/archive.


This is not how a hard drive works, not even remotely. Your thinking of your hard drive like a cassette tape with fast forward and rewind.

HDs are platters and heads. Even moving to the "beginning" of a platter the the "end" (move from the inside radius to the outside radius) can happen on the order of a hundred times a second, and that would be a single platter, single head setup. In reality, your HD is made of layers of platters and multiple heads, running in parallel. You could have heads at the begining and end at the same time.

Partitioning your hard drive does physically allocate the platter space to different tasks. And the partitions can be optimal or suboptimal with respect to motions of the heads. However you shouldn't worry about "beginning" and "end" quite as much as described above.

http://computer.howstuffworks.com/hard-disk.htm
Back to top
View user's profile Send private message
stonent
Veteran
Veteran


Joined: 07 Aug 2003
Posts: 1139
Location: Texas

PostPosted: Fri Jun 10, 2005 6:38 pm    Post subject: Reply with quote

It could be USE-bloat or CFLAGS-bloat.

Maybe take some time and trim down your USE flags and take a realistic look at your CFLAGS. Then do an emerge --newuse world (or is it --new-use, I forget)

Also consider getting rid of some daemons. You don't really need cups running if you never print or maybe only print once a week. Just start it when you need it.
_________________
Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism.
Back to top
View user's profile Send private message
abz
n00b
n00b


Joined: 18 Nov 2004
Posts: 64
Location: Melbourne

PostPosted: Sat Jun 11, 2005 2:49 am    Post subject: Reply with quote

gustafson wrote:
abz wrote:

One thing to note is that if you are listening to music or some sort of file stream from your hard drive, the disk head has to go all the way to /data (way up the end of the hard drive to get the next 10 seconds of music assuming the music is held on /data). Then you click firefox, and the head goes all the way down the very start of your hard drive to /usr/bin/. This would be a mayor source of concern for me. I put the music I'm listening to on /home and my dvd's is /home/adamdp/archive.


This is not how a hard drive works, not even remotely. Your thinking of your hard drive like a cassette tape with fast forward and rewind.


I wasn't thinking of a cassette tape with fast forward and rewind, yes I admit my explanation could use some polishing. The slowest part of accessing a file is the seek time. In this time, the head has to move to the correct sector and stabilize (10-20ms?) before the read the block. In this case, it doesn't look like the hard drive is a very high performance device. Therefore, we need to give it very possible advantage we can by reducing the amount of seeking it has to do.

gustafson wrote:

You could have heads at the begining and end at the same time.


Since the heads cannot move independently on a normal hard drive, the probability of this happening is .0000fuckall . What i was trying to point out is that, for increased speed, one should consider having all data accessed frequently close together.

As a rough calculation, he has a 200 Gig drive with 6 platters -> 33.33 Gig per platter. If he confines the data he is accessing to the first 10 Gigs, the heads should only have to move around the first 1/3 of the platter during normal use. So, currently he is on the right track, but main point of my post is that we can reduce the amount of seek time further by restricting the amount of seeking within this 10 Gig by separating it up further.

Hence, if we take that 10 Gig and partition it into 5 more partitions, the head should only have to seek once (within the 10 Gig) to the inode and start of the file, then it will only have to seek within a 2 Gig range to get the rest of the file. He is noticing slowing of programs. These programs aren't ls and cat, they are things like firefox, openoffice, and other big programs that aren't kept in one continuous segment. This is the case we need to consider. We need to reduce the overall seeking as must as possible by reducing the amount of space a file has to fragment in.
Back to top
View user's profile Send private message
LucaSpiller
Apprentice
Apprentice


Joined: 10 Sep 2004
Posts: 188
Location: Censorship Land (aka England)

PostPosted: Sun Jun 12, 2005 7:53 am    Post subject: Reply with quote

abz wrote:
Finally, the thing that slows linux down the most (but it would be even slower without it) is swap. Nothing chugs like the linux kernel once its hit swap. You will lose a significant factor of speed at this point. Therefore, if you are that worried about speed you should minimise you memory usage. With only 512 MB of memory, your system is going to hit swap after about 10 minutes of usage?


I think that might be a slightly over estimate of how bad swap is and how much it is used... I origianlly had 512mb and the swap was hardly ever used - only when I had a few big apps open and a couple of simultaneous emerges running. I am now down to 256mb because one of the modules gave up, at the moment I have about 10 tabs in Firefox open, a few hundred aterms, Gaim, XFCE, and OpenOffice installing, a load of services (including Apache), and only 2676kb of swap are being used...
_________________
:: Luca :: Mac Fag :: Original Macbook, 2g RAM :: Closet Linux user (seasoned with salt and pepper) :: C2D E4400 @ 2ghz, 4g RAM (only 3.2g detected under 64bit...), Nvidia 9600GSO ::
Back to top
View user's profile Send private message
abz
n00b
n00b


Joined: 18 Nov 2004
Posts: 64
Location: Melbourne

PostPosted: Tue Jun 14, 2005 1:28 pm    Post subject: Reply with quote

LucaSpiller wrote:
abz wrote:
Finally, the thing that slows linux down the most (but it would be even slower without it) is swap. Nothing chugs like the linux kernel once its hit swap. You will lose a significant factor of speed at this point. Therefore, if you are that worried about speed you should minimise you memory usage. With only 512 MB of memory, your system is going to hit swap after about 10 minutes of usage?


I think that might be a slightly over estimate of how bad swap is and how much it is used... I origianlly had 512mb and the swap was hardly ever used - only when I had a few big apps open and a couple of simultaneous emerges running. I am now down to 256mb because one of the modules gave up, at the moment I have about 10 tabs in Firefox open, a few hundred aterms, Gaim, XFCE, and OpenOffice installing, a load of services (including Apache), and only 2676kb of swap are being used...


Yes, my point exactly, you don't notice the speed reduction because its happened before you know it.

Take a system such as yours with 256 MB of slow main memory. After you login you hit swap and hence you don't notice the speed reduction because its already happened. Your system doesn't know the meaning of cache and buffers. It always has to go back to disk for anything it wants from the start.

Take a system such as mine with 1024 MB of fast Corsair XL main memory. After weeks of uptime and may syncs, I hit swap and I notice a significant reduction of speed because the 750 MB cache no longer exists and it has to start going to disk for something that was in a cache 100's of times faster than disk.

By this example we can see that hitting swap is the point where systems with large amounts of memory will speed decrease whereas system without large main memory don't notice anything because they have been going to disk the entire time. Hence this can be applied across the board to all systems, hitting swap is the point were you will lose a signification amount of speed.

Abz.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Thu Dec 29, 2005 1:46 pm    Post subject: Reply with quote

Saw this is a bit old but last time I hit this slow-down it was using reiserfs for /

reiserfs fragments badly with use.

Swapped to reiser4 and the speed was back. (ext3 equally does not fragment much)

8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Mon Jan 02, 2006 10:08 pm    Post subject: Reply with quote

Since you are experiencing a gradual slowdown that is now becoming objectionable, I suggest that you observe it for a little while to see exactly what the symptoms are. Is the computer becoming slow at launching programs? Is all of the memory that you expected to be in the machine, still operational? Are there "stops and starts" in performance .. such as might be caused by a marginal sector on a disk-drive that's being (for now, successfully) retried? When the system is running slowly, is it a particular application? Is it I/O that is slow? Is CPU utilization remaining low at times when the system seems to be sluggish? How about the network... could you have a problem developing there?

It has been my experience that most Unix/Linux filesystems don't require defragmentation or other such maintenance. Most of the time, they can run happily for years. This is not the DOS world anymore. But it has also been my painful experience that the drives that are sold in computer stores today are not built for continuous or heavy duty.

For the next few days, then, observe critically. Consider possibilities of what might be causing the slowdown and see if you can construct a suitable series of experiments and carry them out.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Tue Jan 03, 2006 2:57 am    Post subject: Reply with quote

Quote:
It has been my experience that most Unix/Linux filesystems don't require defragmentation or other such maintenance. Most of the time, they can run happily for years. This is not the DOS world anymore.


While I agree with most of what you say, this is not really accurate.

This "linux does not need defrag" myth is just simplistic.

This comes from when "most" linux systems installed and used ext2 and ext3 almost exclusively. Since the advent of reiserfs on several distros this is no longer true.

There is nothing inherent in Linux kernel that means a fs does not fragment. It was just the fs used that did not.

Reiserfs and to a lesser extent Reiser4 DO fragment , the former BADLY. Neither have a defrag tool , you have to copy the partition or tarball it remove the files and copy back.

A defrag (packer) is promised for R4 but there does not seem to be any rush. Reiserfs is not maintained by the author so live with the copy -ax or change fs.

I know this since I have and do use both extensively and have experienced severe slow down using reiserfs as root partition.

8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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