-   Debian (
-   -   Fresh Debian Installation quite slow (

Canaris 08-20-2005 12:45 PM

Fresh Debian Installation quite slow

I am not totally new to Linux nor Debian. I set up the base system and manually added all the packages i need (lynx, Kde,...) It is Version 3.1.
Now when I am under KDE everything is kind of slow. I.E. when i start applications that are rather small even, my mouse starts to drag or the sound stops. Also applications startup slower than they should.

Does anyone know why that is and how I can take care of it?
If you need any outputs (dmesg, lspci,...) let me know.

Thanks in advance


bruno buys 08-20-2005 12:52 PM

The very first thing to think is dma, harddisks and hdparm. Did you install hdparm?
If not, install it, enable dma and then enable the fastest transfer mode for your disks, ultradma100, if possible.
There can be other points in the system to tweak, of course.

TigerOC 08-20-2005 04:02 PM

How much memory do you have on the system? Minimum recommended is 128MB but for optimum use look at least 256MB.

Canaris 08-21-2005 06:46 AM


Thanks for the help. I just instaled hdparm, but quite frankly don't really know what to do know. I tried "hdparm -I /dev/hda to get some info, but it doesn't say if DMA is already activated or not. So how can I find that out and how can i - if possible - activate it?

Once again thanks in advance


PMorph 08-21-2005 10:35 AM


Post the result from these commands, and we'll see:

hdparm -tT /dev/hda
hdparm -i /dev/hda

centosian 08-21-2005 10:41 AM

Use "hdparm -v /dev/hda" to see if DMA is enabled.

Please tell us how much memory and what kind of CPU you have. Running a hog like KDE and GNOME it's important to have a lot of memory.

I recommend installing a light-weight window manager like Fluxbox and then check if your desktop and apps still run slow.

I have an old machine with 384MB ram and a Celeron 366 I use for testing. On that I have Debian Sarge, Centos4 and Arch Linux 0.7 installed and they all perfrom the same when setup properly. Fluxbox and XFCE4 runs very well but gnome and kde are a bit sluggish for me. If you want a desktop environment XFCE4 is not quite as featured filled as gnome and kde but it runs much better. I prefer fluxbox most times for just a simple yet killer WM.

Dead Parrot 08-21-2005 11:11 AM

I've used several different distros and, in my experience, Debian is NOT slow -- in fact, many users experience that Debian is quite fast. (OK, Debian is not optimized for the newer hardware but, then again, my experience tells that such optimizations are mostly trivial and don't produce any noticeable speed improvements.)

However, there are some things you might try to speed up Debian. Do (as root) "apt-get install hdparm" and make the end of /etc/hdparm.conf to look like this :

command_line {
      hdparm -a 256 -m 16 -W 1 -u 1 -d 1 /dev/hda

Then reboot.

Also, you can install the libc6-i686 package and the i686 vesrion of the Debian kernel image.

And you can install the prelink package and then "su" to root and run the "/etc/cron.daily/prelink" command.

However, none of these actions is likely to speed up your Debian system noticeably. As I already said, Debian is pretty fast by default.

If you experience applications starting slow, then your Debian setup is probably not optimally configured. The common cause for this is that either your loopback interface is poorly defined or that applications cannot find your localhost address. To test that these are OK, try these commands:

$ localhost
$ localhost -i
$ dnsdomainname
(If some of these commands doesn't produce any output, then you need to edit /etc/hosts )

$ su
# ifconfig
(you should see the "lo" interface.)

Tons of Fun 08-21-2005 11:36 AM

I have been following this thread as I have an older machine with 128 MB of Ram. I am running gnome, so it is a bit sluggish. I was trying some of Dead Parrot's recommendations, and when I tried localhost and localhost -i as user and then root, I got a command not found error. When I tried the dnsdomainname, I got localdomain. I do have an lo interface when viewing ifconfig. I also installed hdparn, and viewing hdparm -v, everything is off except dma, and readahead is 256. My question is, based off of those results, what do I need to do to tweak my machine even more?



Dead Parrot 08-21-2005 12:25 PM

The first line in /etc/hosts should be something like this: localhost.localdomain localhost

Then there comes a second line, that you in most cases need to add yourself. If you've got a dhcp network connection, then this second line should start with , so that it associates your ip address to But if you've got a static net connection, then this could be your actual ip address instaead of, so that your actual ip address is associated with the localhost ip address.

A common setup would be like this (notice that this is merely the syntax, don't use it as such): localhost.localdomain localhost
your_ip_address your_localhost.your_dns_domainname

Now, you can point your web browser to this address, for example: It will show how your ip address will be seen by others when you surf the net. Notice that there's red text on that page "The text below might uniquely identify you on the Internet" and after that there's some blue text that will show how your address will show on the net. The part before the first period mark is your individual machine's ip address. All the stuff after that first period mark will be your dns domain name.

You can give your computer a personal hostname, ("debian" is fine), but you cannot change the dns domainname.

Now, "su" in a terminal window to become root and do "nano /etc
/hosts". If you've got a dhcp connection, you can make the first two lines to look like this: localhost.localdomain localhost debian.your_dns_domainname

In this case you need to take the "your_dns_domainname" from the blue text in , like described above.

But if you've got a static ip address, then replace the "" with your actual ip address, so that /etc/hosts looks something like this: localhost.localdomain localhost
your_actual_ip_address debian.your_dns_domainname

Now try again the commands:

$ localhost
$ localhost -i
$ dnsdomainname

Now you should get the proper output and the programs looking for this info should also launch without any unnecessary delays. :)

You usually set the loopback interface in /etc/network/interfaces . It should be something like this:

# The loopback network interface
auto lo
iface lo inet loopback

This is actually much more important than setting the host- and domainname, but getting everything right never hurted anyone. ;)

@Tons of Fun:

Unfortunately Gnome is a bit of a memory hog. You might want to install xfce4 and run your Gnome apps from there. (If you decide do this, make sure that you've got the "menu" package installed -- it should show all your familiar Gnome apps in a mouse right-click menu.)


One more thing: Whenever you update the X server related programs (or add new fonts), do first " su" in a terminal window and then do "fc-cache -fv". This will make applications to find fonts faster. ;)

Dead Parrot 08-21-2005 01:05 PM

And now that we've started discussing tweaking Debian, I'm not personally too keen on speeding up my system. Security and stability are much higher priority to me. The 2.6 kernel was a huge leap from the 2.4 kernel, concering performance. However, you'd probably also want to test the security of your Debian installation.

There is a progran called "tiger" and "nessus", too. One easy test is to install the lsof program (that has also many other uses). Then "su" to root and do

# lsof -i | grep LISTEN

That should list all the apps that actively listen your net connection. Most of these can be fine-tuned or completely turned off in /wtc/defaults .

Canaris 08-22-2005 02:03 AM


Thanks for all the useful suggestions.
I tried the loopback issue and on my Computer it is perfectly "registered" as lo.
Here are my hdparm output. Both outputs are under KDE

hdparm -tT /dev/hda:

Timing cached reads: 1852 MB in 2.00 seconds = 926.00 MB/sec
Timing buffered disk reads: 88 MB in 3.04 seconds = 28.95 MB/sec

hdparm -i /dev/hda:


Model=ST340823A, FwRev=3.39, SerialNo=7EF21F4L
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=1024kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78165360
IORDY=on/off, tPIO={min:240,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

So it looks like DMA is activated.
I have a P4 1.3Ghz with 512 MB Ram. I don't think that is too slow to handle KDE, is it?
Any more ideas maybe?

Thanks again in advance


All times are GMT -5. The time now is 09:00 AM.