flask gunicorn gevent meinheld性能测试对比

测试环境:

客户端虚拟机配置:cpu:1c2t  ; os :centos 7 ;Mem:4GB

服务器虚拟机配置:cpu:2c4t  ; os :centos 7 ;Mem:4GB

测试结果:

服务端gunicorn启动命令:

gunicorn -w 2 -b 0.0.0.0:8080 run:app --error-logfile - --worker-class egg:meinheld#gunicorn_worker
gunicorn -w 2 -b 0.0.0.0:8080 run:app --error-logfile - --worker-class gevent

客户端测试命令及结果及结果:

ab -c 1000 -t 60 -r -k  "http://192.168.16.129:8080/"
项目 第一次 第二次 第三次   第四次
meinheld  8407.58  8381.33  8654.59  9152
gevent 3982.09 3991.37 4016.78 3940.36
nginx 22315.66 21962.60 21070.60 22155.88

 

猜你喜欢

转载自www.cnblogs.com/goobai/p/11220024.html