我正在尝试使用我的基准测试工具达到 2000 个并发用户。我正在使用 Locust 来模拟它们。
我的服务器有 24vCPU、128GB RAM、25SSD。
我希望能够为 2000 个并发用户提供服务而不会出现错误,但在只有 700 个用户之后我就遇到了麻烦。
我安装了 gevent 以便能够提供异步服务,但这并没有改变我的负载测试中的任何内容(gevent 可以不工作吗?)。我的systemd文件如下:
mysite-生产.conf
[Unit]
Description=mysite production daemon
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/mysite/production/src
ExecStart=/var/www/mysite/production/venv/bin/gunicorn --worker-class=gevent --worker-connections=1000 --workers=49 --bind unix:/var/www/mysite/production/sock/gunicorn --log-level DEBUG --log-file '/var/www/mysite/production/log/gunicorn.log' mysite.wsgi:application
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
根据我的计算:我可以服务的每秒 49 x 1000 = 49000 个请求。
相反,在大约 700 个用户时,我在 Locust 故障选项卡中收到以下错误:
# fails Method Name Type
1227 GET // HTTPError('500 Server Error: Internal Server Error for url: http://my.site.com//')
Run Code Online (Sandbox Code Playgroud)
它基本上说我有一个内部服务器错误。
当我打开 …
是否有任何可用的插件可以从 K6 生成的 JSON 输出生成 html 报告?我正在尝试构建一个简单的 HTML 报告,但生成的输出 JSON 无效且无法解析。以下是 K6 的 JSON 输出。
{"type":"Metric","data":{"name":"data_received","type":"counter","contains":"data","tainted":null,"thresholds":[],"submetrics":null,"sub":{"name":"","parent":"","suffix":"","tags":null}},"metric":"data_received"}
{"type":"Point","data":{"time":"2020-07-30T21:06:05.6026767Z","value":0,"tags":{"group":"::setup"}},"metric":"data_received"}
{"type":"Metric","data":{"name":"iteration_duration","type":"trend","contains":"time","tainted":null,"thresholds":[],"submetrics":null,"sub":{"name":"","parent":"","suffix":"","tags":null}},"metric":"iteration_duration"}
{"type":"Point","data":{"time":"2020-07-30T21:06:05.6026767Z","value":0.09,"tags":{"group":"::setup"}},"metric":"iteration_duration"}
Run Code Online (Sandbox Code Playgroud) 无论我使用 4 个还是 5 个工人,我都无法超过 1200 RPS。
我尝试以 3 种方式启动 Locust:1 个、4 个和 5 个工作进程 ( docker-compose up --scale worker_locust=num_of_workers)。我使用 3000 个客户端,孵化率为 100。我正在加载的服务是一个始终返回yoHTTP 200 的虚拟服务,即它不执行任何操作,而是返回一个常量字符串。当我有一名工作人员时,我可以达到 600 RPS(并开始看到一些 HTTP 错误),当我有 4 名工作人员时,我可以达到 ~1200 RPS(没有一个 HTTP 错误):
当我有 5 个工作人员时,我得到相同的 ~1200 RPS,但 CPU 使用率较低:

我认为,如果 CPU 在 5 个工作线程的情况下(相对于 4 个工作线程的情况)出现故障,那么限制 RPS 的并不是 CPU。
我在 6 核 MacBook 上运行这个程序。
我locustfile.py使用的帖子基本上几乎是空的请求(只有几个参数):
from locust import HttpUser, task, between, constant
class QuickstartUser(HttpUser):
wait_time = constant(1) # seconds
@task
def add_empty_model(self): …Run Code Online (Sandbox Code Playgroud) 我想为网页做一个测试加载.我想在多线程的python中做到这一点.第一个POST请求将登录用户(设置cookie).
然后我需要知道有多少用户可以同时执行相同的POST请求.所以我正在考虑生成在循环中发出请求的线程.
我有几个问题:1.是否可以同时运行1000-1500个CPU请求?我的意思是不会让系统变慢,所以它不再可靠了吗?2.带宽限制怎么样?该测试可靠的通道有多好?
承载测试站点的服务器是Amazon EC2脚本将从另一台服务器(Amazon也是如此)运行.
谢谢!
我正在尝试为测试控制器/测试代理安装Visual Studio 2010代理,以便我可以在本地计算机上创建负载测试.尝试安装测试控制器时,我在配置总结中收到以下消息

From the installation log I found the following error messages:
The existing connection string for controller MyComputerName:6901 is {this is blank}
Run Code Online (Sandbox Code Playgroud)
System.MissingMethodException:找不到方法:'Boolean Microsoft.VisualStudio.TestTools.WebStress.LoadTestDatabaseCounterWriter.IsDatabaseUpgradeFromRTMNeeded(System.Data.SqlClient.SqlConnection)'.在Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateAndUpgradeLoadTestSchemaIfRequired(字符串loadTestConnectionString,字符串directoryContainingSchemaFile)在Microsoft.VisualStudio.TestTools.ConfigCore.ControllerConfiguration.UpdateLoadTestDatabase(ControllerConfigurationUpdatePack updatePack,DelegateStatusUpdate statusListener)
Failed to configure load test database.
Run Code Online (Sandbox Code Playgroud) 我试图创建负载测试场景ejabberd用tsung。
我想模拟来自数千个客户端的数千个XMPP事件。根据tsung的手册,我可以使用for循环创建重复的动作:
<for from="1" to="10" incr="1" var="counter">
[...]
<request> <http url="/page?id=%%_counter%%"></http> </request>
[...]
</for>
Run Code Online (Sandbox Code Playgroud)
但是这个例子对我不起作用:
alex@alex:~/.tsung$ tsung -f jabber.xml start
Starting Tsung
"Log directory is: /home/alex/.tsung/log/20130417-1404"
3306- fatal: {error,{validity_constraint_Name_Token,37}}
Config Error, aborting ! {fatal,{{error,{validity_constraint_Name_Token,37}},
{file,"jabber.xml"},
{line,10},
{col,29}}}
Run Code Online (Sandbox Code Playgroud)
完整的配置文件:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.5">
<clients>
<client host="localhost" use_controller_vm="true"></client>
</clients>
<!-- Server side setup -->
<servers>
<for from="1" to="1000" incr="1" var="counter">
<server host="t%%_counter%%.testserver.org" port="5222" type="tcp"></server>
</for>
</servers>
<load>
<arrivalphase phase="1" …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用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
我想使用yandex tank测试我的Web应用程序,我想测试注册,所以我需要发送这样的请求
标头
POST /registration HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 30
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/registration
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: csrftoken=XJ3oheJb0SndHfNAH2lSV2AtKNxxuXdv; JSESSIONID=igq9ejgl10jirr4t73mpjblp
Run Code Online (Sandbox Code Playgroud)表格数据
login=abracadbra&password=brar
Run Code Online (Sandbox Code Playgroud)是否可以使用不同的登录字段发送这种请求?
我被授权访问RabbitMQ服务器以对其进行负载测试.我是服务器和AMQ协议的新手.我一直在网上研究,看看有什么不同的方法.到目前为止,我正在研究两种方法.
JMeter的; 我找到了这个项目:https://github.com/jlavallee/JMeter-Rabbit-AMQP#build-dependencies.它给了我一个jar文件,我可以创建JMeter AMQP消费者和发布者,但我不知道该放哪些字段.(虚拟主机vs主机 - dunno我的端口 - ..)

蟒蛇; 使用皮卡.我有一个简单的发件人脚本,它从我的客户端连接到我的服务器,并向服务器发送一个"hello world"文本.还写了一个接收器脚本来接收那些'hello world'.如果我打开多个终端并同时运行我的发送者脚本10个实例,这是否是负载的决定?
同样,我问所有这些因为我是服务器,云,负载测试和Jmeter的新手.这只是我必须完成的任务.
谢谢你的回答,你可以让我为我澄清一些事情.
如何在Beanshell Sampler-Jmeter中使用数组列表?
performance jmeter load-testing performance-testing blazemeter
load-testing ×10
jmeter ×2
amqp ×1
blazemeter ×1
cookies ×1
django ×1
gunicorn ×1
httperf ×1
javascript ×1
k6 ×1
load ×1
locust ×1
nginx ×1
performance ×1
postgresql ×1
python ×1
rabbitmq ×1
tsung ×1
yandex ×1
yandex-tank ×1