Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Certain applications take far too long to start.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Saba9
n00b
n00b


Joined: 28 Apr 2013
Posts: 12

PostPosted: Wed Feb 19, 2014 1:28 am    Post subject: [Solved] Certain applications take far too long to start. Reply with quote

I know the title to this post is pretty vague but I'm not really sure how to put it any better. On my desktop I've noticed that certain applications take far longer to start then they should, this is on a system with a quad core AMD Phenom processor, 8 GB of RAM and root on an SSD. An example of an application that takes forever to load is the rails server, it takes about half a minute for the server to start whereas on my laptop with similar specs it only takes about 5 - 10 seconds max. Another application is Firefox which takes about 45 seconds to start. I would really appreciate help with this issue. Here's the output of running Firefox with strace (strace result). Also here's my kernel config and make.conf.If any other information is necessary I am more than willing to provide it. Thanks for the help!

Last edited by Saba9 on Sat Feb 22, 2014 11:17 pm; edited 3 times in total
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Fri Feb 21, 2014 12:16 am    Post subject: Reply with quote

What are the specs for both the computers you've run firefox on. You said they were similar?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2060
Location: Near Toronto

PostPosted: Fri Feb 21, 2014 2:52 am    Post subject: Reply with quote

have you tried installing firefox-bin to see if it suffers
the same lag (at least that would give more data
on the problem)?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Saba9
n00b
n00b


Joined: 28 Apr 2013
Posts: 12

PostPosted: Fri Feb 21, 2014 4:27 am    Post subject: Reply with quote

Thanks for the response albright, firefox-bin seems to suffer from the same problem taking approximately 42 seconds to start. To put this into perspective chromium takes about a second to start. ideanl, the laptop I was referring to in my original post has a dual-core Intel Core i7 processor, 6GB of RAM, and a 5400 RPM HDD.
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Fri Feb 21, 2014 5:59 am    Post subject: Reply with quote

I would recommend comparing the strace ouputs of firefox-bin and firefox to see what is similar that might hint the problem to you. Also, try comparing those to your laptop that starts Firefox fairly quickly and that may present some differences that are notable.
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 744
Location: Here and Away Again

PostPosted: Fri Feb 21, 2014 6:52 am    Post subject: Reply with quote

I'm probably the least of an expert here, but I'd add to what has been said that what first comes to my mind: do the processes actually use any CPU/IO while doing whatever it is they're doing, or are they more like waiting for something?

Just a thought!
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Fri Feb 21, 2014 7:01 am    Post subject: Reply with quote

@ original poster do 3.12.x branch of kernels suffer from this performance problem? as i have stated elsewhere i have extreme performance issues with 3.13.x slowed to a crawl, take 10 minutes to get the mouse from 1 side of the screen to the other.
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
Saba9
n00b
n00b


Joined: 28 Apr 2013
Posts: 12

PostPosted: Fri Feb 21, 2014 7:57 am    Post subject: Reply with quote

Thanks for the suggestions!

Chiito, it seems like the programs are waiting for something as they do not use any CPU/IO.

666threesixes666 unfortunately booting from a 3.12.x kernel (3.12.8 to be precise) does not help.

ideanl, one thing I've noticed when looking at the strace output is that both these programs take a considerable amount of time on the poll system call. The rails server also ran select multiple times each of these instances timing out. Although this does seem significant I'm not sure how to use this information to identify the root cause of the problem.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9752
Location: Córdoba (Spain)

PostPosted: Fri Feb 21, 2014 9:26 am    Post subject: Reply with quote

Saba9 wrote:
Thanks for the suggestions!

Chiito, it seems like the programs are waiting for something as they do not use any CPU/IO.


It could be network related as well. Double check your /etc/hosts, just in case. If you are using any kind of firewalling that's something to check as well. Also, if you have any kind of nfs, smb or sshfs volume you should check that.

I assume you already tried launching the programs from a terminal window and that there's useful output there. If you didn't, please, do so and let us know how it went.

Quote:
ideanl, one thing I've noticed when looking at the strace output is that both these programs take a considerable amount of time on the poll system call. The rails server also ran select multiple times each of these instances timing out. Although this does seem significant I'm not sure how to use this information to identify the root cause of the problem.


It could be, but strace itself can cause things like this.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
mir3x
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2012
Posts: 90

PostPosted: Fri Feb 21, 2014 2:52 pm    Post subject: Reply with quote

Maybe try with strace something like that ( trace execution time):
>> strace -o firefox.output -r firefox-bin ( or firefox, then close firefox)

and then just sort by time

>> sort firefox.output

In my case top 10 time eating calls are for firefox:

0.041032 close(48) = 0
0.045348 close(24) = 0
0.049427 close(33) = 0
0.050979 read(21, "\372", 1) = 1
0.057903 futex(0x7fd7225f56cc, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fd7225f56c8, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
0.099914 read(21, "\372", 1) = 1
0.154235 read(21, "\372", 1) = 1
0.195798 read(21, "\372", 1) = 1
0.266783 read(21, "\372", 1) = 1
0.278616 recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\n\0O\10y\0\200\5\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 128
0.367223 recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\241 V\nx\0\200\5)\1\0\0'\1\0\0\337\224\20\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 64
0.516624 read(21, "\372", 1) = 1

When u compare your output you might guess whats wrong
_________________
Installation aborted to prevent system self-destruction
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2060
Location: Near Toronto

PostPosted: Fri Feb 21, 2014 3:03 pm    Post subject: Reply with quote

do you have ipv6 enabled?

somewhere on the internet it was suggested:

Quote:
Just go to about:config and set network.dns.disableIPv6 to true

_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
mubai
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Sweden

PostPosted: Fri Feb 21, 2014 7:23 pm    Post subject: Reply with quote

Saba9,
do you have any add-ons enabled? If so, could you try to disable all of them and see what happens? I noticed a slow down due to AdBlocker, and thought it could be related.
Back to top
View user's profile Send private message
Artux
n00b
n00b


Joined: 21 Feb 2014
Posts: 4

PostPosted: Sat Feb 22, 2014 5:38 pm    Post subject: Reply with quote

If the hdd led works all the time of the apps load then you might need to defragment or preload.
Back to top
View user's profile Send private message
vaxbrat
Guru
Guru


Joined: 05 Oct 2005
Posts: 510
Location: DC Burbs

PostPosted: Sat Feb 22, 2014 7:26 pm    Post subject: dns config might do it Reply with quote

I haven't seen it mentioned here yet, but a misconfigured /etc/resolv.conf will often cause this. It's one of the first things I look for when performance seems to go into the toilet. Any call that needs to do a host lookup will timeout while DNS tries to contact a server. If your primary is down, there's a builtin timeout before it moves on to the secondary and then tertiary server. It's on the order of seconds for each timeout. The lookup will look at /etc/hosts before going to DNS and those entries will always trump whatever DNS would have returned.
Back to top
View user's profile Send private message
Saba9
n00b
n00b


Joined: 28 Apr 2013
Posts: 12

PostPosted: Sat Feb 22, 2014 11:16 pm    Post subject: Reply with quote

vaxbrat, you are absolutely correct. I edited my resolv.conf to use Google's DNS instead of my router and now all previously mentioned applications start quickly. Thanks for the help everybody!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum