trb@ima.isc.com (Andrew Tannenbaum) (02/27/91)
What could be better than having an UNIX system with X all to yourself? In my office, most folks have their own 25 MHz 386 UNIX machines, each with one X display head and full independent system configurations, disk, tapes, ethernet, etc. (We have nfs, but that isn't relevant to this discussion.) We start up X servers on our own machines, and run our clients on our own machines, except we rsh xterms on other machines when we need to login remotely, or if we have other special needs for other machines. I got to thinking that if you have an X terminal with the same CPU power as your X client machine, that you are actually better off sharing the compute and display load between the two CPU's. I then decided that it might be a good idea to go to my pal in the next office, who has an identical workstation box to mine, and say: I'll trade you workstation boxes, we'll keep our X display heads. You then run your X server on the machine sitting next to you (my machine), and all your clients on the machine sitting next to me (your machine) and I do likewise. That way, when an X client and its companion X server go output bound, they are sitting on two different machines, and the load is shared. As far as your user interface is concerned, it should be practically identical to the way it was before, since everything is on your own machine except the display. My own X use leans heavily on xterm - I prefer termcap oriented interfaces to the X clients I know of to talk to shells, edit files and read mail and news. This means scrolling and character painting are a bottleneck (see below). I am already convinced that a remote xterm pointing at a local X server is much faster and more efficient than a local X server and local xterm and a telnet to the remote site. (You wouldn't believe the arguments I've had about this point!) Trying a simple test, when I scroll on a remote xterm with local display, it's about 50% faster than on a local-only xterm: I cat'd three /etc/termcaps, each 89500 bytes, and it took 73 seconds vs. 48 seconds wall clock time. 45 seconds of this is X server CPU time (from a ps listing) in both cases - the rest is mostly kernel pty i/o time, I suspect. (I ran the same cat to a file to strengthen this suspicion.) I know that there are risks to sharing machines, one crash affects two users, or your buddy might be eating your cpu with his X server, or you might want your machine sitting at your side. If your net is saturated, this could cause problems too. N people can share N machines in various configurations, I leave it to you to work out the graph theory and statistics about how the community is effected by crashes. Yes, I realize that there are various ways of distributing resources from diskless machines to X terminals to various multiprocessor configurations, but this sounds like a simple flexible improvement for people without a more elegant networking scheme than an ethernet (or whatever) - no nfs necessary, no multiprocessors, no kernel hacks, etc. Just a couple of UNIX X workstations. How much of an improvement does this hack provide? Well, it makes long cats 50% faster - in general, it speeds and smooths terminal output when it gets a little jerky - isn't that what you want? For really small operations, it might be slower to go across the net. If you are generating huge amounts of server work with teeny amounts of remote impetus then the wire might be an impediment, but I don't believe that that's typical either. I've never heard of people using this simple hack, and I was wondering why, and if no-one was, I just thought I'd share the suggestion. Andrew Tannenbaum Interactive Cambridge, MA +1 617 661 7474
mouse@lightning.mcrcim.mcgill.EDU (02/27/91)
> I am already convinced that a remote xterm pointing at a local X > server is much faster and more efficient than a local X server and > local xterm and a telnet to the remote site. This is by no means always true. I have not experimented enough to generalize, but I know of at least one instance here where it is not true (or at least a slightly changed, analogous, scenario contradicts the analogous statement). Most of our X displays are Suns, mostly SPARCstations of one sort or another, with a few -3/50s and -3/60s to keep things interesting. One of our machines is a VAX-11/750. In my experience, running a local terminal emulator with an rlogin to the VAX is significantly faster than running the terminal emulator on the VAX and having it connect to the display over the net. (The "slightly changed" is because (a) the terminal emulator isn't xterm, though it is the same on the VAX and the Sun, and (b) I tried things with rlogin instead of telnet.) Yes, I have a hypothesis to explain this, but I'm sure you can all construct your own hypotheses with no trouble, so I'll let that pass. My point is just that statements like this may be valid rules of thumb, but are not to be believed blindly. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu