Red Hat 9.0 Problem (Extreamly Slow)

Place to discuss Fedora and/or Red Hat

Red Hat 9.0 Problem (Extreamly Slow)

Postby edwardsen35 » Fri Aug 08, 2003 9:41 pm

I've been using Linux for about a year now and I really like it. However, something that I find that is really annoying is how slow it is. I have a Pentium 4 1.8 ghz with 256 of ram. I didn't think the computer would have any trouble handling X. Before I start X my computer is using about 45 megs of ram. After I start X it is using about 145 megs of ram. When I open Mozilla it takes 8 seconds. When I open OpenOffice Write it takes 24 seconds.

Does anyone have any suggestions on what to do? If you need more information then let me know.

Thank you,
-edwardsen35

Here is the output from ps -A when X is running:
PID TTY TIME CMD
1 ? 00:00:04 init
2 ? 00:00:00 keventd
3 ? 00:00:00 kapmd
4 ? 00:00:00 ksoftirqd_CPU0
9 ? 00:00:00 bdflush
5 ? 00:00:00 kswapd
6 ? 00:00:00 kscand/DMA
7 ? 00:00:00 kscand/Normal
8 ? 00:00:00 kscand/HighMem
10 ? 00:00:00 kupdated
11 ? 00:00:00 mdrecoveryd
15 ? 00:00:00 kjournald
73 ? 00:00:00 khubd
2255 ? 00:00:00 kjournald
2531 ? 00:00:00 eth0
2580 ? 00:00:00 dhclient
2634 ? 00:00:00 syslogd
2638 ? 00:00:00 klogd
2656 ? 00:00:00 portmap
2675 ? 00:00:00 rpc.statd
2742 ? 00:00:00 apmd
2779 ? 00:00:00 sshd
2793 ? 00:00:00 xinetd
2813 ? 00:00:00 sendmail
2822 ? 00:00:00 sendmail
2832 ? 00:00:00 gpm
2841 ? 00:00:00 crond
2852 ? 00:00:00 cupsd
2912 ? 00:00:00 xfs
2921 ? 00:00:00 smbd
2925 ? 00:00:00 nmbd
2943 ? 00:00:00 atd
2951 ? 00:00:00 login
2953 tty3 00:00:00 mingetty
2954 tty4 00:00:00 mingetty
2955 tty5 00:00:00 mingetty
2956 tty6 00:00:00 mingetty
2957 tty1 00:00:00 bash
3138 ? 00:00:00 login
3139 tty2 00:00:00 bash
3185 tty1 00:00:00 startx
3196 tty1 00:00:00 xinit
3197 ? 00:00:03 X
3202 tty1 00:00:00 gnome-session
3214 ? 00:00:00 ssh-agent
3219 tty1 00:00:00 gconfd-2
3221 ? 00:00:00 bonobo-activati
3223 ? 00:00:00 gnome-settings-
3228 ? 00:00:00 fam
3233 ? 00:00:00 xscreensaver
3236 ? 00:00:00 metacity
3240 ? 00:00:00 gnome-panel
3242 ? 00:00:00 nautilus
3244 ? 00:00:00 magicdev
3246 ? 00:00:00 eggcups
3248 ? 00:00:00 pam-panel-icon
3250 ? 00:00:00 rhn-applet-gui
3251 ? 00:00:00 pam_timestamp_c
3258 ? 00:00:00 notification-ar
3260 ? 00:00:00 gnome-terminal
3261 ? 00:00:00 gnome-pty-helpe
3262 pts/0 00:00:00 bash
3288 pts/0 00:00:00 ps
edwardsen35
user
user
 
Posts: 26
Joined: Mon Feb 10, 2003 9:11 am

Postby Void Main » Sun Aug 10, 2003 6:12 pm

The amount of RAM that you have is on the low end of what I would recommend for a speedy desktop system but it should be sufficient. If you have more RAM and you don't turn off your computer it should actually get faster the more you use it because it will cache that stuff in memory. For instance, the first time you open Mozilla it might take 8 seconds but the second time it might only take 4 seconds. Another big thing that can cause your system to seem really slow is poor disk performance. What does the output of this command give you:

Code: Select all
# /sbin/hdparm -Tt /dev/hda


Do you have a swap partition? How big is it and where on the drive does it reside (partition position on the drive)?
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby edwardsen35 » Sun Aug 10, 2003 10:16 pm

It never hurt to have too much RAM so I'll pick some up.

You said "if you don't turn off your computer it should actually get faster the more you use it because it will cache that stuff in memory." That makes sense but that isn't what is happening on my computer. If I leave my computer running for a couple of days it gets to a point where I have to restart it because programs that I open won't run. For example, I click on the Mozilla icon and the browser never opens.

Thanks for the help. If you need any more info then let me know.

-edwardsen35


This is the output from fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2433 19543041 c Win95 FAT32 (LBA)
/dev/hda2 2434 2446 104422+ 83 Linux
/dev/hda3 2447 4800 18908505 83 Linux
/dev/hda4 4801 4865 522112+ f Win95 Ext'd (LBA)
/dev/hda5 4801 4865 522081 82 Linux swap

This is the output from /sbin/hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.36 seconds =355.56 MB/sec
Timing buffered disk reads: 64 MB in 2.50 seconds = 25.60 MB/sec
/sbin/hdparm -Tt /dev/hda3

This is the output from /sbin/hdparm -Tt /dev/hda3

/dev/hda3:
Timing buffer-cache reads: 128 MB in 0.36 seconds =355.56 MB/sec
Timing buffered disk reads: 64 MB in 2.57 seconds = 24.90 MB/sec
edwardsen35
user
user
 
Posts: 26
Joined: Mon Feb 10, 2003 9:11 am

Postby Void Main » Mon Aug 11, 2003 5:39 pm

edwardsen35 wrote:It never hurt to have too much RAM so I'll pick some up.

You said "if you don't turn off your computer it should actually get faster the more you use it because it will cache that stuff in memory." That makes sense but that isn't what is happening on my computer. If I leave my computer running for a couple of days it gets to a point where I have to restart it because programs that I open won't run. For example, I click on the Mozilla icon and the browser never opens.


Then you have major problems. :) I never shut my machines off, they run for months and months at a time (until a thunderstorm rolls through and knocks the power off).

This is the output from fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2433 19543041 c Win95 FAT32 (LBA)
/dev/hda2 2434 2446 104422+ 83 Linux
/dev/hda3 2447 4800 18908505 83 Linux
/dev/hda4 4801 4865 522112+ f Win95 Ext'd (LBA)
/dev/hda5 4801 4865 522081 82 Linux swap


The optimal place for a swap partition is at the beginning of the drive. In fact even more optimal would be to put it on a separate drive, or even spread it across several drives. However, this should not have the significant performance impact that you are seeing.

This is the output from /sbin/hdparm -Tt /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.36 seconds =355.56 MB/sec
Timing buffered disk reads: 64 MB in 2.50 seconds = 25.60 MB/sec
/sbin/hdparm -Tt /dev/hda3


This doesn't look all that bad although not great. What do these two comands report:

Code: Select all
# /sbin/hdparm -I /dev/hda
# /sbin/hdparm /dev/hda


But again the above would not cause you system to get slower the more you use it. This behavior would indicate some sort of memory leak. When your machine gets slow is there a lot of paging (or even thrashing) going on? There are several utilities that you can use to watch this but I like to use "vmstat" to get a quick watch on my paging:

Code: Select all
# vmstat 5


Which will update every 5 seconds. Watch the "si" and "so" which stands for "swap in" and "swap out". Run this while you work. The more swap activity you see the slower your machine will likely seem. Now swaping is not a bad thing, only if it happens continuously is it really bad, this is called "thrashing". For instance, the first time you open Mozilla it may swap, but on subsequent openings it may not do any swapping (or less swapping because of caching, which is a good thing).
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby edwardsen35 » Tue Aug 12, 2003 6:50 pm

I ran vmstat and it didn't seem like my computer was "thrashing." However, thanks for showing me the command. Last semester I took an OS course and we discussed swapping (I think we called it a context switch). My professor said that he was going to use Linux to demonistrate some of the concepts that we were discussing but he never got around to it.

Here is the info. If you need anything else then let me know.

/sbin/hdparm -I /dev/hda reports:

Code: Select all
/dev/hda:
 
ATA device, with non-removable media
        Model Number:       ST340810A
        Serial Number:      5FB5MFQR
        Firmware Revision:  3.39
Standards:
        Supported: 6 5 4 3
        Likely used: 6
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:   78165360
        device size with M = 1024*1024:       38166 MBytes
        device size with M = 1000*1000:       40020 MBytes (40 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        bytes avail on r/w long: 4      Queue depth: 1
        Standby timer values: spec'd by Standard
        R/W multiple sector transfer: Max = 16  Current = 16
        Advanced power management level: unknown setting (0x0040)
        Recommended acoustic management value: 128, current value: 128
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    READ BUFFER cmd
           *    WRITE BUFFER cmd
           *    Host Protected Area feature set
           *    Look-ahead
           *    Write cache
           *    Power Management feature set
                Security Mode feature set
                SMART feature set
           *    Device Configuration Overlay feature set
           *    Automatic Acoustic Management feature set
                SET MAX security extension
           *    Advanced Power Management feature set
           *    DOWNLOAD MICROCODE cmd
           *    SMART self-test
           *    SMART error logging
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
        not     supported: enhanced erase
HW reset results:
        CBLID- above Vih
        Device num = 0 determined by the jumper
Checksum: correct


/sbin/hdparm /dev/hda reports:
Code: Select all
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 4865/255/63, sectors = 78165360, start = 0
edwardsen35
user
user
 
Posts: 26
Joined: Mon Feb 10, 2003 9:11 am

Postby X-Factor » Wed Sep 24, 2003 5:55 pm

turn on 32bit echo "hdparm -c1 -d1 /dev/hda" >> /etc/rc.local
and then run the command, ONLY if the your HD supports it, I know I had to do it for my 2nd 3rd drives, cause when you access those drives, the machine runs like crap untill I did that.

check with the rest of the people here before you do it, cause I don't like messing with hdparm or telling other people too.
X-Factor
n00b
n00b
 
Posts: 2
Joined: Wed Sep 24, 2003 5:02 pm
Location: Louisville, KY


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 1 guest

cron