当我尝试使用具有高请求率的httperf执行负载测试时,我收到以下错误:
» httperf --client=0/1 --server=www.xxxxx.com --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=200 --rate=30
httperf --client=0/1 --server=staging.truecar.com --port=80 --uri=/ --rate=30 --send-buffer=4096 --recv-buffer=16384 --num-conns=200 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
**Segmentation fault: 11**
Run Code Online (Sandbox Code Playgroud)
当"rate"> 15时,错误会增加
版本:
httperf 0.9.0
OS X 10.7.1
我使用httperf运行负载测试几周并收到此错误 -
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
when I fire query from OS - Ubuntu 12.04 LTS (64 bit machine).
Run Code Online (Sandbox Code Playgroud)
但是,如果我从具有OS的32位机器上运行相同的命令 - 10.04 LTS; 我没有收到错误消息.
此外,我确实按照其他帖子尝试使用"ulimit -n"命令增加文件描述符大小限制,并尝试使用
/usr/include/bits/typesizes.h
Run Code Online (Sandbox Code Playgroud)
#define __FD_SETSIZE 65535
但方法失败了.
有人可以建议吗?
观察:
无需在32台机器上进行任何更改(使用Ubuntu 10.10),那么Ubuntu 12.04的真正区别是什么?此外,我尝试了不同的机器(所有64位架构都有相同的问题)
我正在做一系列基准测试,并找到了httpperf工具.
但我的ubuntu 12.04中的版本文件描述符大小太小.因为它通过以下消息警告我:
- httperf:警告:打开文件限制> FD_SETSIZE; 限制最大 打开FD_SETSIZE文件的数量
以前在http://gom-jabbar.org/articles/2009/02/04/httperf-and-file-descriptors中编写了更大的httperf编译指南,但该网站现在已关闭.
有谁知道用适当的设置编译工具的步骤?
我需要为apache执行3种类型的性能测试.
我浏览了httperf手册但是,我真的很困惑各种选项,如--rate, - num-call, - num-conn, - wsess
任何人都可以帮助我跟随:
如何指定持续时间以及如何配置--rate, - num-conn和--num-calls以便测试将在指定的持续时间内执行并具有指定的请求数/秒?
我想使用 HTTPERF 对文件上传到远程服务器进行基准测试
我知道有一个 wsesslog 选项,我可以在其中提供表单数据的条目。
但我也可以发送文件的发布请求吗?
就像是:
httperf --hog --server 127.0.0.1 --port 5000
--add-header="Content-Type: application/x-www-form-urlencoded\n" --wsesslog=150,0,httperf_content
httperf_content 文件包含
/ method=POST contents="file=PATH_TO_FILE"
Run Code Online (Sandbox Code Playgroud) 想知道是否有人能说出发生了什么?在整天编译试验和错误之后,我有一个编译并运行但无法连接到任何东西的httperf.它现在barfs与"httperf:无法打开google.com".
我的猜测是问题与设置高maxfiles限制有关,但我不知道为什么.我不得不这样做,ulimit -n因为httperf继续使用"httperf:未能增加打开文件数量限制".(很久以前我安装的自制版本也有barfs这个错误).
如果查看源,则系统open()调用失败.为什么?为什么???
https://github.com/httperf/httperf/blob/ab2b96b0f5988c790de5cbc757dfd928c728f4da/src/conn.c#L65
Mac OSX版本是10.9.5.
我的步骤:
sudo launchctl limit maxfiles 65535 65535
ulimit -n 65535
git clone https://github.com/httperf/httperf
cd httperf
glibtoolize --force
aclocal
autoconf
autoheader
automake --force-missing --add-missing
mkdir build
cd build
../configure
make
make install
cd ../
autoreconf -i
Run Code Online (Sandbox Code Playgroud)
Uggghhhhhhhh.
httperf ... --rate=20 --send-buffer=4096 --recv-buffer=16384 --num-conns=100 --num-calls=10
Run Code Online (Sandbox Code Playgroud)
在nginx上按预期提供1000个请求.
Total: connections 100 requests 1000 replies 1000 test-duration 5.719 s
Connection rate: 17.5 conn/s (57.2 ms/conn, <=24 concurrent connections)
Connection time [ms]: min 699.0 avg 861.3 max 1157.5 median 840.5 stddev 119.5
Connection time [ms]: connect 56.9
Connection length [replies/conn]: 10.000
Request rate: 174.8 req/s (5.7 ms/req)
Request size [B]: 67.0
Reply rate [replies/s]: min 182.0 avg 182.0 max 182.0 stddev 0.0 (1 samples)
Reply time [ms]: response 80.4 transfer 0.0
Reply …Run Code Online (Sandbox Code Playgroud) 我有一个包含此内容的文件:
helper?token=99999 method=POST contents='{"key1":99999, "key2":88888, "key3":55}'
Run Code Online (Sandbox Code Playgroud)
然后我运行这个命令:
httperf --print-reply --print-request --hog --client=0/1 --server=a_server --port=8080 --uri=/ --rate=25 --send-buffer=4096 --recv-buffer=16384 --add-header='Content-Type:application/json' --method=POST --wsesslog=1,1.000,entrada_carga
Run Code Online (Sandbox Code Playgroud)
但是服务器没有得到任何 json。我已经尝试了不同的逃生选项但没有成功。
与 curl 相同的帖子效果很好。
你有任何关于用httperf发布json的指针吗?
提前致谢
我正在尝试使用httperf加载测试我的Rails(3.2.13)应用程序.它对于不需要cookie的页面非常有效.但是,我无法使它适用于需要cookie的页面.我正在使用Gregg Pollack的httperf(https://github.com/Gregg/httperf_big_cookies),因为正式版不支持大cookie.
这是我使用的命令:
httperf --session-cookie --wsesslog=1,5,path.txt --rate=1 --timeout=15 --server=localhost --port=3000
而且,这是path.txt文件:
/log_in
/sessions method=POST contents='utf8=?&remember_me=1&commit=Login&email=john@widgetsco.com&password=password'
Run Code Online (Sandbox Code Playgroud)
该cookies方法始终返回nil控制器内部.
所以,请建议我如何克服问题或更好的工具(基于控制台)来测试铁路应用的负载.
cookies ruby-on-rails load-testing httperf ruby-on-rails-3.2
我有一个基于paste.httpserver的Web服务器作为HTTP和WSGI之间的适配器.当我使用httperf进行性能测量时,如果每次使用--num-conn我开始一个新请求,我每秒可以执行超过1,000个请求.如果我改为使用--num-call重用连接,那么我每秒得到大约11个请求,速度的1/100.
如果我尝试ab,我会超时.
我的测试是
% ./httperf --server localhost --port 8080 --num-conn 100
...
Request rate: 1320.4 req/s (0.8 ms/req)
...
Run Code Online (Sandbox Code Playgroud)
和
% ./httperf --server localhost --port 8080 --num-call 100
...
Request rate: 11.2 req/s (89.4 ms/req)
...
Run Code Online (Sandbox Code Playgroud)
这是一个简单的可重现服务器
from paste import httpserver
def echo_app(environ, start_response):
n = 10000
start_response("200 Ok", [("Content-Type", "text/plain"),
("Content-Length", str(n))])
return ["*" * n]
httpserver.serve(echo_app, protocol_version="HTTP/1.1")
Run Code Online (Sandbox Code Playgroud)
它是一个多线程服务器,很难分析.这是一个单线程的变体:
from paste import httpserver
class MyHandler(httpserver.WSGIHandler):
sys_version = None
server_version = "MyServer/0.0"
protocol_version = "HTTP/1.1"
def log_request(self, *args, **kwargs):
pass …Run Code Online (Sandbox Code Playgroud) 我无法确定哪个是更好的基准测试工具 - 它是apachebench工具还是httperf?请帮我决定哪一个是最适合用于对Web应用程序进行基准测试的工具.
httperf ×11
benchmarking ×2
python ×2
ubuntu-12.04 ×2
against ×1
apache ×1
apachebench ×1
cookies ×1
django ×1
httpserver ×1
json ×1
keep-alive ×1
load ×1
load-testing ×1
macos ×1
nginx ×1
paste ×1
rest ×1
testing ×1
ubuntu-10.10 ×1
uwsgi ×1