V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
kamushin
V2EX  ›  Python

以下哪种是正确的 web 压测方式?

  •  
  •   kamushin · 2015-07-17 17:27:59 +08:00 · 3378 次点击
    这是一个创建于 3212 天前的主题,其中的信息可能已经有所发展或是发生改变。
    1. 每秒开1000个线程去fetch,不设置timeout.相当于每秒1000个新用户
    2. 开个大小为1000的线程池,保持1000的并发fetch.
    8 条回复    2015-07-18 21:46:25 +08:00
    gameboy90
        1
    gameboy90  
       2015-07-17 18:24:31 +08:00 via Android
    正确的压测不仅仅关注加压机的并发数量,更加关注被压机的connect_time, response_time, idle, io等指标
    zonghua
        2
    zonghua  
       2015-07-17 19:23:54 +08:00
    然而功能性还有很多虫。
    chinabrowser
        3
    chinabrowser  
       2015-07-18 01:51:13 +08:00 via Android
    花钱找人DDoS
    inmyfree
        4
    inmyfree  
       2015-07-18 09:56:27 +08:00
    为啥不用ab呢?
    jedihy
        5
    jedihy  
       2015-07-18 10:23:26 +08:00
    第一种方式你的客户端估计撑不过30s,栈就爆了。第二种好一些,但是个人认为应该单线程io复用如epoll的方式去做压测。
    bobai
        6
    bobai  
       2015-07-18 11:11:25 +08:00
    @chinabrowser 那和第一种有什么区别?效果应该是一样的吧?
    chinabrowser
        7
    chinabrowser  
       2015-07-18 20:28:24 +08:00
    @bobai 这个占用的资源可比第一种多多了..
    kamushin
        8
    kamushin  
    OP
       2015-07-18 21:46:25 +08:00
    @jedihy 我确实用gevent去做压测的。用的第二种。不过我觉得第二种指标上没意义。tps是按照第一种的说法来的吧,也就是所谓的每秒能做完多少事情。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2466 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:32 · PVG 22:32 · LAX 07:32 · JFK 10:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.