[vox-tech] application greyed out

Bill Broadley bill at broadley.org
Thu Dec 2 22:14:12 PST 2010


On 12/02/2010 04:24 AM, Hai Yi wrote:
> hello All: I am using ubuntu 9.10, in a quite frequent fashion, I
> noticed that the whole UI screen of some applications just grey out
> after working a while, as if they are under heavy resource consuming
> tasks.

In my experience it's one of 2 things:
1) A poorly written application is non-responsive, doing something silly
   that takes an unbounded amount of time and locks the GUI in the mean
   time.
2) Part of an application is swapped out and takes awhile to swap in,
   in the mean time.  This is not the applications fault.

So in the first case if the network is involved (sometimes even for
localhost) a single dropped packet or a blocking DNS request can freeze
an app.  DNS related latencies can be helped by avoiding overloaded DNS
server (as ISPs often have) and/or running your own nameserver, caching
name server, or dns proxy.  Network related lags can be helped by packet
shaping (see recent thread).

The second kind of delay is best fixed by either running less (so
there's less of a load on memory), adding ram, or adding faster swap.

The good news is that problems with poorly written apps are getting
better.  Firefox has been improving it used to be TERRIBLE about DNS,
and for awhile it was bad about downloading icons for bookmarks and the
like.  Eclipse is rather heavy weight, doubly so if you have a really
large project loaded.

Chrome does seem much better threaded than Firefox.

For the app developers out there if you think the worst case performance
for something (even with a busy disk, network, or cpu) could take more
than 50ms you should put it in a separate thread.  Computers are plenty
fast for most things today, but a laggy GUI makes an application feel
slow and people's standards for responsiveness seem to be rising.

The good news is running things in other threads is becoming
increasingly easy in most environments.  Not to mention that even a
cheapie netbook has at least 2 threads these days.

> So far, this happened to Firefox and eclipse since i use them most,

Best guess is that it's memory related.  I'd run vmstat or the favorite
performance monitoring tool of your choice and watch for swapping during
the greyed out events.  I've heard eclipse developers lobby for 8GB ram
for their development desktop/laptops.   Not sure if it's really
necessary but the upgrade from 4GB on a new desktop is only $60 or so,
seems like cheap insurance.

> but very likely this is not related to any particulars. Normally I had
> to force close them, but sometime they are back to normal after a
> while.

I had this happening for awhile when I was working on memory intensive
stuff and it always came back.  Fortunately once I upgraded I've not
seen it since.


More information about the vox-tech mailing list