Upgraded computer and installed linux

abaez

Diamond Member
Jan 28, 2000
7,155
1
81
So to get rid of all the spyware and adaware my family was installing on the comp I decided to install linux. I had just upgraded so I slapped in my old comp - a 1.6 p4 and 512 megs of ram.

I installed linux fine, but the thing is it seems really really sluggish. Even slower than xp on the old system (p3 700) Even my mom who is a computer newb says its much slower and she wants windows back. What could be causing the sluggishness? I mean apps take forever to launch (good 3-4 seconds) on a brand new install everything formatted. Even opera is slow. I installed kde. Would gnome be a better choice? Any tips on how to get the stuff working nice and fast?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Try a smaller/lighter window manager instead of the big desktop environments. XFCE was kind of quick for me.
 

abaez

Diamond Member
Jan 28, 2000
7,155
1
81
How is XFCE usability? This is for my family so it has to be decently navigable. My mom especially is a newb. Even though all they need is web browsing and ms office.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
sounds like your harddrive is being slow. Maybe DMA is turned off.

IDE device naming setup goes like this: /dev/hda, /dev/hdb, /dev/hdc, /dev/hdd

hda = primary master
hdb = primary slave
hdc = secondary master
hdd = secondary slave


So this is not only for harddrives, but any other IDE device such as a cdrom or a zip drive.

To control the DMA access stuff for your harddrive you use the hdparm utility.

To test your harddrive (assuming it's the primary master device) you go:

hdparm -tT /dev/hda

This is what I get when I run it:

~#: sudo hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 1216 MB in 2.00 seconds = 607.18 MB/sec
Timing buffered disk reads: 140 MB in 3.02 seconds = 46.41 MB/sec


I am using a Western Digital 80gig harddrive with the 8meg cache.

You can see what settings your currently using by going:

~#: hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 156301488, start = 0


When I turn off my DMA access and then run the tests, this is what I get:

~# hdparm -d 0 /dev/hda

/dev/hda:
setting using_dma to 0 (off)
using_dma = 0 (off)

~# hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 1220 MB in 2.01 seconds = 608.27 MB/sec
Timing buffered disk reads: 20 MB in 3.23 seconds = 6.20 MB/sec

So you see it can have a dramatic performance difference.

Try checking that.

If you forget which drive is which, you can see the information of the drive by going "hdparm -i /dev/hda" and that will tell it's model/serial number and different settings it can use among other things.

Usually in linux when it takes a long time for programs to load it's just from the amount of time it takes to read the entire program off of the harddrive instead of CPU speed limits.

Although in linux the programs to generally take longer to load, but once it's loaded you should notice that they are quite a bit less likely to get bogged down or be slow.

Another issue is the amount of RAM in a system. Generally a full-fledged dekstop enviroement will use about 100-128 megs of RAM just while it's running. Using XFCE aught to cut down on that, however 512 megs should be plenty. Also Linux's memory magament is a bit better so it when you initially use a computer after a reboot it will seem a bit sluggish, but over a period of time of using the OS it should speed up a bit after most of what your doing gets loaded into memory and stay that way.
 

abaez

Diamond Member
Jan 28, 2000
7,155
1
81
Thank for you the detailed response drag. This is what I get on my primary drive:

/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 = 256 (on)
geometry = 34960/16/63, sectors = 35239680, start = 0


Timing buffer-cache reads: 1444 MB in 2.00 seconds = 721.75 MB/sec
Timing buffered disk reads: 52 MB in 3.05 seconds = 17.06 MB/sec


I guess it seems to be the timing burffered disk reads slow? Would that be causing the problem. WHat setting could I change for that?

And I get what you mean about programs loading into memory but right after a reboot but almost every time I started opera it takes a good 3 seconds.. I dont think this machine has been rebooted down since I installed linux..
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
What distribution are you using?
As for KDE, what version was it? 3.2 was a great improvement over 3.1 speedwise(and featurewise).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: abaez
Thank for you the detailed response drag. This is what I get on my primary drive:

/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 = 256 (on)
geometry = 34960/16/63, sectors = 35239680, start = 0


Timing buffer-cache reads: 1444 MB in 2.00 seconds = 721.75 MB/sec
Timing buffered disk reads: 52 MB in 3.05 seconds = 17.06 MB/sec


I guess it seems to be the timing burffered disk reads slow? Would that be causing the problem. WHat setting could I change for that?

And I get what you mean about programs loading into memory but right after a reboot but almost every time I started opera it takes a good 3 seconds.. I dont think this machine has been rebooted down since I installed linux..

Everything seems ok with the harddrive depending on the model. Mine is a 7200RPM 80gig Western Digital with 8meg cache, it's fairly modern. Newer harddrives like the 10,000rpm ones can do 60-70 MB/sec. Yours would be normal for a older 4500rpm model, I think.

There are a few other tweaks you can do but some of them are dangerous and they don't realy equal the impact that simply turning on DMA access has.

Heres the "hdparm -i /dev/hda"

/dev/hda:

Model=WDC WD800BB-00CAA1, FwRev=17.07W17, SerialNo=WD-WCA8E4158633
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: device does not report version:

* signifies the current active mode

udma is the different levels of dma access or some such thing, it stands for Ultra DMA They corrispond to the different ATA specifcations. I think udma4 and udma5 means that it is operating at ATA/133

However even if it's operating at UDMA3 or whatnot it its not going to make much of a difference.

here is a online tweaking guide for harddrives

Becarefull with it, your interacting with the hardware in a low level way.

What distribution are you using?
As for KDE, what version was it? 3.2 was a great improvement over 3.1 speedwise(and featurewise).

Definately. Newer versions seem to be faster then the older versions that distros....

So whatcha using?
 

Klixxer

Diamond Member
Apr 7, 2004
6,149
0
0
Originally posted by: abaez
Thank for you the detailed response drag. This is what I get on my primary drive:

/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 = 256 (on)
geometry = 34960/16/63, sectors = 35239680, start = 0


Timing buffer-cache reads: 1444 MB in 2.00 seconds = 721.75 MB/sec
Timing buffered disk reads: 52 MB in 3.05 seconds = 17.06 MB/sec


I guess it seems to be the timing burffered disk reads slow? Would that be causing the problem. WHat setting could I change for that?

And I get what you mean about programs loading into memory but right after a reboot but almost every time I started opera it takes a good 3 seconds.. I dont think this machine has been rebooted down since I installed linux..

Your IO support is 16 bit, run hdparm -c3 /dev/hda and then test it again.

You can also try to enable unmaskirq, it can make a difference on overall performance. the flag for that is -u1

IOW, try hdparm -c3 -u1 /dev/hda.
 

cquark

Golden Member
Apr 4, 2004
1,741
0
0
Which kernel are you using? I find kernel 2.6 to be much more responsive (i.e., feels twice as fast) on a desktop machine than 2.4.
 

abaez

Diamond Member
Jan 28, 2000
7,155
1
81
I'm using kde 3.2, how can I find out what kernel I'm using. I installed mandrake linux 10 so whichever kernel that has.

And yes for the family computer no spyware gets installed I hate monitoring everything on an xp machine.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: abaez
I'm using kde 3.2, how can I find out what kernel I'm using. I installed mandrake linux 10 so whichever kernel that has.

And yes for the family computer no spyware gets installed I hate monitoring everything on an xp machine.


the command "kernelversion" will tell you in a general manner.

Try the command "cat /proc/version" for a more specific answer.

That's about right. 3.2 is pretty new.

Sounds like everything is ok and normal. You can use the command "top" to monitor the performance of your OS. Also there are graphical monitors like gkrellm that are all cool to have on the desktop.

By doing this maybe you can spot some performance bottleneck, but in general programs do just take a bit longer to load then Windows ones. Once they load I think they are faster, but that could just be me.

When running windows and you open up things like Internet Explorer you already have most of the program already loaded and running because of the nature of Windows and how tightly everything is integrated. Most of what makes up IE is already running and present in other applications like Outlook and your Windows Explorer shell.

Or something like that.

Also turning of services can speed up things like boot up and free more memory and cpu cycles for applications. Depending on your distro there are different ways to do this easily. Most of the time it's just thru the start menu and selecting some computer configuration utility.

For fedora you go thru start--> system settings --> server settings --> services. The default runlevel for Fedora/Redhat is 5.

Also if your using mostly Gnome-based applications in KDE you have to load up the libraries that make up Gnome in addition to those that make up KDE which can mean much longer startup times and memory usage. Stuff like Abiword, OpenOffice.org, and Mozilla/Firebird go better with Gnome enviroment then KDE. KDE has it's own stuff that it uses that is actually realy good itself. KDE tends to be more tighter setup, were as Gnome is a hodge-podge of things. In terms of speed I don't know what is better.

Or you can try one of the more minimalistic setups, less to load up means less disk active means faster startup times, to a certian extent. May or may not make any noticable difference.

But since you mentioned Opera, that uses QT stuff for it's rendering libraries so it is mostly KDE application. So go figure. You may try using QT "shared" install instead of the QT "static" if that's the version you used so it can take advantage of what KDE has already loaded up, but I don't think that it's going to make much of a real difference.

Other then that check out gkrellm, and then keep a eye on memory/cpu/disk usage and maybe you can spot a bottle neck or program that isn't starting correctly.