首页 > 解决方案 > Yandex Tank:线程不是 const 且 RPS 不同

问题描述

我们有一个非常简单的 Web 服务。来自 Internet 客户端的输出服务的 HTTP/HTTPS 请求。在 HEAD 中返回 UID。

我们想通过 Yandex Tank 测试我们的服务。

加载.yml

phantom:
  address: 211.81.41.11:443 #IP тестового стенда, порт 443
#  address: her.your.ru:443 #IP тестового стенда, порт 443
  ssl: true #use https
  uris:
    - "/"
  load_profile:
    load_type: rps
    schedule: const(5000, 320s) удержание 5000 rps в течение 320 сек
  instances: 5000
  header_http: "1.1"
  headers:
    - "[Host: her.your.ru]"
    - "[Connection: keep-alive]"
    - "[User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36]"
uploader: #модуль для постройки графика
  enabled: true
  operator: my-username
  package: yandextank.plugins.DataUploader
  token_file: token.txt
console:
  enabled: true
telegraf:
  enabled: false

开始

docker run --rm -v /opt/docker/yandex.tank/her.your.ru:/var/loadtest -it direvius/yandex-tank

测试完成

检查并看到这个问题:线程不是 const 和不同的 RPS。

为什么会存在这个问题?在我运行测试的主机上进行什么检查(4CPU,16Gb:在测试期间 CPU 利用率减少 20%)以及如何解决这个问题?

在此处输入图像描述

标签: testingintegration-testingyandexyandex-tank

解决方案


推荐阅读