所以我创build了一个简单的文件,ab.htm,里面只有“test”。
ab -n 1000 -c 10 http://www.domain.com/ab.htm
给我15400req /秒
和
ab -n 1000 -c 10 https://www.domain.com/ab.htm
给我390req /秒
如果我加上-k Keep-Alive标志,它会回到〜10,000。 但是,这不是一个解决scheme,如果我得到1000个并发用户,他们不会共享相同的连接…
这是一个4GB的Centos 6 VPS,nginx 1.5.6。
我也尝试过1,100和1000的并发,得到了类似的结果。
我期待它慢一些,但不是太慢一点….这是正常的,还是有一些可怕的错误? 如果这是正常的,我可以做些什么来改善这种情况 – 我认为更弱的密码等等?
是的,我明白这只是这个难题的一小部分,与脚本和数据库加载相比,这是相当微不足道的。 但是,至less我想知道这是正常的。
谢谢
附加信息:
版本等:
uname -a
Linux 2.6.32-358.18.1.el6.x86_64#1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64 x86_64 x86_64 GNU / Linux
openssl version
OpenSSL 1.0.1e 2013年2月11日
nginx -V
nginx版本:由gcc构build的nginx / 1.5.6 4.4.7 20120313(Red Hat 4.4.7-3)(GCC)启用了TLS SNI支持configuration参数:–prefix = / etc / nginx –sbin-path = / usr / sbin / nginx –conf-path = / etc / nginx / nginx.conf –error-log-path = / var / log / nginx / error.log –pid-path = / var / run / nginx.pid –http-log-path = / var / log / nginx / access.log –lock-path = / var / run / nginx.lock –http-client-body-temp-path = / var / cache / nginx / client_temp –http-proxy-temp-path = / var / cache / nginx / proxy_temp –http -fastcgi-temp-path = / var / cache / nginx / fastcgi_temp –http -script -temp path = / var / cache / nginx / scgi_temp –http-uwsgi-temp-path = / var / cache / nginx / uwsgi_temp –user = nginx –group = nginx –with-http_ssl_module –with-http_realip_module –with-http_addition_module – -with-http_sub_module –with-http_dav_module –with-http_flv_module –with-http_mp4_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_random_index_module –with-http_secure_link_module –with-http_stub_status_module –with-mail – -with-mail_ssl_module – with-file-aio –with-http_spdy_module
预计会出现明显的放缓,但是300 rps太慢; 我最近做了一些testing,这些都是我的结果,给你一些数字和关系:
你需要做什么:
390 / RPS我期望从Apache … SCNR 🙂