使用ab命令做网站压力测试

  • A+
所属分类:运维教程

在这里我们以本站为例,模拟一下10个人同时请求100次的效果。

输入命令:

  1. ab -n 100 -c 10 https://birdteam.net

这里-n表示请求数,-c表示并发数。

执行效果如下:

使用ab命令做网站压力测试

 

还有一些数据:

使用ab命令做网站压力测试

强烈建议尽量在网站空闲时执行上面命令,且设置的数值尽量不要太大,以免影响正常访客浏览。

 

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:12   其中:访客  12   博主  0

    • avatar company website

      This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you (not that I actually would want…HaHa). You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!

      • avatar this link

        You really make it seem so easy with your presentation but I find this matter to be really something which I think I would never understand. It seems too complex and very broad for me. I am looking forward for your next post, I’ll try to get the hang of it!