LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-20-2005, 01:45 PM   #1
Canaris
LQ Newbie
 
Registered: May 2003
Posts: 17

Rep: Reputation: 0
Fresh Debian Installation quite slow


Hello.

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

Canaris
 
Old 08-20-2005, 01:52 PM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
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.
 
Old 08-20-2005, 05:02 PM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
How much memory do you have on the system? Minimum recommended is 128MB but for optimum use look at least 256MB.
 
Old 08-21-2005, 07:46 AM   #4
Canaris
LQ Newbie
 
Registered: May 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Hey.

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

Canaris
 
Old 08-21-2005, 11:35 AM   #5
PMorph
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
Hi,

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

hdparm -tT /dev/hda
hdparm -i /dev/hda
 
Old 08-21-2005, 11:41 AM   #6
centosian
LQ Newbie
 
Registered: Jul 2005
Posts: 11

Rep: Reputation: 0
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.
 
Old 08-21-2005, 12:11 PM   #7
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
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 :
Code:
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.)
 
Old 08-21-2005, 12:36 PM   #8
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian Wheezy / BackTrack 5/ Linux Mint 17
Posts: 379

Rep: Reputation: 37
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?

Thanks.

 
Old 08-21-2005, 01:25 PM   #9
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
The first line in /etc/hosts should be something like this:

127.0.0.1 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 127.0.0.1 , so that it associates your ip address to 127.0.0.1. But if you've got a static net connection, then this could be your actual ip address instaead of 127.0.0.1, 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):

127.0.0.1 localhost.localdomain localhost
your_ip_address your_localhost.your_dns_domainname

Now, you can point your web browser to this address, for example: https://www.grc.com/x/ne.dll?bh0bkyd2 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:

127.0.0.1 localhost.localdomain localhost
127.0.0.1 debian.your_dns_domainname

In this case you need to take the "your_dns_domainname" from the blue text in https://www.grc.com/x/ne.dll?bh0bkyd2 , like described above.

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

127.0.0.1 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.)

EDIT:

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.

Last edited by Dead Parrot; 08-21-2005 at 01:34 PM.
 
Old 08-21-2005, 02:05 PM   #10
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
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 .
 
Old 08-22-2005, 03:03 AM   #11
Canaris
LQ Newbie
 
Registered: May 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Hey.

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:

/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:

/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

Canaris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
new pc fresh installation prob spooky008 Linux - Newbie 12 01-28-2005 07:09 PM
fresh mandrake 10.1 installation need help cracksternation Linux - Laptop and Netbook 4 12-14-2004 04:23 PM
Fresh Debian install locks while starting up Imek Debian 1 10-02-2004 08:36 AM
gcc (error on fresh debian) ridertech Linux - Software 0 12-17-2003 09:31 PM
Slackware 9.1 Fresh Installation X problems linux-back Linux - Newbie 1 11-07-2003 05:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration