[FreeNX-kNX] NX server performance

Fabian Franz FabianFranz at gmx.de
Fri Mar 14 10:59:48 UTC 2008


> In the ongoing quest to figure out an appropriate solution for integrating
> VirtualGL with NX that achieves decent performance and usability, I've
> been
> conducting an in-depth performance analysis of nxagent 3.1.0.  For those
> who
> don't know the back story, VirtualGL redirects 3D rendering from an OpenGL
> application to a dedicated rendering device and captures the 3D output as
> a
> video stream.  From the point of view of nxagent, VirtualGL is basically
> just like a video player, sending a continuous stream of large (1-2
> Megapixel) XShmPutImage() requests.

Why do you use XShmPutImage? Perhaps with a normal PutImage you would be more successful?

> My analysis shows that the frame rate in NX is primarily being limited by
> nxagent, and furthermore, it seems to be limited because nxagent spends
> literally half of its CPU time in two functions:  md5_process() and
> fbBlt().

> The rest of nxagent's time is spent doing JPEG compression, which is what
> I
> would expect.
> 
> So, a couple of questions:
> 
> -- Can anyone tell me whether the NX protocol does MD5 analysis on all
> data
> that is sent to the client?  If so, is there a way to bypass this?  That
> would explain the time spent in md5_process().

No idea, but I guess it could come from nxcomp or nxcompext library.

> -- Does anyone know why fbBlt() would be called so often?  It appears that
> about 80% of the calls to fbBlt are with the following stack:
> 
> fbShmPutImage -> ProcCopyArea -> damageCopyArea -> nxagentCopyArea ->
> fbCopyArea -> fbDoCopy -> fbCopyRegion -> fbCopyNtoN -> fbBlt
> 
> whereas the other 20% are with various other stacks leading back up to
> fbShmPutImage().  However, the odd thing is that it appears that fbBlt()
> is
> called a total of 3 times on every image that is passed into
> fbShmPutImage().  fbBlt() seems to be unchanged relative to the X.org code
> base, but after examining the code, I'm still not sure what the function
> is
> supposed to do or why it would be called multiple times.

No real idea ... Might be that the damage extension here igves more harm than use? Tried to disable it: -ext -damage on cmdline.

Best Regards,

Fabian



More information about the FreeNX-kNX mailing list