appache ab测试高并发
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测试高并发的更多相关文章
- linux webbench测试高并发方法
linux webbench测试高并发方法由于ab小工具 测试高并发 会出错 具体原因http://newmiracle.cn/?p=594所以采用webbench这个来测试<pre> w ...
- Thinkphp5 用ab压力测试工具测试高并发请求
上篇文章[Thinkphp5实现悲观锁]已介绍过thinkphp5使用悲观锁实现高并发的场景,这篇文章将实际测试下. 在shell里进入到apache的bin目录,输入以下url: ab -n 100 ...
- ab测试大并发错误
转载自http://xmarker.blog.163.com/blog/static/226484057201462263815783 apache 自带的ab工具测试,当并发量达到1000多的时候报 ...
- Java高并发测试框架JCStress
前言 如果要研究高并发,一般会借助高并发工具来进行测试.JCStress(Java Concurrency Stress)它是OpenJDK中的一个高并发测试工具,它可以帮助我们研究在高并发场景下JV ...
- 利用Redis锁解决高并发问题
这里我们主要利用Redis的setnx的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当前键存在 ...
- 利用 Redis 锁解决高并发问题
这里我们主要利用 Redis 的 setnx 的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当 ...
- Linux下解决高并发socket最大连接数所受的各种限制(解除IO限制)
linux作为服务器系统,当运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立到3800左 ...
- Linux下解决高并发socket最大连接数限制,tcp默认1024个连接
linux作为服务器系统,当socket运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立 ...
- C#实现请求唯一性校验支持高并发
使用场景描述: 网络请求中经常会遇到发送的请求,服务端响应是成功的,但是返回的时候出现网络故障,导致客户端无法接收到请求结果,那么客户端程序可能认为判断为网络故障,而重复发送同一个请求.当然如果接口中 ...
随机推荐
- 一、深入学习c++先要练好的内功
掌握进程虚拟地址空间区域的划分 课程讲的内容建立在x86 32位的Linux系统下. 任何的编程语言会产生两种东西:指令和数据.磁盘上的可执行文件在启动时都会加载到内存当中,但是不会加载到物理内存中, ...
- vue生命周期加载顺序
1.beforeCreate(创建前)表示实例完全被创建出来之前,vue 实例的挂载元素$el和数据对象 data 都为 undefined,还未初始化.此钩子函数不能获取到数据,dom元素也没有渲染 ...
- CMake进行C/C++开发(linux下)
开发环境配置 安装GCC,GDB sudo apt update # 通过以下命令安装编译器和调试器 sudo apt install build-essential gdb 安装成功确认 # 以下命 ...
- einsum函数介绍-张量常用操作
einsum函数说明 pytorch文档说明:\(torch.einsum(equation, **operands)\) 使用基于爱因斯坦求和约定的符号,将输入operands的元素沿指定的维数求和 ...
- Typora使用手册(小白入门级)
Typora软件的简单使用 1.简介 Typora是一款支持Markdown语法的文档编辑器 特点:功能强大.画面极简. 下载地址:https://typoraio.cn/ 2.基础设置 偏 ...
- 中国天气api接口xml,json
http://m.weather.com.cn/data/101110101.html 大坑有木有??反应慢不说了,还老不更新!! 想贴段代码的,现在又打不 开了(貌似3月4号以后没更新过) ==== ...
- ACM-由数据范围反推算法复杂度以及算法内容
一般ACM或者笔试题的时间限制是1秒或2秒. 在这种情况下,C++代码中的操作次数控制在 \(10^7\) 为最佳. 下面给出在不同数据范围下,代码的时间复杂度和算法该如何选择: 数据范围 算法选择 ...
- ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)
一.修改配置文件config-sharding.yaml,并重启服务 # # Licensed to the Apache Software Foundation (ASF) under one or ...
- rhel挂载本地光盘为yum源
挂载光盘 mount /dev/sr0 /mnt/cdrom mkdir /mnt/cdrom 临时挂载 mount /dev/sr0 /mnt/cdrom 永久挂载光盘 mount -a 执行挂载 ...
- Redis开机自启
添加开机启动服务 vi /etc/systemd/system/redis.service 在redis.service中输入以下内容 ps:ExecStart配置成自己的路径 [Unit] Desc ...