Yandex.Tank Documentation - Read the Docs

48 downloads 1860 Views 478KB Size Report
Welcome to Yandex.Tank documentation. Yandex.Tank is an extensible load testing ... Then update package list and install yandex-load-tank-base package:.
Yandex.Tank Documentation Release 1.1.1

Yandex

Sep 28, 2017

Contents

1

Getting started 1.1 Getting Help . . . . . . . . . . . . . . . 1.2 What are the Yandex.Tank components? . 1.3 Running Yandex.Tank . . . . . . . . . . 1.4 See also . . . . . . . . . . . . . . . . . .

. . . .

3 3 3 3 4

2

Installation 2.1 Docker container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Installation, from PyPi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Installation, .deb packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5 5 5 6

3

Routing and firewall 3.1 Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7 7 7 8

4

Tutorials 4.1 Preparing requests . . . . . . . . . . . . 4.1.1 Access mode . . . . . . . . . . 4.1.2 URI-style, URIs in load.yaml . . 4.1.3 URI-style, URIs in file . . . . . 4.1.4 URI+POST-style . . . . . . . . 4.1.5 Request-style . . . . . . . . . . 4.2 Run Test! . . . . . . . . . . . . . . . . . 4.3 Results . . . . . . . . . . . . . . . . . . 4.4 Tags . . . . . . . . . . . . . . . . . . . . 4.5 SSL . . . . . . . . . . . . . . . . . . . . 4.6 Autostop . . . . . . . . . . . . . . . . . 4.6.1 HTTP and Net codes conditions 4.6.2 Average time conditions . . . . 4.7 Logging . . . . . . . . . . . . . . . . . . 4.8 Results in phout . . . . . . . . . . . . . 4.9 Graph and statistics . . . . . . . . . . . . 4.10 Precise timings . . . . . . . . . . . . . . 4.11 Thread limit . . . . . . . . . . . . . . . 4.12 Dynamic thread limit . . . . . . . . . . . 4.13 Custom stateless protocol . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

9 10 11 11 12 12 13 14 14 15 15 15 15 16 16 17 18 18 18 18 19 i

5

6

4.14 Gatling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

Advanced usage 5.1 Command line options . . . . . . . . . . . 5.2 Advanced configuration . . . . . . . . . . 5.2.1 Default configuration files . . . . 5.2.2 The DEFAULT section . . . . . . 5.2.3 Multiline options . . . . . . . . . 5.2.4 Referencing one option to another 5.2.5 Time units . . . . . . . . . . . . . 5.2.6 Shell-options . . . . . . . . . . . 5.3 Artifacts . . . . . . . . . . . . . . . . . . 5.4 Sources . . . . . . . . . . . . . . . . . . . 5.5 load.ini example . . . . . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

21 21 22 22 22 23 23 23 23 24 24 24

Modules 6.1 TankCore . . . . . . . . . . . . 6.1.1 Architecture . . . . . . 6.1.2 Test lifecycle . . . . . 6.1.3 Options . . . . . . . . 6.1.4 consoleworker . . . . . 6.1.5 apiworker . . . . . . . 6.1.6 exit codes . . . . . . . 6.2 Load Generators . . . . . . . . 6.2.1 Phantom . . . . . . . . 6.2.2 JMeter . . . . . . . . . 6.2.3 BFG . . . . . . . . . . 6.2.4 Pandora . . . . . . . . 6.3 Artifact uploaders . . . . . . . 6.3.1 Yandex.Overload . . . 6.4 Handy tools . . . . . . . . . . . 6.4.1 Auto-stop . . . . . . . 6.4.2 Telegraf . . . . . . . . 6.4.3 Console on-line screen 6.4.4 Aggregator . . . . . . 6.4.5 ShellExec . . . . . . . 6.4.6 Resource Check . . . . 6.4.7 RC Assert . . . . . . . 6.4.8 Tips&Tricks . . . . . . 6.4.9 BatteryHistorian . . . 6.4.10 SvgReport . . . . . . . 6.5 Deprecated . . . . . . . . . . . 6.5.1 Monitoring . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

25 25 26 27 27 28 28 29 29 29 34 35 39 41 41 42 42 43 47 47 48 48 49 49 49 49 50 50

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Ammo generators

55

8

Indices and tables

59

ii

Yandex.Tank Documentation, Release 1.1.1

Author Alexey Lavrenuke Version 1.1.1 Date Sep 28, 2017 Homepage Yandex.Tank Homepage on Github Download Launchpad PPA Pypi Documentation PDF Documentation License GNU LGPLv3 Issue tracker GitHub Issues Contents:

Contents

1

Yandex.Tank Documentation, Release 1.1.1

2

Contents

CHAPTER

1

Getting started

Welcome to Yandex.Tank documentation. Yandex.Tank is an extensible load testing utility for unix systems. It is written in Python and uses different load generator modules in different languages.

Getting Help Gitter.im

What are the Yandex.Tank components? • Core - basic steps of test prepare, configuration, execution. Artifacts storing. Controls plugins/modules. • Load generators - modules that uses and controls load generators (load generators NOT included). • Artifact uploaders - modules that uploads artifacts to external storages and services. • Handy tools - monitoring tools, console online screen, autostops and so on. Note: Using phantom as a load generator for mild load tests (less then 1000rps) an average laptop with 64bit Ubuntu (10.04/.../13.10) would be sufficient. The tank could be easily used in virtual machine if queries aren’t too heavy and load isn’t too big. Otherwise it is recommended to request a physical server or a more capable virtual machine from your admin.

Running Yandex.Tank 1.Install tank to your system Installation 2.Tune your system Routing and firewall

3

Yandex.Tank Documentation, Release 1.1.1

3.And run the tutorial Tutorials

4.If you are skilled enough, feel free to use Advanced usage. 5.For developers Modules.

See also Evgeniy Mamchits’ phantom - Phantom scalable IO Engine Alexey Lavrenuke’s pandora - A load generator in Go language Gregory Komissarov’s firebat - test tool based on Phantom BlazeMeter’s Sense - service for storing and analysing performance test results

4

Chapter 1. Getting started

CHAPTER

2

Installation

Note: Phantom load generator works fine with gcc