[comp.windows.x] Memory for Pixmaps - DEC Pmax Xcfb2 server.

keith@csli.Stanford.EDU (Neil Hunt) (10/31/89)

I am trying to build an image display window which will allow me to
show short animations by displaying a series of colour images in rapid
sucession.  Use of XPutImage is very slow (seconds or 100s of mS per frame),
so I rewrote to send all my images to Pixmaps in the server, and use
XCopyArea (10..100 times faster).  Unfortunately, after loading about
10 frames of 256x92 8 bit frames (only 235kbytes) the server dumps +Mbyte
core and quits, with no explanation.  This is is on a DECstation 3100
(Pmax) colour machine, running DEC's Xcfb2 server (11R3).

I was hoping to build a system which would run with up to say 10Mbytes
of image data stored in the server [my suntools version runs OK with 20+ M,
it just takes 10 minutes to get all the pages resident at once and everything
else swapped out properly!]

1. Any ideas for a fix? (currently I have no room for X server sources on
   my machine - otherwise I might fix the server!)

2. Is this behaviour expected on other similar machines - eg suns - where
   one might expect to see enough VM for the server to grow pertty large?

3. Are there better ways to do this within X?

Thanks,

Neil/.		Neil%Teleos.com@ai.sri.com	...decwrl!argosy!teleos!neil

PS: Is anyone out there using InterViews for working with images?  Has
anyone developed something better than InterViews Color and Raster classes?

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (10/31/89)

    I am trying to build an image display window which will allow me to
    show short animations by displaying a series of colour images in rapid
    sucession.

At MIT we've hacked together a server extension to support shared-memory
pixmaps (data shared between client and server), which results in a PutImage
having approximately the same performance as a CopyArea.  It doesn't work
across a network, of course, but it's basically about as fast as you can go.
We currently just consider it an experimental hack, sorry, no promises as
to if or when it will show up in public.

joel@pandora.pa.dec.com (Joel McCormack) (10/31/89)

The server certainly shouldn't dump core unless your swap space is
teeny, so please send me your program and I'll take a look.  You should
be running a later version of the server...UWS 2.1/Ultrix 3.1 is much better.

If you are using a local connection, XPutImage should be running fast
enough (about .9 Megabytes/second) to do okay animation.  Going over the
net, no way.  Is your DISPLAY set to ``:0''?
 
MIT has proposed an extension for a non-transparent shared memory
version of PutImage.  They are getting data rates of 5 Megabytes/second
in their sample implementation, which is about as fast as the DECStation
3100 goes.

- Joel McCormack (decwrl!joel, joel@decwrl.dec.com)

stpeters@dawn.crd.ge.COM (Dick St.Peters) (11/01/89)

> At MIT we've hacked together a server extension to support shared-memory
> pixmaps (data shared between client and server), which results in a PutImage
> having approximately the same performance as a CopyArea.  It doesn't work
> across a network, of course, but it's basically about as fast as you can go.

Under SunOS 4.0, processes on different machines can share (virtual)
memory, by mmap()'ing the same file (NFS-mounted on at least one of
the machines).  This doesn't get rid of the network bottleneck, of
course, but the kernel's paging mechanism is likely to outperform
explicit program IO.  There are all sorts of questions about
synchronization and how well coherence is maintained among two
physical memories and the file, etc., that I do not have answers to.
I've only seen this done once; it may not be practical.  However, it
certainly is interesting.

--
Dick St.Peters, GE Corporate R&D, Schenectady, NY
stpeters@dawn.crd.ge.com	uunet!dawn.crd.ge.com!stpeters