Solved Ubuntu 16TLS 64-bit Anyone ever experienced SUPER slow application startup times?
-
I posted it here because everything else I build (OpenGL applications specifically) runs just fine on the same Ubuntu platform. My Golang code runs fine, a test non-Qt GTK C++ application starts and works fine, and all the pre-installed Ubuntu applications start and work fine. Ubuntu forums would tell me that if the only thing not working properly is my Qt application, I should post in Qt forum... ;)
-
@VRHans In your first post you did not mention that your Qt app is starting slowly - it sounds like your Ubuntu is starting very slowly. You should formulate your questions more clearly to avoid such misunderstandings.
What Qt version do you use and how did you install it?
-
Lol, Excellent point!
Sorry everybody, I had been googling my rear off and asked the question in mid thought apparently.
Apologies!
Let me restate:. Ubuntu behaves normally in all regards except when I run my Qt application.
Launching my Qt application can take from several minutes to 30 seconds. Every other platform, including other Linux distributions, startup is instantaneous.
CPU monitoring during the long starts using top reports virtually zero CPU usage during this period. Then suddenly the app appears and everything works like normal.
Repeated starts do not shorten the startup time.
I don't want anybody spending a lot of time trying to figure this out, but I did want to know if this was something that was a known issue with Ubuntu.
I suspect the problem is somehow related to a Unity and Parallels problem .
Again, apologies @dheerendra
-
@VRHans You could try to start your app like this:
strace ./myApp
maybe you will see then where it spends all that time.
-
Well, I think it's nothing to do with Qt thankfully. My application does a lot of crypto oriented work and apparently the static initialization at startup is unable to obtain enough entropy in order to get to main() until after several minutes or (laughingly) if I generate entropy through mouse/keyboard use - faster - LOL.
I wonder if it's just a shortcoming of this particular Ubuntu/patch level. Anyhow, thanks for your time everybody! Entropy... LOL.
-
Hi
ehh, so your app is literally minutes to start up as it hanging around to
generate randomness and you can make that faster by generating events??
Are you using a so/lib or something like that?
Maybe it has issues/can be updated? -
@VRHans said in Ubuntu 16TLS 64-bit Anyone ever experienced SUPER slow application startup times?:
Well, I think it's nothing to do with Qt thankfully. My application does a lot of crypto oriented work and apparently the static initialization at startup is unable to obtain enough entropy in order to get to main() until after several minutes or (laughingly) if I generate entropy through mouse/keyboard use - faster - LOL.
I wonder if it's just a shortcoming of this particular Ubuntu/patch level. Anyhow, thanks for your time everybody! Entropy... LOL.
Given this, it's definitely nothing to do with Qt, and you would be much better posting to an Ubuntu forum or stackoverflow with your Linux code for best replies.
-
@JNBarchan Agreed, and there are several solutions to this (bind urandom/random, use rng-utils, or install haveged - which is what I do on servers.)
-
@VRHans Have you thought of putting your PC into a cup of hot tea (good source of Brownian motion)? ;-)
-
I'm more likely to /dev/random -> bind -> /guinness/nitrogen/boycott-effect ;)