正在加载...
分页: 2/3 第一页 上页 1 2 3 下页 最后页 [ 显示模式: 摘要 | 列表 ]

VPS性能测试 unixbench

[ 2010/08/04 23:00 | by selboo ]



[root@74-82-173-217 opt]# wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz
[root@74-82-173-217 opt]# tar zxvf unixbench-5.1.2.tar.gz
[root@74-82-173-217 opt]# cd unixbench-5.1.2
[root@74-82-173-217 unixbench-5.1.2]# make
[root@74-82-173-217 unixbench-5.1.2]# ./Run
make all
make[1]: Entering directory `/opt/unixbench-5.1.2'
Checking distribution of files
./pgms  exists
./src  exists
./testdir&
Tags: , ,

网络性能测试工具Iperf详解

[ 2009/12/13 11:41 | by selboo ]
Iperf是一个网络性能测试工具,也就是LINUX网速测试,主要应用于LINUX服务器下面。可以测试TCP和UDP带宽质量,可以测量最大TCP带宽,具有多种参数和UDP特性,可以报告带宽,延迟抖动和数据包丢失。Iperf在linux和windows平台均有二进制版本供自由使用。

下载地址:
http://downloads.sourceforge.net/project/iperf/iperf/2.0.4%20source/iperf-2.0.4.tar.gz?use_mirror=nchc

Iperf使用方法与参数说明

参数说明
-s 以server模式启动,eg:iperf –s 。Server端为数据的接收端。
-c host以client模式启动,host是server端地址,eg:iperf -c 222.35.11.23 。Client端为数据的发出端。

通用参数
-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位,eg:iperf -c 222.35.11.23 -f K
-i sec 以秒为单位显示报告间隔,eg:iperf -c 222.35.11.23 -i 2
-l 缓冲区大小,默认是8KB,eg:iperf -c 222.35.11.23 -l 16
-m 显示tcp最大mtu值
-o 将报告和错误信息输出到文件eg:iperf -c 222.35.11.23 -o ciperflog.txt
-p 指定服务器端使用的端口或客户端所连接的端口eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999
-u 使用udp协议
-w 指定TCP窗口大小,默认是8KB
-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)
-C 兼容旧版本(当server端和client端版本不一样时使用)
-M 设定TCP数据包的最大mtu值
-N 设定TCP不延时
-V 传输ipv6数据包

server专用参数
-D 以服务方式运行ipserf,eg:iperf -s -D
-R 停止iperf服务,针对-D,eg:iperf -s -R

client端专用参数
-d 同时进行双向传输测试
-n 指定传输的字节数,eg:iperf -c 222.35.11.23 -n 100000
-r 单独进行双向传输测试
-t 测试时间,默认10秒,eg:iperf -c 222.35.11.23 -t 5
-F 指定需要传输的文件
-T 指定ttl值

应用实例
使用 iperf -s 命令将 Iperf 启动为 server 模式,在客户机上使用 iperf -c启动client模式。
iperf –s
————————————————————
Server listening on TCP port 5001
TCP window size: 8.00 KByte (default)
————————————————————
iperf -c 59.125.103.56

上面使用服务端和客户端的默认设置进行测试
iperf -s -w 300K
————————————————————
Server listening on TCP port 5001
TCP window size:  300 KByte
————————————————————
iperf -c 59.125.103.56 -f K -i 2 -w 300K

设定报告间隔为2秒,服务器端和客户端的TCP窗口都开到300KB
iperf -c 59.125.103.56 -f K -i 2 -w 300K –n 1000000

测试传输约1MB数据
iperf -c 59.125.103.56 -f K -i 2 -w 300K –t 36

测试持续36秒
iperf -c 220.112.45.87 -f K -i 2 -w 300k -n 10400000 -d

测试双向的传输
iperf -c 59.125.103.56 -f K -i 2 -w 300K –u

UDP测试
其中 -i 参数的含义是周期性报告的时间间隔(interval),单位为秒;在上面的例子中,表示每隔2秒报告一次带宽等信息。
Tags: ,

Siege:压力模拟/测试工具

[ 2009/12/11 17:35 | by selboo ]
下载/安装
Siege时一个开放源代码项目:http://www.joedog.org/siege/

下载:
wget ftp://sid.joedog.org/pub/siege/siege-latest.tar.gz

安装:
%./configure ; make
#make install

siege包含了一组压力测试工具:
SIEGE (1) Siege是一个HTTP压力测试和评测工具.
使用样例:
任务列表:www.chedong.com.url文件
http://www.chedong.com/tech/
http://www.chedong.com/tech/acdsee.html
http://www.chedong.com/tech/ant.html
http://www.chedong.com/tech/apache_install.html
http://www.chedong.com/tech/awstats.html
http://www.chedong.com/tech/cache.html
http://www.chedong.com/tech/click.html
http://www.chedong.com/tech/cms.html
http://www.chedong.com/tech/compress.html
http://www.chedong.com/tech/cvs_card.html
http://www.chedong.com/tech/default.html
http://www.chedong.com/tech/dev.html
http://www.chedong.com/tech/gnu.html
....

siege -c 20 -r 2 -f www.chedong.com.url
参数说明:
-c 20 并发20个用户
-r 2 重复循环2次
-f www.chedong.com.url 任务列表:URL列表

输出样例:

** Siege 2.59
** Preparing 20 concurrent users for battle. 这次“战斗”准备了20个并发用户
The server is now under siege.. done. 服务在“围攻”测试中:
Transactions: 40 hits 完成40次处理
Availability: 100.00 % 成功率
Elapsed time: 7.67 secs 总共用时
Data transferred: 877340 bytes 共数据传输:877340字节
Response time: 1.65 secs 相应用时1.65秒:显示网络连接的速度
Transaction rate: 5.22 trans/sec 平均每秒完成5.22次处理:表示服务器后台处理的速度
Throughput: 114385.92 bytes/sec 平均每秒传送数据:114385.92字节
Concurrency: 8.59 最高并发数 8.59
Successful transactions: 40 成功处理次数
Failed transactions: 0 失败处理次数

注意:由于速度很快,可能会达不到并发速度很高就已经完成。Response time显示的是测试机器和被测试服务器之间网络链接状况。Transaction rate则表示服务器端任务处理的完成速度。

辅助工具:
增量压力测试:

为了方便增量压力测试,siege还包含了一些辅助工具:
bombardment (1)
是一个辅助工具:用于按照增量用户压力测试:
使用样例:
bombardment urlfile.txt 5 3 4 1
初始化URL列表:urlfile.txt
初始化为:5个用户
每次增加:3个用户
运行:4次
每个客户端之间的延迟为:1秒

输出成CSV格式:
siege2csv.pl (1)
siege2csv.pl将bombardment的输出变成CSV格式:
Time Data Transferred Response Time Transaction Rate Throughput Concurrency Code 200 (note that this is horribly broken.)
242 60.22 603064 0.02 4.02 10014.35 0.08
605 59.98 1507660 0.01 10.09 25136.05 0.12
938 59.98 2337496 0.02 15.64 38971.26 0.26
1157 60 2883244 0.04 19.28 48054.07 0.78

参考:
开源测试工具:http://www.opensourcetesting.org/performance.php

SIEGE测试于目标网站的网页动态静态没有关系,只要任务列表是动态网页即可。即使是需要认证的,也可以通过预先设置POST HEADER等方式模拟登录。
Tags:

谷歌贡献内存测试工具

[ 2009/11/18 14:44 | by selboo ]
Stressful Application Test(stressapptest)是一款谷歌专用的测试软件,它的大小只有不到200KB。现在,它采用了Apache license 2.0许可证,已经可以为外人所用。

为了模拟一个高负载的环境,stressappteest通过处理器和输入输出通道创造最大数量的输入压力。据谷歌的介绍,这个软件会生产线程来拷贝和直接对磁盘进行读取和写入。目标则是尽可能地载入系统内存,以便更加有效地进行测试。

该软件更多的时候测试的是内存控制器和总线接口,而不是存储单元的功能(如在Memtest86的情况下)。谷歌称,与其他内存诊断程序的比较,五分之一的内存模块相关的系统误差只能通过stressapptest发现。

你可以在谷歌的项目页面下载到该软件已经压缩好的tar包。

点击在新窗口中浏览此图片

Google Streeapptest Team的成员,从左到右分别为:Matthew Blecker, John Huang, Rapahel Menderico, Nick Sanders, John Hawley, James Vera。
Tags: ,

Siege:压力模拟/测试工具

[ 2009/08/23 12:55 | by selboo ]
      Siege是一个压力测试和评测工具,设计用于WEB开发这评估应用在压力下的承受能力:可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。

      最早使用的压力测试工具是apache的ab(apache benchmark),apache ab做重复压力测试不错,但是每次只能测试一个链接,如何测试一组链接(比如从日志中导出的1个小时的日志,做真实压力测试),后来找到了这个:

      SIEGE is an http regressive testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress, to see how it will stand up to load on the internet. It lets the user hit a webserver with a configurable number of concurrent simulated users. Those users place the webserver “under siege.” The duration of the siege is measured in transactions, the sum of simulated users and the number of times each simulated user repeats the process of hitting the server. Thus 20 concurrent users 50 times is 1000 transactions, the length of the test.

下载/安装
Siege时一个开放源代码项目:http://www.joedog.org

下载:
wget ftp://sid.joedog.org/pub/siege/siege-latest.tar.gz

安装:
%./configure ; make
#make install

siege包含了一组压力测试工具:
SIEGE (1) Siege是一个HTTP压力测试和评测工具.
使用样例:
任务列表:www.chedong.com.url文件
http://www.chedong.com/tech/
http://www.chedong.com/tech/acdsee.html
http://www.chedong.com/tech/ant.html
http://www.chedong.com/tech/apache_install.html
http://www.chedong.com/tech/awstats.html
http://www.chedong.com/tech/cache.html
http://www.chedong.com/tech/click.html
http://www.chedong.com/tech/cms.html
http://www.chedong.com/tech/compress.html
http://www.chedong.com/tech/cvs_card.html
http://www.chedong.com/tech/default.html
http://www.chedong.com/tech/dev.html
http://www.chedong.com/tech/gnu.html
….

siege -c 20 -r 2 -f www.chedong.com.url
参数说明:
-c 20 并发20个用户
-r 2 重复循环2次
-f www.chedong.com.url 任务列表:URL列表

输出样例:

** Siege 2.59
** Preparing 20 concurrent users for battle. 这次“战斗”准备了20个并发用户
The server is now under siege.. done. 服务在“围攻”测试中:
Transactions: 40 hits 完成40次处理
Availability: 100.00 % 成功率
Elapsed time: 7.67 secs 总共用时
Data transferred: 877340 bytes 共数据传输:877340字节
Response time: 1.65 secs 相应用时1.65秒:显示网络连接的速度
Transaction rate: 5.22 trans/sec 平均每秒完成5.22次处理:表示服务器后台处理的速度
Throughput: 114385.92 bytes/sec 平均每秒传送数据:114385.92字节
Concurrency: 8.59 最高并发数 8.59
Successful transactions: 40 成功处理次数
Failed transactions: 0 失败处理次数

注意:由于速度很快,可能会达不到并发速度很高就已经完成。Response time显示的是测试机器和被测试服务器之间网络链接状况。Transaction rate则表示服务器端任务处理的完成速度。

辅助工具:
增量压力测试:
为了方便增量压力测试,siege还包含了一些辅助工具:
bombardment (1)
是一个辅助工具:用于按照增量用户压力测试:
使用样例:
bombardment urlfile.txt 5 3 4 1
初始化URL列表:urlfile.txt
初始化为:5个用户
每次增加:3个用户
运行:4次
每个客户端之间的延迟为:1秒

输出成CSV格式:
siege2csv.pl (1)
siege2csv.pl将bombardment的输出变成CSV格式:
Time Data Transferred Response Time Transaction Rate Throughput Concurrency Code 200 (note that this is horribly broken.)
242 60.22 603064 0.02 4.02 10014.35 0.08
605 59.98 1507660 0.01 10.09 25136.05 0.12
938 59.98 2337496 0.02 15.64 38971.26 0.26
1157 60 2883244 0.04 19.28 48054.07 0.78

参考:
开源测试工具:http://www.opensourcetesting.org/performance.php
压力测试工具:HammerHead 正在试用中
Tags: ,
分页: 2/3 第一页 上页 1 2 3 下页 最后页 [ 显示模式: 摘要 | 列表 ]