Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-28-11, 02:28 PM   #1
EricE
Registered User
 
Join Date: May 2010
Posts: 8
Default OpenGL performance degrading

We are currently developing software to render three video stream on a dual headed display. One head displays full size 1920x1080 HD video, while other head displays two HD videos, downsized in software to 960x540. OpenGL is used to render the video streams by transferring the pixels to a texture and rendering a textured quad. We are able to render all three video streams at 30 Hz without issue. However, over time we see a performace degradation to the point where we are unable to maintain rendering at 30 Hz. We also see the same performance hit when we pause the full size video stream (stop rendering to that window) for a few seconds and then unpause (continue rendering to that window). We typically see the frame rate in all three windows drop from 30 Hz down to 20-25 Hz. After timing the execution of all steps in the video pipeline, we have found that the time spent executing the drawing of the textured quad increases noticeably.

We have been able to reproduce the issue in a simple protype program which I've attached. This program simply creates three threads, each of which creates a window (one window is 1920x1080, two are 960x540), and calls a render function for each window at a rate of 30 Hz. The render function simply copies random frame data equal to the size of each window, in this case a simple solid gray frame, to a texture and draws a textured quad. A separate thread listens for keyboard input so we can pause rendering to one of the windows. We find that after pausing and unpausing rendering to the full size window, the time to render each frame increases by about 25%. This is consistent with what have observed. With additional OpenGL processing being done on the frames in our software (drawing of overlays on the video, etc.) which also slow down, the drop in performance is large enough that we can no longer maintain 30 Hz. We have tried with this with several different driver versions including 195.36.31, 256.35, and 285.05.09. The problem exists with all three drivers tested, though does not seem quite as bad on the 195 driver.

We are using a Pny Quadro FX3800 graphics card running RHEL 5.4 with the 64 bit 2.6.30.9 kernel. It is a dual headed display running in TwinView.
Attached Files
File Type: gz GL-Rendering.tar.gz (2.0 KB, 88 views)
EricE is offline   Reply With Quote
Old 11-02-11, 06:03 AM   #2
sandipt
NVIDIA Corporation
 
sandipt's Avatar
 
Join Date: Dec 2010
Posts: 260
Default Re: OpenGL performance degrading

I am able to compile this .cc file with 'g++ GL-Rendering.cc -lGL -lX11 -lboost_thread' and ran program. I found three windows will open on desktop and also prompt "Enter a window to toggle pause (0-2):". I haven't enter any input for window to toggle pause but program still continue... Can you please explain more detail reproduction steps ? If possible attach video. Do I need to configure displays in TWINVIEW before running this apps?
How to pause and unpause rendering to the full size window with keyboard ? Also attach your results.
sandipt is offline   Reply With Quote
Old 11-02-11, 07:28 AM   #3
sandipt
NVIDIA Corporation
 
sandipt's Avatar
 
Join Date: Dec 2010
Posts: 260
Default Re: OpenGL performance degrading

Here is my initial o/p :

Window 0 render: 10.03 swap: 0
Window 2 render: 2 swap: 0
Window 1 render: 2 swap: 0


I paused win 0 and o/p is :

Window 1 render: 2 swap: 0
Window 2 render: 3 swap: 0

I paused win 1 and o/p is :

Window 0 render: 10.04 swap: 0
Window 2 render: 2 swap: 0

I paused win 2 and o/p is :

Window 1 render: 2 swap: 0
Window 0 render: 10.04 swap: 0



Attached logs
Attached Files
File Type: txt my_results.txt (4.1 KB, 43 views)
sandipt is offline   Reply With Quote
Old 11-02-11, 01:55 PM   #4
EricE
Registered User
 
Join Date: May 2010
Posts: 8
Default Re: OpenGL performance degrading

Sorry for the confusion. We see the problem after executing the following steps:

1. Type 0 and hit enter to pause rendering to the 1920 x 1080 window

2. Type 0 and hit enter to unpause rendering to the 1920 x 1080 window

Prior to pausing the rendering our output looks like:

Window 0 render: 12.52 swap: 0.11
Window 2 render: 3.06 swap: 0
Window 1 render: 3.08 swap: 0.01
Window 0 render: 12.54 swap: 0.08
Window 2 render: 3.07 swap: 0.01
Window 1 render: 3.12 swap: 0.02

It takes about 12.5 ms to render to the 1920 x 1080 window and about 3 ms to render to each of the smaller windows. After resuming rendering it looks like:

Window 2 render: 4.07 swap: 0.11
Window 1 render: 4 swap: 0.15
Window 0 render: 14.26 swap: 2.12
Window 2 render: 3.99 swap: 0.09
Window 0 render: 14.11 swap: 2.17

The times have jumped to about 14 ms and 4 ms, about a 20% increase in the time to render to the three windows. I've attached the entire output of a short run of the code.

Thanks,
Eric
Attached Files
File Type: txt GL-Render.out.txt (1.3 KB, 53 views)
EricE is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:35 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.