Hello,
trying different SSL ciphers, I can't get better performance than that
on localhost:
No SSL:
$ time curl -k http://localhost:6767/logn?lines=500 > /dev/null
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 38.6M 100 38.6M 0 0 138M 0 --:--:-- --:--:-- --:--:--
139M
real 0m0.289s
user 0m0.024s
sys 0m0.020s
With SSL SSL_RSA_RC4_128_MD5:
$ time curl -k https://localhost:6768/logn?lines=500 > /dev/null
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 38.6M 100 38.6M 0 0 10.6M 0 0:00:03 0:00:03 --:--:--
10.6M
real 0m3.647s
user 0m0.296s
sys 0m0.056s
Has someone an idea where I should look at to understand such a large
difference? For the people using SSL, do you have also such difference?
loïc
Hello,
Ok, changed the make file to add -pg then I ran a series of test.
PolarSSL is always running in debug mode. With profiling and without
debug mode:
$ time curl -k https://localhost:6768/logn?lines=500 > /dev/null
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 38.6M 100 38.6M 0 0 55.5M 0 --:--:-- --:--:-- --:--:--
55.6M
real 0m0.706s
user 0m0.340s
sys 0m0.024s
I am at 0.660 without profiling in SSL versus 0.290 without profiling
and without SSL. The diff is simple and attached. Maybe someone with
Makefile fu can figure out a way to have the debug mode for polarssl
activated only in "dev" builds.
loïc
On 2012-03-13 15:57, Loic d'Anterroches wrote:
> Hello,
>
> trying different SSL ciphers, I can't get better performance than that
> on localhost:
>
> No SSL:
>
> $ time curl -k http://localhost:6767/logn?lines=500 > /dev/null
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 38.6M 100 38.6M 0 0 138M 0 --:--:-- --:--:-- --:--:--
> 139M
>
> real 0m0.289s
> user 0m0.024s
> sys 0m0.020s
>
> With SSL SSL_RSA_RC4_128_MD5:
>
> $ time curl -k https://localhost:6768/logn?lines=500 > /dev/null
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 38.6M 100 38.6M 0 0 10.6M 0 0:00:03 0:00:03 --:--:--
> 10.6M
>
> real 0m3.647s
> user 0m0.296s
> sys 0m0.056s
>
> Has someone an idea where I should look at to understand such a large
> difference? For the people using SSL, do you have also such difference?
>
> loïc
>
>
>
--
Dr Loïc d'Anterroches
Founder Céondo Ltd
w: www.ceondo.com | e: loic@ceondo.com
t: +44 (0)207 183 0016 | f: +44 (0)207 183 0124
Céondo Ltd
Dalton House
60 Windsor Avenue
London
SW19 2RR / United Kingdom
Hi Loic,
Your patch below combined with the below patch should do the trick.
diff --git a/Makefile b/Makefile
index ade682f..15ee545 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}"
OPTLIBS="${OPTLIBS}" LIBS="${LIBS
all: bin/mongrel2 tests m2sh procer
-dev: CFLAGS=-g -Wall -Isrc -Wall -Wextra $(OPTFLAGS) -D_FILE_OFFSET_BITS=64
+dev: CFLAGS=-g -Wall -Isrc -Wall -Wextra $(OPTFLAGS)
-D_FILE_OFFSET_BITS=64 -DPOLARSSL_DEBUG_MSG -DPOLARSSL_DEBUG_C
dev: all
${OBJECTS_NOEXT}: CFLAGS += ${NOEXTCFLAGS}
On 17:05 Tue 13 Mar , Loic d'Anterroches wrote:
> diff --git a/src/polarssl/config.h b/src/polarssl/config.h
> index ea518d7..6768cd8 100644
> --- a/src/polarssl/config.h
> +++ b/src/polarssl/config.h
> @@ -136,7 +136,7 @@
> *
> * Enable all SSL/TLS debugging messages.
> */
> -#define POLARSSL_DEBUG_MSG
> +/* #define POLARSSL_DEBUG_MSG */
>
> /**
> * \def POLARSSL_GENPRIME
> @@ -357,7 +357,7 @@
> *
> * This module provides debugging functions.
> */
> -#define POLARSSL_DEBUG_C
> +/* #define POLARSSL_DEBUG_C */
>
> /**
> * \def POLARSSL_DES_C