User: Password:
|
|
Subscribe / Log in / New account

Google releases Neatx NX server

Google releases Neatx NX server

Posted Jul 24, 2009 22:38 UTC (Fri) by dlang (subscriber, #313)
In reply to: Google releases Neatx NX server by MattPerry
Parent article: Google releases Neatx NX server

the biggest problem with X is that it frequently takes a _lot_ of round trip messages to do standard things. each application that starts needs to do these same things, and each different display that you connect to may give you different answers

on signficant thing that NX does is to provide a local server to act as a proxy for these sorts of things, if it knows the answers already it provides them without having to actually go and ask the display.

'fixing the X protocol' to do the same thing would end up looking very similar, a local daemon that local applications think is their display, that then remembers the answers from prior requests.

you can't eliminate these calls without eliminating backwards compatibility, and so far nobody has been willing to do that.


(Log in to post comments)

Google releases Neatx NX server

Posted Jul 26, 2009 4:10 UTC (Sun) by sbergman27 (guest, #10767) [Link]

"""
the biggest problem with X is that it frequently takes a _lot_ of round trip messages to do standard things.
"""

True. Watching an X session over a dial up modem (external, with tx/rx lights) is quite interesting. Not only are there a lot of round trips, but it appears that everything happens in serial fashion with only one request or response in the pipe at any given time. In the modem's LEDs you can clearly see "request, response, request, response, request, response...".

Many people think that X needs bandwidth. It actually isn't such a bandwidth hog. Others correctly point out the round trip issue. But rarely have I heard anyone comment upon the serialized nature of the protocol. And that looks like the real performance killer to me. At least over any sort of WAN. At Ethernet latencies it's likely not a problem at all.

Google releases Neatx NX server

Posted Jul 26, 2009 9:28 UTC (Sun) by njs (guest, #40338) [Link]

When people complain about X and round trips, it's the serialization issue that they're talking about. No-one cares if there's *one* round trip between a user action and a visible response (or if they do, there's nothing that could be done about it anyway), it's the fact that you have to wait for one response before you can make the next request that turns round-trip latency into your bottleneck.

That's why relatively crude protocols like VNC can completely outclass X -- sure, now you're stuffing giant blocks of pixels down the network pipe and taking way more bandwidth, but those giant blocks of pixels have no dependencies -- so instead of waiting around all the time, you can just saturate the pipe. (rsync uses a similar strategy; see also pipelined SMTP, IMAP, HTTP, ...)

Google releases Neatx NX server

Posted Jul 26, 2009 17:38 UTC (Sun) by elanthis (guest, #6227) [Link]

It's my understanding that X itself doesn't require a ton round trips but that xlib (the X library) requires round trips. That was one of the main reasons why XCB was written, and why toolkit authors are encouraged to drop xlib and use XCB for the X backends.

Google releases Neatx NX server

Posted Jul 26, 2009 18:58 UTC (Sun) by sbergman27 (guest, #10767) [Link]

That bit about xlib and the libraries built upon it reminds me of something that my Dad told me once about how he and my mother decorated the rooms in our family's lake cabin back in 1957. He said that they'd take the first thing they put in... say some curtains... and then for the next thing they'd match the color to that. And then for the next thing, they'd match the colors of that and/or the first thing. And by the time they finished they had a whole room whose decorative scheme was completely based upon one insigificant thing which they didn't really like all that much anyway.

Google releases Neatx NX server

Posted Jul 27, 2009 9:34 UTC (Mon) by PO8 (guest, #41661) [Link]

It isn't just Xlib. X apps as well as Gnome/Gtk and KDE/Qt make a lot of gratuitous round trips also. XCB does make it easier to hide the latency of those round trips, but somebody still has to do the work to implement this. Keith Packard showed a few years ago that enough latency could be removed to make X work over reasonably high-latency links without doing anything particularly special to the X protocol. However, AFAIK no one ever aggressively went after this; there seems to be just a limited amount of energy to care about high-latency links in 2009. A proxying solution like NX can perhaps help to tackle the problem with less effort than optimizing the X client side, serving as a stopgap until everybody's latency is so low that no one cares anymore.

Very bad idea

Posted Jul 27, 2009 12:31 UTC (Mon) by khim (subscriber, #9252) [Link]

A proxying solution like NX can perhaps help to tackle the problem with less effort than optimizing the X client side, serving as a stopgap until everybody's latency is so low that no one cares anymore.

Latency will never go away. That's just fact of life. Speed of light is 300'000km/sec and Earth 40'000km thus minimum possible worst-case latency is 130ms. In reality it can be somewhat reduced by using few datacenters (like Google does), but it can not be reduced to make remote usage of X server "in the cloud" possible...

Very bad idea

Posted Jul 27, 2009 23:16 UTC (Mon) by marcH (subscriber, #57642) [Link]

> Speed of light is 300'000km/sec...

... in vacuum. In fiber or electrical cables, it is typical 200,000. That's 5 milliseconds per 1000km. Multiply by two to get the round trip time, and multiply once again by (typically) two to account for buffering in processing in active network nodes.

Very bad idea

Posted Jul 31, 2009 23:24 UTC (Fri) by sbergman27 (guest, #10767) [Link]

Why run a 40,000km cable when you could just run a 3 foot cable the opposite direction?

Very bad idea

Posted Aug 1, 2009 9:59 UTC (Sat) by modernjazz (guest, #4185) [Link]

Well, those of us who live on Neptune don't think that solution will work
for us.

Sorry, bad math

Posted Aug 2, 2009 4:40 UTC (Sun) by khim (subscriber, #9252) [Link]

Why run a 40,000km cable when you could just run a 3 foot cable the opposite direction?

If you'll use 3 feet cable you'll be 20'000km from destination. You get 40'000km when two points are antipodes: it does not matter which way you'll go it's 20'000km one way and then 20'000km another way - direction is irrelevant. The only way to reduce distance is to burrow a hole and the depeest hole known to a man (less then 15km) does not shrink the distance all that much...

Sorry, bad math

Posted Aug 6, 2009 16:32 UTC (Thu) by phanser (guest, #60087) [Link]

40000 km is earth circumference,
see http://en.wikipedia.org/wiki/Earth

Exactly!

Posted Aug 9, 2009 12:12 UTC (Sun) by khim (subscriber, #9252) [Link]

The device capable of burrowing straigh through Earth? I know few guys who'll pay BIG BUCKS for such thing - where are selleing it?

And if you are not selling then the only way to go to the antipode is along the Earth surface - so yes, 40'000km (give or take) is shortest path available...

Exactly!

Posted Aug 13, 2009 19:46 UTC (Thu) by hummassa (subscriber, #307) [Link]

Come, on, you are being thick. 40000km is the CIRCUMFERENCE of the earth, ie, the distance you walk if you wanna make a FULL circunavigation.

The distance between antipodes is half that - 20000km ALONG THE EARTH SURFACE. It would be ~12000km thru the center of the Earth.

Exactly!

Posted Aug 13, 2009 19:58 UTC (Thu) by johill (subscriber, #25196) [Link]

And if your two machines are at antipodes, then your latency is the round trip, which will be ~40Mm.

Google releases Neatx NX server

Posted Jul 29, 2009 8:54 UTC (Wed) by michaeljt (subscriber, #39183) [Link]

Since Xlib clients can switch to XCB painlessly using xlib-xcb (was that the name?), it should be pretty simple to optimise Qt and Gtk+ using XCB functionality where the round trip time is a problem. The fact that no one has done this suggests to my mind that it is not a problem for many people.

Google releases Neatx NX server

Posted Jul 29, 2009 17:59 UTC (Wed) by dlang (subscriber, #313) [Link]

it's not a problem for the vast majority of people.

the vast majority of people only use X on a local machine and never touch the network

this is especially true for developers.

it's also true that most people have no problem with the bloat of current desktop software because they run on recent machines that are fast and have lots of ram.

in both cases this doesn't mean that there isn't a problem, and that fixing the problem wouldn't improve things for everyone with drastic improvements for some users (possibly drastic enough to open an entire new category of use), bit just means that unless it's pointed out to people and they are encouraged to _try_ the use-cases that have problems they will never notice them.

personally I suspect that the linux desktop bloat had some impact on the weak showing of linux on netbooks. most linux distros and desktop environments really want more resources than a netbook has. Linux can run fine on that sort of hardware (I know, I used much lesser hardware for many years), but the current crop of desktop environments really don't care about resource use.

Google releases Neatx NX server

Posted Jul 29, 2009 19:38 UTC (Wed) by michaeljt (subscriber, #39183) [Link]

The idea is that tools like powertop and latencytop spur people into action over this sort of thing. So what is the tool for measuring the sore spots in an applications use of Xlib, so that those parts can be replaced with direct use of XCB?

Google releases Neatx NX server

Posted Jul 29, 2009 20:46 UTC (Wed) by dlang (subscriber, #313) [Link]

the easy thing here would be to have a developer use X over a network and introduce artificial latancy to the connection (which I believe can be done via iptables commands)

if you add a fraction of a second latency you shouldn't notice it for most things, but if you see points in your code start taking significantly more time they are dong many serialized round trips.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds