---
title: "性能/压力测试工具Apache ab修改系列：Part1--与Apache AB原版对比测试报告"
author: "100Continue"
date: "2012-01-07T12:31:13Z"
tags: []
categories: ["开源软件"]
slug: "apache-ab-part1-apache-ab"
draft: false
lastmod: "2012-01-07T12:42:20Z"
id: 1330920
url: "https://100continue.iteye.com/blog/1330920"
---

**一. 修改功能点：**

**a. 时间设置进行压力/性能测试 —— 详细说明参加后续Part2**

**b. 从文件中读取压力/性能测试的 url、header、cookie信息 —— 详细说明参加后续Part3**

**c. 修改原版Apache AB中的bug，由于变量越界导致的Segmentation fault —— 详细说明参加后续Part4**

 

**二. 与Apache AB原版对比测试报告：**

**a. 短连接性能测试对比，误差范围在两次测试波动范围之内，因此修改版AB与原版AB的性能数据基本一致。**

 

![QPS对比分析图](http://dl.iteye.com/upload/attachment/0061/7713/b9e6f681-eb85-344f-bd0d-e407e6596e69.jpg)

图1 QPS对比分析图

![用户平均请求等待时间](http://dl.iteye.com/upload/attachment/0061/7719/80c37965-bfc4-37cf-880a-ebd611afa1c4.jpg)

图2 用户平均请求等待时间

![服务器平均请求处理时间](http://dl.iteye.com/upload/attachment/0061/7717/99915241-c2dc-34cd-ac1f-95b8c773852d.jpg)

图3 服务器平均请求处理时间

 

![单位时间内从服务器获取的数据长度](http://dl.iteye.com/upload/attachment/0061/7715/4349046e-d848-3e91-974c-e20ce203e4cf.jpg)

图4 单位时间内从服务器获取的数据长度

 

**b. 长连接性能测试对比，修改版AB与原版AB的性能数据在某些场景存在区别。**

![QPS对比分析图](http://dl.iteye.com/upload/attachment/0061/7723/bc7b3b9c-9b26-311f-9b03-be1224c0c4e9.jpg)

图5 QPS对比分析图

![用户平均请求等待时间](http://dl.iteye.com/upload/attachment/0061/7729/8fb54073-7888-363e-bdc3-bd54516a8fbd.jpg)

图6 用户平均请求等待时间

![服务器平均请求处理时间](http://dl.iteye.com/upload/attachment/0061/7727/e376ecfa-67b8-333e-a046-415b9e552eaa.jpg)

图7 服务器平均请求处理时间

![单位时间内从服务器获取的数据长度](http://dl.iteye.com/upload/attachment/0061/7725/70a32152-a39a-3307-a546-1e1d0af7f1c4.jpg)

图8 单位时间内从服务器获取的数据长度

 

**c. 服务器CPU占用率及内存状况。**

![CPU占用率](http://dl.iteye.com/upload/attachment/0061/7736/b93ef192-7f17-34cb-ae5a-7d5409679283.jpg)

图 9 CPU占用率

![内存使用情况](http://dl.iteye.com/upload/attachment/0061/7738/714c3cb9-b17d-3506-812f-0e7a64a502bb.jpg)

图10 内存使用情况

 

 

**OK以上是本人修改过的Apahce AB与原版Apache AB的测试对比报告。欢迎拍砖。转发请备注转自：100continue.iteye.com**

 

**谢谢**