• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..30-Sep-2020-

stress_test_server/H30-Sep-2020-7557

v2/H03-May-2022-4,7973,564

DESIGN.mdH A D30-Sep-20202.1 KiB4830

README.mdH A D30-Sep-20204.9 KiB115105

basic.goH A D30-Sep-202013.9 KiB691504

config.goH A D30-Sep-20203.6 KiB14696

run.goH A D30-Sep-20206.7 KiB336183

stress.tomlH A D30-Sep-20201.4 KiB5548

stress_test.goH A D30-Sep-202012.4 KiB595502

template.goH A D30-Sep-20201.5 KiB6555

util.goH A D30-Sep-20202.9 KiB13380

README.md

1# `influx_stress` usage and configuration
2
3The binary for `influx_stress` comes bundled with all influx installations.
4To run it against an `influxd` instance located at  `localhost:8086` with the default configuration options:
5
6See more about the [default configuration options](https://github.com/influxdata/influxdb/blob/master/stress/stress.toml)
7
8```bash
9$ influx_stress
10```
11
12To run `influx_stress` with a configuration file:
13```bash
14$ influx_stress -config my_awesome_test.toml
15```
16
17To daemonize `influx_stress` and save the output to a results file:
18```bash
19$ influx_stress -config my_awesome_test.toml > my_awesome_test_out.txt 2>&1 &
20```
21
22To run multiple instances of `influx_stress` just change the `measurement` each test writes to, details below
23```bash
24$ influx_stress -config my_awesome_test1.toml > my_awesome_test_out1.txt 2>&1 &
25$ influx_stress -config my_awesome_test2.toml > my_awesome_test_out2.txt 2>&1 &
26```
27
28Below is a sample configuration file with comments explaining the different options
29```toml
30# The [provision] section creates a new database on the target instance for the stress test to write points to and perform queries against
31# This section can be deleted if the instance is manually configured. In that case make sure that the database referenced in [write] exists
32# The provisioner will try to delete the database before trying to recreate it.
33
34[provision]
35  [provision.basic]
36    # If set to false you can delete this section from the config
37    enabled = true
38    # address of the node to be provisioned
39    address = "<node1_ip>:8086"
40    # name of the database to create
41    database = "stress"
42    # This must be set to true
43    reset_database = true
44
45# The [write] section defines the shape of the generated data and configures the InfluxDB client
46[write]
47  # The [write.point_generator] defines the shape of the generated data
48  [write.point_generator]
49    [write.point_generator.basic]
50      # This needs to be set to true
51      enabled = true
52      # The total number of points a stress_test will write is determined by multiplying the following two numbers:
53      # point_count * series_count = total_points
54      # Number of points to write to the database for each series
55      point_count = 100
56      # Number of series to write to the database?
57      series_count = 100000
58      # This simulates collection interval in the timestamps of generated points
59      tick = "10s"
60      # This must be set to true
61      jitter = true
62      # The measurement name for the generated points
63      measurement = "cpu"
64      # The generated timestamps follow the pattern of { start_date + (n * tick) }
65      # This sequence is preserved for each series and is always increasing
66      start_date = "2006-Jan-02"
67      # Precision for generated points
68      # This setting MUST be the same as [write.influx_client.basic]precision
69      precision = "s"
70      # The '[[]]' in toml format indicates that the element is an array of items.
71      # [[write.point_generator.basic.tag]] defines a tag on the generated points
72      # key is the tag key
73      # value is the tag value
74      # The first tag defined will have '-0' through '-{series_count}' added to the end of the string
75      [[write.point_generator.basic.tag]]
76        key = "host"
77        value = "server"
78      [[write.point_generator.basic.tag]]
79        key = "location"
80        value = "us-west"
81      # [[write.point_generator.basic.field]] defines a field on the generated points
82      # key is the field key
83      # value is the type of the field
84      [[write.point_generator.basic.field]]
85        key = "value"
86        # Can be either "float64", "int", "bool"
87        value = "float64"
88
89  # The [write.influx_client] defines what influx instances the stress_test targets
90  [write.influx_client]
91    [write.influx_client.basic]
92      # This must be set to true
93      enabled = true
94      # This is an array of addresses
95      # addresses = ["<node1_ip>:8086","<node2_ip>:8086","<node3_ip>:8086"] to target a cluster
96      addresses = ["<node1_ip>:8086"] # to target an individual node
97      # This database in the in the target influx instance to write to
98      # This database MUST be created in the target instance or the test will fail
99      database = "stress"
100      # Write precision for points
101      # This setting MUST be the same as [write.point_generator.basic]precision
102      precision = "s"
103      # The number of point to write to the database with each POST /write sent
104      batch_size = 5000
105      # An optional amount of time for a worker to wait between POST requests
106      batch_interval = "0s"
107      # The number of workers to use to write to the database
108      # More workers == more load with diminishing returns starting at ~5 workers
109      # 10 workers provides a medium-high level of load to the database
110      concurrency = 10
111      # This must be set to false
112      ssl = false
113      # This must be set to "line_http"
114      format = "line_http"
115```