siege性能测试

简介:
压测工具:
简介:
siege官网地址http://www.joedog.org/


安装:
wget http://download.joedog.org/siege/siege-3.0.8.tar.gz
tar xzvf siege-3.0.8.tar.gz
cd siege-3.0.8
./configure
make && make install

[root@zhuiqiuqiji www]# find /  -name 'siege'
/home/yeqing/siege-3.0.8/src/siege
/usr/local/bin/siege


/usr/local/bin/siege -h

准备测试url 或者url列表文件



压测:
  20个用户(每次并发量,注意不是每秒并发量) 重复10次 共产生 20 * 10 = 200个请求  如下:


案例1:
[root@zhuiqiuqiji www]# /home/yeqing/siege-3.0.8/src/siege php ./test.php -b -c20 -r10 
** SIEGE 3.0.8
** Preparing 20 concurrent users for battle.
The server is now under siege...
done.

Transactions:                0 hits
Availability:                0.00 %
Elapsed time:                0.13 secs
Data transferred:            0.00 MB
Response time:                0.00 secs
Transaction rate:            0.00 trans/sec
Throughput:                0.00 MB/sec
Concurrency:                0.00
Successful transactions:       0
Failed transactions:            200
Longest transaction:            0.00
Shortest transaction:            0.00

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

说明:-c是并发量,-r是重复次数。url_list.txt就是一个文本文件,每行都是一个url,它会从里面随机访问的。


案例2:
cat url_list.txt
  curl -d 'name=ye&age=18' www.demo.com/test.php
  curl -d 'name=yeqing&age=18' www.demo.com/test.php

[root@zhuiqiuqiji www]# /usr/local/bin/siege -b -c20 -r10  -f url_list.txt
** SIEGE 3.0.8
** Preparing 20 concurrent users for battle.
The server is now under siege...
done.

Transactions:                   0 hits
Availability:                0.00 %         成功率
Elapsed time:                1.99 secs      总共使用时间
Data transferred:            0.00 MB        共传输数据0MB
Response time:                0.00 secs      响应时间,显示网络连接的速度
Transaction rate:            0.00 trans/sec 平均每秒完成 0 次处理
Throughput:                0.00 MB/sec    平均每秒传送数据
Concurrency:                0.00           实际最高并发连接数
Successful transactions:           0          成功处理次数
Failed transactions:             200           失败处理次数
Longest transaction:            0.00        每次传输所花最长时间
Shortest transaction:            0.00        每次传输所花最短时间

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.

案例3:
  /usr/local/bin/siege -b -c100 -r10  dig www.baidu.com

Lifting the server siege...      done.

Transactions:                 152 hits
Availability:               96.82 %
Elapsed time:              159.40 secs
Data transferred:            4.09 MB
Response time:                4.12 secs
Transaction rate:            0.95 trans/sec
Throughput:                0.03 MB/sec
Concurrency:                3.93
Successful transactions:         152
Failed transactions:               5
Longest transaction:           17.93
Shortest transaction:            0.12

FILE: /usr/local/var/siege.log
You can disable this annoying message by editing
the .siegerc file in your home directory; change
the directive 'show-logfile' to false.



本文转自cloves 51CTO博客,原文链接:http://blog.51cto.com/yeqing/1870680


相关文章
|
算法
专题九Simulink仿真基础-1
专题九Simulink仿真基础
533 1
|
7月前
|
机器学习/深度学习 数据采集 算法
大数据加持的预测性维护:让设备故障“未卜先知”
大数据加持的预测性维护:让设备故障“未卜先知”
464 2
|
9月前
|
人工智能 边缘计算 自然语言处理
Google 发布其开源模型系列最新模型 Gemma 3
Google 发布了其开源模型系列的最新成员 Gemma 3,这是一款轻量级、高性能的 AI 模型,支持多语言和复杂任务。它具备 140+ 语言支持、128K-token 上下文窗口、增强的多模态分析能力以及函数调用功能,适用于聊天 AI、代码生成等多种场景。Gemma 3 在性能上超越 Llama 3-8B 和 Mistral 7B,且仅需单 GPU 即可运行,大幅降低计算成本。提供 1B 至 27B 不同参数规模版本,满足多样化需求,并优化了量化模型以适应边缘计算和移动设备。其多模态设计整合了 SigLIP 图像编码器,扩展上下文窗口至 128k token,显著提升了视觉和文本理解能力。
665 3
Google 发布其开源模型系列最新模型 Gemma 3
|
人工智能 程序员 API
通义万相AIGC技术的测试体验
通义万相AIGC技术的测试体验
394 3
|
供应链 搜索推荐 数据挖掘
探索增强现实(AR)在零售业的应用
【5月更文挑战第12天】本文探讨了AR技术如何革新零售业,包括虚拟试衣间提升购物效率、产品信息展示增强认知、导航导购优化购物体验及互动营销增加用户粘性。AR技术能提升消费者体验,提高零售业效率,并增强品牌竞争力。随着AR的发展,零售业将迎来更多创新应用。
|
边缘计算 运维 安全
云上物联网边缘节点:重塑连接智能世界的桥梁
结语 云上物联网边缘节点作为物联网技术的重要组成部分,正以其独特的优势和潜力推动着物联网的快速发展。面对未来的机遇和挑战,我们需要不断创新和完善边缘节点的技术架构和应用模式,推动物联网技术的深度融合和广泛应用,为构建智慧社会贡献力量。
425 0
|
敏捷开发 数据可视化 测试技术
场景用例图的作用是什么?
场景用例图的作用是什么?
457 3
|
前端开发 安全 Linux
【虚拟化】典型虚拟化系统
【虚拟化】典型虚拟化系统
326 0
|
SQL 数据库连接 容器
Foxpro数据库连接错误解决方法--【VFP DBF文件不是一个有效的路径。 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器】
直接访问vfp dbf文件时报错: 错误描述: 'd:\vfpData\test.dbf'不是一个有效的路径。 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器。 解决办法:Data Source=目录!!!!!!(d:\vfpData) (1)--------------------...
1922 0