LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-23-2007, 05:17 PM   #1
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Rep: Reputation: 0
Slight delay on first launch of apps


Stats:

Dell Inspiron e1705 Laptop
Slackware 11.0 (stock)
Kernel 2.6.20.7 (hand crafted)

Problem:

When launching applications for the first time, there is about a 2 second delay before the application displays. This happens from a straight console or in X11 (running KDE).

For example, boot to the console, login and launch jed. About 2 seconds later jed displays. Quit jed, relaunch and jed appears immediately.

Same in X. Launch FireFox and there is about a 2 second delay before it displays. Close and relaunch, FireFox comes right up.

Some other notes about this:

* This only happens with the 2.6.20.7 kernel. Booting the stock Huge26.s (2.4.32) doesn't yield a delay in starting apps.

* During the delay there is no hard drive activity (like loading libs...).

* The applications do not display a lag after their launched. There is no noticeable decrease in performance.

I can post the kernel .config file, but wanted to see if someone experienced this problem and might have some solutions to try.

Any ideas?

Thanks all!

-Adam
 
Old 04-24-2007, 01:04 AM   #2
props666999
Member
 
Registered: Oct 2003
Location: Greece
Posts: 260

Rep: Reputation: 30
Hi anteed
after a reboot all processes are 'being cached' for first time. Like X from console takes more seconds to load the first time you type startx.
In my case i've got a heavy directory (150 GB). Every time i boot my pc to open that folder takes 5 seconds. Every other request to open it is immediate without the previous delay.

Here is a good source regarding buffer cache

Quote:
This only happens with the 2.6.20.7 kernel. Booting the stock Huge26.s (2.4.32) doesn't yield a delay in starting apps.
Stock Kernels coming from Slackware are typically slow (to fulfill user needs). Build you own basic one to achieve faster responses.

Kernel Compile Guide for 2.6.0
 
Old 04-24-2007, 03:02 AM   #3
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by props666999
Hi anteed
after a reboot all processes are 'being cached' for first time. Like X from console takes more seconds to load the first time you type startx.
In my case i've got a heavy directory (150 GB). Every time i boot my pc to open that folder takes 5 seconds. Every other request to open it is immediate without the previous delay.

Here is a good source regarding buffer cache



Stock Kernels coming from Slackware are typically slow (to fulfill user needs). Build you own basic one to achieve faster responses.

Kernel Compile Guide for 2.6.0

As I posted, the stock kernel executes the applications without a delay (Huge26.s). The kernel that I custom built yields the slow response time.

Been in the kernel trying different toggles, processor features, etc... to see if I get any different results. So far nothing has resolved the issue.

Additional information. Now console apps seem to exhibit this behavior all the time. Jed, ircII, slrn and a few others. Launching them while at a straight console yields a delay of about 2-4 seconds. In X11 (still running KDE) the first launch is delayed and subsequent application launches are displayed rapidly.

The hard drive installed is an 80gb SATA drive, partitioned out into 5 separate partitions. The largest of them being mounted as /home and /usr (30gb each).

Any suggestions?

-Adam
 
Old 04-24-2007, 09:23 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Just a thought. What I/O scheduler are you using. Didn't they recently change the default one ? I know that a disk scheduler should, techincally, not have this big of an effect on performance. But, can't rule it out.
 
Old 04-24-2007, 01:10 PM   #5
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by H_TeXMeX_H
Just a thought. What I/O scheduler are you using. Didn't they recently change the default one ? I know that a disk scheduler should, techincally, not have this big of an effect on performance. But, can't rule it out.
Good catch, something I didn't think of to try.

So, I gave all three I/O Schedulers a run (Anti, Dead and CF/Q). Then I tried without an I/O Scheduler. Same result. None seemed to improve or decrease the lag when launching console apps.

Still trying...

-Adam
 
Old 04-24-2007, 02:43 PM   #6
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 50
Maybe you could do a diff compare of the huge26 .config file and your own. Probably rather tedious but you could rule out some of the most obviously irelevant differences.
Or you could confirm that it is a kernel issue by compiling your kernel with a make oldconfig using the huge26 .config. Then (assuming the problem goes away) you could gradually remove the bits you don't want.
My guess is that your new kernel is falling back to a less efficient sata driver, or ata driver, as you seem to have ruled out memory management. (but you should check that all your memory is available - top should do that)

edit: also you could try strace. I have difficulty understanding it's output, but something glaringly obvious might show up.

tobyl

Last edited by tobyl; 04-24-2007 at 02:51 PM.
 
Old 04-24-2007, 11:34 PM   #7
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Thumbs up Figured it out...

First, thanks for all the suggestions and help.

I noticed something when starting X11. The delay would hold for a few seconds then something caught my eye in the flash of text you get before the nVidia splash screen comes up. X11 wasn't able to get the hostname. So, I checked the logs and it was so simple. Not sure how, but my /etc/hosts file had been reverted back to the default darkstar.net on the loopback, while the HOSTNAME file was correct. Changed the /etc/hosts file back to what it should be. Now everything is back as it should. No delays in the console apps or in X11.

It's usually something simple. :-)

Oh, and I changed my kernel config back to what it should be.

Thanks again all!

-Adam
 
Old 04-24-2007, 11:47 PM   #8
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Here's something else to consider, which I *just* learned how to use: 'swappiness'
Google 'swappiness' and check out the first couple results that you get.
I just switched my 'swappiness' from the default (60 I believe) to 10, and WOW my desktop is super smooth and responsive , particularly noticeable is firefox's improvement with scrolling pages.
Apps still take a few seconds to load the first time, as noted by the users before me have pointed out, but the aftereffects of better swappiness can benefit you.
 
Old 04-25-2007, 10:36 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,746

Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
The delay is probably caused by module-loding (the huge kernel is all statically compiled). Then with caching time and library linking time(also maybe slower since ldconfig has to figure which kernel series you are using to link the proper libs...
 
  


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
Can not launch new apps dtconnor Suse/Novell 9 02-10-2007 01:40 PM
some apps opening after a few minutes delay 666 Debian 6 08-21-2006 09:25 AM
Mouse clicking has slight delay Seffius Linux - Hardware 8 07-16-2006 03:39 PM
KDE + aRts: Delay, but only after using certain apps. Gold Yo Linux - Software 1 07-25-2005 08:17 PM
Menu troubles: apps do not launch; unable to add apps hfinger Mandriva 1 08-22-2003 04:49 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration