[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3189.0. "Performance problems using XPutImage on DS5000 with 2D Accelerator Board" by XLIB::MARSON () Thu Aug 09 1990 14:55

I have a client who is porting an application to the DS3100 and DS5000 both of
which are running ULTRIX 4.0 rev 174 UWS rev 163.

He is calling XPutImage to fill 5 512x512 by 8 planes pixmaps.  He fills the
pixmaps ONE line at a time.

If he mixes his calls between pixmaps (1,3,5,4,2,3,4, ...) on the DS5000 (which
has a 2DA board) then performance gets unbearable.  What should take 8-10
seconds takes 5 minutes.  If he fills each pixmap in sequence (1,1,...2,2,...)
then everything is OK.  His questions are:

Is there a problem with the server or possibly his board (or design of the
board) ?  The problem does not occur on a DS3100 with a CFB display.  The
problem does not occur when the DS5000 uses the DS3100 as a display server.

His code is dependent on the ability to switch between different pixmaps a lot.

Can someone help me on this?

thanks,
barry marson (XLIB::MARSON)
T.RTitleUserPersonal
Name
DateLines
3189.1GILROY::kleeKen LeeMon Aug 13 1990 16:0740
This is a reply from Paul Jensen (decwse::jensen).  Please followup directly to him.

This is not a bug, but a "feature".  The PX, PXG, and PXG-turbo
options all accelerate graphics by having special rendering chips
connected in a highly parallel fashion to one of two special
memories: a 1280x1024 frame buffer mapped to the display monitor,
and 1 to 3 1280x1024 offscreen memory buffers.  The PX has only
one offscreen buffer, where all drawing to pixmaps must occur.
Because the number of pixmaps supported by X can easily exceed
the capacity of offscreen memory, an offscreen memory allocator
is needed to manage this scarce resource.  The problem you
are encountering is that by writing to several pixmaps, you are
inducing thrashing: pixmaps are continually being brought into
offscreen memory from system main memory, in the process
displacing other pixmaps which must be written back to main memory.

Unfortunately, this behavior is intrinsic to both the architecture
(rendering to dedicated, specially configured memory) and the
implementation (inadequate bandwidth between main memory and
the frame buffer).  The only workaround is to either limit the
number of pixmaps to what will simultaneously fit in offscreen
memory; or to draw as much as possible to a pixmap before going
on to the next one.  If you chose the former option, you will be
limited to two 512^2 pixmaps.  Note that this is not guaranteed
however: two dimensional pixmap allocation is equivalent to the
(NP-complete) bin packing problem: the storage allocator trys
to be intellegent about placing pixmaps, but it doesn't always
succeed.  You may be interested in reading a white paper I have
written describing the differences between the cfb & 2da.  It
may be copied from basalt::/udir/jensen/pub/3max/2da.ps.
You make take some solace from knowing that the h/w designers of
the 2da/3da have been beaten up pretty savagely over this.

Regards,


				/Paul Jensen
				(2da gfx software developer)