On Sun, Feb 20, 2011 at 06:27:02PM +0100, Martin Koegler wrote:
> I did some profiling:
> 
> With TLS, the vncviewer hot spots are:
> * ~23% in libgcrypt
> * ~14% in the jpeg code
> * ~14% again in the jpeg code
> 
> With TLS, the Xvnc hot spots are:
> * 17.4% in zlib
> * 14.3% libcrypt
> * 13% rfb::ComparingUpdateTracker::compareRect
> * 12% in the jpeg code

gnutls itself is not performance relevant - the noticeable overhead of
using TLS is computing SHA1 hashes as well as AES de-/encryption in libgcrypt.

The client spends:
* 15% AES decryption
* 4.6% SHA1
[for comparison: ~30% in the jpeg code]

The server spends:
* 9.3% AES encryption
* 3.2% SHA1

for comparison: 
* 25% in the jpeg code
* 14% zlib [not TLS related]
* 10% ComparingUpdateTracker::compareRect
* 10% memcpy [a lot of calls caused by ComparingUpdateTracker::compareRect]

Comparing SSH Tunneling with TLS, SSH Tunneling is probably faster because:
* OpenSSL has (better) optimized algorithmns then libgcrypt:
  AES/SHA1 implementations in libgcrypt are in C. 
* Xvnc is single threaded:
  SSH tunneling moves the encryption to a second 
  process allowing Xvnc doing more of its remaining tasks. 

Starting with libgrypt 1.4.5, the SHA1 speed should have been improved
[I'm testing with 1.4.5]. AES in 1.5.0 should support the AES-NI
instructions from Intel, so on such processors it will be faster.

Regards,
Martin Kögler

PS:
Why does the trace/error infrastructure of libjpeg puts all parameters
for formating the message into a structure and then calls via a
pointer a functions (emit_message), which determines, if the message
should be printed?

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to