-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Viewer: Re-investigate multi-threaded decoding #60
Comments
I ported the TurboVNC benchmark feature into both the TigerVNC 1.6.0 viewer code and the evolving TigerVNC 1.8 pre-beta viewer code (refer to https://github.com/dcommander/tigervnc/tree/benchmark and https://github.com/dcommander/tigervnc/tree/1.6-benchmark). Testing with that code produced mixed results. On Linux (2011 Dell Precision T3500, quad-core 2.8 GHz Xeon W3530, nVidia Quadro K5000, CentOS 6.8), the breakdown in decoding time is as follows. Total time (decoding + blitting) is in parentheses.
On Windows (2011 Dell Precision T3500, quad-core 2.8 GHz Xeon W3530, nVidia Quadro K5000, CentOS 6.8), the breakdown in decoding time is as follows. Total time (decoding + blitting) is in parentheses.
On Mac (2015 Mini, dual-core 3 GHz Core i7, Intel Iris, OS X 10.10.5), the breakdown in decoding time is as follows. Total time (decoding + blitting) is in parentheses.
Significant, albeit sublinear, speedup was achieved on all of the 3D datasets. The 2D datasets were a mixed bag:
I also added the aforementioned benchmark feature to the Java TigerVNC Viewer, since that viewer has a similar multithreaded decoding feature that we could potentially borrow (with some integration effort, since the Java TurboVNC Viewer forked from the Java TigerVNC Viewer five years ago.) Unfortunately, in the case of the Java TigerVNC Viewer, the overall decoding performance has regressed more than 3x relative to TigerVNC 1.6.0, even with a single thread, and enabling multithreading slows things down even further. It appears that, at least algorithmically, there is some promise to TigerVNC's multithreaded decoding approach, but it currently seems to be too sensitive to the overhead of the underlying thread/locking implementation. |
Pushed to TurboVNC 2.3 |
This won't make it into TurboVNC 3.0, unfortunately, due to lack of time and funding. |
New results from TigerVNC 1.11 are pretty similar to the results from TigerVNC 1.8 (multithreading is still a mixed bag): |
I spent numerous hours researching this topic in 2010, around the same time that I was developing multi-threaded encoding in the TurboVNC Server (under contract with RSV.) You can even see my commits related to this:
c557fd7
5df1680
778be33
4758068
At the time, I found that it wasn't possible to increase the viewer's performance significantly by employing a tile-based round-robin approach such as is being used by the latest TigerVNC Viewer, but it's worth re-opening that topic. It's unclear whether their claims for improved performance are measured at the low level or whether they include the whole viewer. I personally found that it was more efficient to do what we're currently doing, which is to do all of the decoding in one thread and all of the blitting in another. My benchmark extensions to the TigerVNC Viewer should provide a more thorough picture, though. If there is some advantage to their approach, then it should be straightforward to adopt it in our Java viewer, at least.
The text was updated successfully, but these errors were encountered: