Skip to content
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

rps degradation when using https. #320

Closed
cedriclecoz opened this issue Aug 17, 2015 · 1 comment
Closed

rps degradation when using https. #320

cedriclecoz opened this issue Aug 17, 2015 · 1 comment

Comments

@cedriclecoz
Copy link

Hi all,

Since a few week, the server i am running against is upping it's security, they enabled HTTPS, I have been asked to run my tests over HTTPS, to load this new 'feature'.

On Http, I have been able to load a 1000Clients at a Client per sec rate without any problem.
Once I enable Https, for the few first clients all seems well, but as clients are spawned, the spawning rate is falling.

For example when I have 20 clients running, the next one may take 3-5secs to be spawned.

Just in case, to be sure the problem is not on our server,
I did a quick locust file trying to do gets on a few public servers, which can be ddl at the following link.
https://drive.google.com/file/d/0Bwj-3cp-XeYcY19CbnFuU2VKR3M/view?usp=sharing

To launch, I use: locust -f test_https.py -H https://www.google.com.
40 clients rate: 1cl/sec
Last run I did, I saw a delay of 7 sec between clients 46 and 47

I did add a profiler to locust, the differents method of sslSockets seems to take lots of time.

ncalls tottime percall cumtime percall filename:lineno(function)
1357 37.451 0.028 37.451 0.028 {method 'read' of '_ssl._SSLSocket' objects}
92 18.705 0.203 18.705 0.203 {method 'do_handshake' of '_ssl._SSLSocket' objects}

Is it a known problem ? Maybe i am just missing a patch or something (I hope so, but...)

About my system, I have the same problem in Ubuntu or Centos7, I am running on a pyenv environment, with python 2.7.10. I am working off the following tags:

g/greenlet/greenlet-0.4.7.zip
g/gevent/gevent-1.0.2.tar.gz
W/Werkzeug/Werkzeug-0.10.4.tar.gz
M/MarkupSafe/MarkupSafe-0.23.tar.gz
J/Jinja2/Jinja2-2.7.3.tar.gz 
i/itsdangerous/itsdangerous-0.24.tar.gz
F/Flask/Flask-0.10.1.tar.gz
r/requests/requests-2.7.0.tar.gz
m/msgpack-python/msgpack-python-0.4.6.tar.gz
l/locustio/locustio-0.7.3.tar.gz
p/pyzmq/pyzmq-14.7.0.tar.gz
b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz
s/six/six-1.9.0.tar.gz

If anyone has an idea as to how I can get out of this problem, i am all ear :)

Many thanks,

Cedric.

Just in case, the full link to the profiler, if s/o can understand it better than me:
https://drive.google.com/file/d/0Bwj-3cp-XeYcWWVPWnREeWdSMkU/view?usp=sharing

@cgoldberg
Copy link
Member

Is it a known problem ?

it's not a problem, but rather the way secure communication works. There is overhead to encryption and cipher negotiation vs. sending plaintext requests. I would expect to see some level of degradation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants