ab使用范例: 
要执行 1000 次的 connection, 20 次的 concurrent (并行, 同时):

语法: ab -n 1000 -c 20 http://localhost/index.php

ab 参数:

Usage: /usr/sbin/ab [options] [http[s]://]hostname[:port]/path

Options are:

§ -n requests Number of requests to perform

§ -c concurrency Number of multiple requests to make

§ -t timelimit Seconds to max. wait for responses

§ -p postfile File containg data to POST

§ -T content-type Content-type header for POSTing

§ -v verbosity How much troubleshooting info to print

§ -w Print out results in HTML tables

§ -i Use HEAD instead of GET

§ -x attributes String to insert as table attributes

§ -y attributes String to insert as tr attributes

§ -z attributes String to insert as td or th attributes

§ -C attribute Add cookie, eg. 'Apache=1234' (repeatable)

§ -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: zop'

§ Inserted after all normal header lines. (repeatable)

§ -A attribute Add Basic WWW Authentication, the attributes

§ are a colon separated username and password.

§ -P attribute Add Basic Proxy Authentication, the attributes

§ are a colon separated username and password.

§ -X proxy:port Proxyserver and port number to use

§ -V Print version number and exit

§ -k Use HTTP KeepAlive feature

§ -d Do not show percentiles served table.

§ -S Do not show confidence estimators and warnings.

§ -g filename Output collected data to gnuplot format file.

§ -e filename Output CSV file with percentages served

§ -s Use httpS instead of HTTP (SSL)

§ -h Display usage information (this message)

appache ab测试高并发的更多相关文章

  1. linux webbench测试高并发方法

    linux webbench测试高并发方法由于ab小工具 测试高并发 会出错 具体原因http://newmiracle.cn/?p=594所以采用webbench这个来测试<pre> w ...

  2. Thinkphp5 用ab压力测试工具测试高并发请求

    上篇文章[Thinkphp5实现悲观锁]已介绍过thinkphp5使用悲观锁实现高并发的场景,这篇文章将实际测试下. 在shell里进入到apache的bin目录,输入以下url: ab -n 100 ...

  3. ab测试大并发错误

    转载自http://xmarker.blog.163.com/blog/static/226484057201462263815783 apache 自带的ab工具测试,当并发量达到1000多的时候报 ...

  4. Java高并发测试框架JCStress

    前言 如果要研究高并发,一般会借助高并发工具来进行测试.JCStress(Java Concurrency Stress)它是OpenJDK中的一个高并发测试工具,它可以帮助我们研究在高并发场景下JV ...

  5. 利用Redis锁解决高并发问题

    这里我们主要利用Redis的setnx的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当前键存在 ...

  6. 利用 Redis 锁解决高并发问题

    这里我们主要利用 Redis 的 setnx 的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当 ...

  7. Linux下解决高并发socket最大连接数所受的各种限制(解除IO限制)

    linux作为服务器系统,当运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立到3800左 ...

  8. Linux下解决高并发socket最大连接数限制,tcp默认1024个连接

    linux作为服务器系统,当socket运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立 ...

  9. C#实现请求唯一性校验支持高并发

    使用场景描述: 网络请求中经常会遇到发送的请求,服务端响应是成功的,但是返回的时候出现网络故障,导致客户端无法接收到请求结果,那么客户端程序可能认为判断为网络故障,而重复发送同一个请求.当然如果接口中 ...

随机推荐

  1. Android.mk编译App源码

    在Andriod源码环境编译APP主要考虑如何引入第三方jar包和arr包的问题,初次尝试,步步是坑,这里给出一个模板: LOCAL_PATH := $(call my-dir) include $( ...

  2. java接口多实现注入方法总结

    1. 单实现接口注入方法 1.1 构造注入(推荐) @RequiredArgsConstructor public class TestController { // 其只有一个具体的实现类 priv ...

  3. 构建第一个模型:KNN算法(Iris_dataset)

    利用鸢尾花数据集完成一个简单的机器学习应用~万丈高楼平地起,虽然很基础,但是还是跟着书敲了一遍代码. 一.模型构建流程 1.获取数据 本次实验的Iris数据集来自skicit-learn的datase ...

  4. OI中组合数学公式和定理90%歼灭

    组合数学 基础概念 加法和乘法原理 加法原理 同一步下的不同选择,可以通过累加得到方案数. 乘法原理 整个流程的方案数可以由每一步的方案数相乘得到. 有了加法原理和乘法原理,就可以解决一些没有选择导致 ...

  5. SQL语言DDL

    MySQL数据库基本操作-DDL -- ctrl+/和# :注释 -- SQL语言不区分大小写: DDL:数据定义语言: 对数据库的常用操作: -- 查看所有的数据库: show databases; ...

  6. ShardingSphere 异构迁移最佳实践:将3.5亿量级的顾客系统 RTO 减少60倍

    Apache ShardingSphere 助力当当 3.5 亿用户量级顾客系统重构,由 PHP+SQL Server 技术栈无缝转型为 Java+ShardingSphere+MySQL,性能.可用 ...

  7. php三行代码解决输入地址给出经纬度

    //获取地址经纬度坐标 public function getAddress() { $ak = 'GPIrsdfZ-UNLRP-VBBDB-V3AGK-XL5KO-5DBNY'; $address  ...

  8. java标识符 identifier

    1,标识符 --> 类名 方法名  变量名 常量名 接口名   为程序员自己命名的内容 main也是标识符但是不能修改 2, 命名规则 只能以   数字 字母(中文) 下划线 美元符号      ...

  9. Tensor的创建和维度的查看

    常见的Tensor创建方法 1,基础Tensor函数:torch.Tensor(2,2)32位浮点型 2,指定类型: torch.DoubleTensor(2,2)64位浮点型 3,使用python的 ...

  10. 关于个人全栈项目【臻美Chat】遇到的BUG以及解决方法

    项目展示: 问题总结:一.单用户重复登录设备 将每次输入的用户名与已经记录在后台的数组ar比较,如果存在则表示重复. // 生成数组var ar="";socket.on('arr ...