Multiple viewers of same server
James [Wez] Weatherall
jnw "at" orl.co.uk
Wed, 29 Apr 1998 10:01:57 +0000
On Tue, 28 Apr 1998, Edward Avis wrote:
> >(With just three viewers, WinVNC was using
> >almost 10 MB of RAM, with 10 viewers, the machine was swapping memory,
> >running out of virtual memory, and generally crawling)
> To me (and I know little about VNC) this seems a bit strange, after all, I
> don't see how you could need a megabyte of memory for each viewer.
WinVNC has to do a substantial amount fo work to establish which areas of
the screen need updating. It has to store a buffered copy of the screen
(~1Mb typically) to work from (this is the same as for the Unix version).
It then has to store a second copy of the screen FOR EACH CLIENT. This is
required in order to be able to check which sections have changed since
that client last requested an update.
It would be possible to reduce the per-client memory usage by keeping one
global copy of this back-buffer but this would require some logic to
ensure that changes were calculated only on demand, which is inherently
the case at present. This is something I'm looking into, though.
Finally, each client has to keep a buffer for constructing the update
messages in, which must be large enough to accomodate a full client
screen, again ~1Mb.
> Perhaps someone out there could tell us whether the Unix / X version is
> less memory-hungry?
It generally is. It eliminates the need for the back-buffer for the local
screen, since it knows precisely what has changed and needs sending. It
still has to buffer the sent data on a per-client basis, though.
> improved performance. Of course, it would be slower than a simple
> one-to-one connection, but that's to be expected.
The performance penalty would probably be quite acceptable with
appropriate tweaking of VNC's settings.
> Of course, the best solution is for somebody to write a special VNC
> multiplexer - or perhaps you could simply feed exactly the same WinVNC
> output to ten different sockets, and it might work?
Because clients may have different latencies between them and the server
and may have lower bandwidth or slower graphics hardware, any approach
that just sends the same update data to all clients is unlikely to work
James "Wez" Weatherall
Olivetti & Oracle Research Laboratory, Cambridge, UK.
Tel : Work - 343000