Unix Technical Forum

Delay starting applications (take 2)

This is a discussion on Delay starting applications (take 2) within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Howdy all. (Sorry for the previous two posts. Scripting problem with jed which I fixed.) Strange problem when launching ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 08:47 PM
Adam L.
 
Posts: n/a
Default Delay starting applications (take 2)

Howdy all.

(Sorry for the previous two posts. Scripting problem with jed which I fixed.)

Strange problem when launching apps from the console and X11. There is a
long delay before the application is displayed. Here are the specs:

Dell Inspiron e1705
(Intel Core 2 T2250, 1GB RAM, nVidia 7900GS, 80GB SATA, other stock features)
Slackware 11.0
Kernel 2.6.20.7 (hand crafted)

System Notes:
Upgraded to KDE 3.5.6 via LinuxPackages, grabbed all the required libraries
listed in the slack-req files, and configured supporting apps such as
udev/hal/dsub, etc...

(Note this problem was occurring before the upgrade as well.)

A little more information on the problem. I typically boot to a straight
console. While at the console launching console apps results in a 2 - 6
second delay before the application is displayed. During this time there is
not hard drive activity. Common apps I use are jed, ircII, slrn and pine.
Also, some system services also exhibit this behavior such as loading dhcpcd and
ndiswrapper. However, smaller programs like ls, less, cat, ps, netstat,
etc... do not show any lag at all.

After the startup lag, the is no performance hit in the application.
Loading, saving and other I/O operations are all smooth sailing.

Now for X11 (running KDE 3.5.6). Typing startx results in a delay, no hard
drive activity and keyboard is not responsive in the same terminal. Around
3-4 seconds pass and X starts to load. Apps within X11 exhibit the same
behavior as the console apps. For example, FireFox will take about 3 seconds
to show. However, this only happens once. Closing FireFox and re-opening it
doesn't yield a lag. Now... If I open a console from X and launch a console
app, the lag is about twice what it is from a straight console and is always
present, even when relaunching the same app in the same console.

Quitting X11 shows the same lag. There is a black screen for about 6
seconds, not hard drive activity, then the console is displayed. It's
almost like the system is waiting for a device to wake up each time...???

I posted this problem over on LinuxQuestions.org. Got a suggestion to try
different I/O Schedulers. Tried all three in the 2.6.20.7 kerenl (CF/Q,
Anti and Dead). Even tried not using an I/O scheduler. In each case the
lag was about the same. No noticeable change resulted.

If required, I can post the kernel .config or anything else that might help
in figuring out why this delay happens. Thought someone might have
experienced this, and resolved it, so I didn't want to post a huge list of
config options.

Any ideas/suggestions?

Thanks all!

-Adam


--


My e-mail address is not that colorful.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 08:47 PM
Joost Kremers
 
Posts: n/a
Default Re: Delay starting applications (take 2)

Adam L. wrote:
[lag starting up apps]
> Any ideas/suggestions?


not really... you mention that there is no hard-disk activity for the first
few seconds. have you checked if there is cpu activity? in X you can easily
install some cpu monitor and see in real time if there is any
activity. or better yet, you can run top in one terminal window and start
your programs from another, then see what the cpu is doing those first few
seconds.


--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 08:47 PM
Grant
 
Posts: n/a
Default Re: Delay starting applications (take 2)

On Tue, 24 Apr 2007 19:21:59 GMT, "Adam L." <REDantituBLUE@BLACKmsbx.netGREEN> wrote:

>Howdy all.
>
>(Sorry for the previous two posts. Scripting problem with jed which I fixed.)
>
>Strange problem when launching apps from the console and X11. There is a
>long delay before the application is displayed. Here are the specs:
>
>Dell Inspiron e1705
>(Intel Core 2 T2250, 1GB RAM, nVidia 7900GS, 80GB SATA, other stock features)
>Slackware 11.0
>Kernel 2.6.20.7 (hand crafted)


Did you put in speedstep related stuff? Try running with performance mode.

Grant.
--
http://bugsplatter.mine.nu/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 08:48 PM
Henrik Carlqvist
 
Posts: n/a
Default Re: Delay starting applications (take 2)

"Adam L." <REDantituBLUE@BLACKmsbx.netGREEN> wrote:
> During this time there is not hard drive activity. Common apps I use
> are jed, ircII, slrn and pine. Also, some system services also exhibit
> this behavior such as loading dhcpcd and ndiswrapper. However, smaller
> programs like ls, less, cat, ps, netstat, etc... do not show any lag at
> all.


Do you find anything common to all apps that lag? Maybe they all use the
same library causing problems. You can check which dynamic libraries are
used by a program using ldd, example:

~$ ldd /sbin/dhcpcd
libc.so.6 => /lib/libc.so.6 (0x4002d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
~$ ldd /bin/ls
librt.so.1 => /lib/librt.so.1 (0x4002d000)
libc.so.6 => /lib/libc.so.6 (0x40040000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40176000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

On my old Slackware 9.1 dhcpcd seems to use even less libraries than ls,
so this might not explain the problem.

Another thing that might be worth checking is to strace a program to see
what it is waiting for, example:

$ strace ls

The above will give a lot of debugging output to stderr where you can see
all system calls that are done.

> Any ideas/suggestions?


This kind of delay sounds a bit like a DNS problem to me, but all the
applications showing the behavior does not seem to be DNS related.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc1(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 08:48 PM
Adam L.
 
Posts: n/a
Default Re: Delay starting applications (take 2)

Hello all.

First, thanks for all the suggestions and help. I finally figured it out.

Henrik was right when believing it is related to DNS. I caught something as
X11 flew by, right before the nVidia splash screen. Checked the log files
and there were a few errors about not being able to get the hostname.
dnsdomainname was also outputting the same error.

Turns out that, somehow, my /etc/hosts file got reset to the default
darkstar.net and didn't match /etc/HOSTNAME. Changed /etc/hosts back to
what it should be and all is good. Console apps, starting X11, X11 apps,
everything is launching without a delay.

It's usually something simple :-)

Thanks again!

-Adam

On 2007-04-25, Henrik Carlqvist wrote:
>
>
> "Adam L." <REDantituBLUE@BLACKmsbx.netGREEN> wrote:
>> During this time there is not hard drive activity. Common apps I use
>> are jed, ircII, slrn and pine. Also, some system services also exhibit
>> this behavior such as loading dhcpcd and ndiswrapper. However, smaller
>> programs like ls, less, cat, ps, netstat, etc... do not show any lag at
>> all.

>
> Do you find anything common to all apps that lag? Maybe they all use the
> same library causing problems. You can check which dynamic libraries are
> used by a program using ldd, example:
>
> ~$ ldd /sbin/dhcpcd
> libc.so.6 => /lib/libc.so.6 (0x4002d000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> ~$ ldd /bin/ls
> librt.so.1 => /lib/librt.so.1 (0x4002d000)
> libc.so.6 => /lib/libc.so.6 (0x40040000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x40176000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> On my old Slackware 9.1 dhcpcd seems to use even less libraries than ls,
> so this might not explain the problem.
>
> Another thing that might be worth checking is to strace a program to see
> what it is waiting for, example:
>
> $ strace ls
>
> The above will give a lot of debugging output to stderr where you can see
> all system calls that are done.
>
>> Any ideas/suggestions?

>
> This kind of delay sounds a bit like a DNS problem to me, but all the
> applications showing the behavior does not seem to be DNS related.
>
> regards Henrik



--


My e-mail address is not that colorful.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:37 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com