Size of Libgcrypt (and other libraries) and subsequent performance
Ashish Gupta
ashishg2dec at gmail.com
Wed Apr 23 11:19:20 CEST 2008
Hi,
The size of the libraries (especially libgcrypt) claimed at
http://www.gnu.org/software/gnutls/comparison.html is much lower than what
is produced by default (note, the size claimed is 367kb whereas the defaule
build for libgcrypt results in close of 1.2MB shared object). Can someone
help in understanding how these binaries were created for the Debian and how
can this much optimization be achieved?
The default build of libgcrypt (1.2MB) is relatively comparable to the size
of libcrypto (1.3MB) (used with openssl). Hence the effective load time of
the (similar) programs using both these libraries yeilds better performance
on openssl. The sample client timings as observed over itierations (taking
into account TLB) gives:
ashish at ashish-desktop:~/Atemp/SSLExamples$ time ./gnutls/client
Finished
real 0m0.294s
user 0m0.046s
sys 0m0.092s
ashish at ashish-desktop:~/Atemp/SSLExamples$ time ./openssl/client
FINISHED
real 0m0.117s
user 0m0.004s
sys 0m0.004s
The libraries linked in were as follows:
ashish at ashish-desktop:~/Atemp/SSLExamples$ ldd ./gnutls/client
linux-gate.so.1 => (0xffffe000)
libgnutls.so.26 => /usr/local/lib/libgnutls.so.26 (0xb7e55000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb7e35000)
libgcrypt.so.11 => /usr/local/lib/libgcrypt.so.11 (0xb7dc5000)
libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0xb7dc1000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c80000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7c6c000)
/lib/ld-linux.so.2 (0xb7ef1000)
ashish at ashish-desktop:~/Atemp/SSLExamples$ ldd ./openssl/client
linux-gate.so.1 => (0xffffe000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7f61000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8
(0xb7e1f000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e1a000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cd9000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7cc5000)
/lib/ld-linux.so.2 (0xb7fae000)
The necessary programs are also attached. Both the programs simply connect
to the same server over the internet and issue same queries. No
certification check is done in either.
In case I can provide more information on this please let me know.
Regards,
Ashish Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20080423/3317f3ed/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnutls_client.c
Type: text/x-csrc
Size: 2395 bytes
Desc: not available
URL: </pipermail/attachments/20080423/3317f3ed/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssl_client.c
Type: text/x-csrc
Size: 1370 bytes
Desc: not available
URL: </pipermail/attachments/20080423/3317f3ed/attachment-0001.c>
More information about the Gnutls-devel
mailing list