Giter Site home page Giter Site logo

inch's Introduction

inch

Inch is an InfluxDB benchmarking tool for testing with different tag cardinalities.

Installing

To install, simply go get from the command line:

$ go get github.com/influxdata/inch/cmd/inch

Running

The inch program accepts several flags to adjust the number of points and tag values.

Usage of inch:
  -b int
    	Batch size (default 5000)
  -c int
    	Concurrency (default 1)
  -consistency string
    	Write consistency (default any) (default "any")
  -db string
    	Database to write to (default "stress")
  -delay duration
    	Delay between writes
  -dry
    	Dry run (maximum writer perf of inch on box)
  -f int
    	Fields per point (default 1)
  -host string
    	Host (default "http://localhost:8086")
  -m int
    	Measurements (default 1)
  -max-errors int
    	Terminate process if this many errors encountered
  -p int
    	Points per series (default 100)
  -report-host string
    	Host to send metrics
  -report-tags string
    	Comma separated k=v tags to report alongside metrics
  -shard-duration string
    	Set shard duration (default 7d)
  -t string
    	Tag cardinality (default "10,10,10")
  -target-latency duration
    	If set inch will attempt to adapt write delay to meet target
  -time duration
    	Time span to spread writes over
  -v	Verbose

The -t flag specifies the number of tags and the cardinality by using a comma-separated list of integers. For example, the value "100,20,4" means that 3 tag keys should be used. The first one has 100 values, the second one has 20 values, and the last one has 4 values. inch will insert a series for each combination of these values so the total number of series can be computed by multiplying the values (100 * 20 * 4).

By setting the verbose flag you can see progress each second.

The -target-latency flag will allow inch to automatically backoff (add delays after writing batches) according to the weighted moving average of response times from the InfluxDB server. If the WMA of responses is greater than the target latency then delays will be increased in an attempt to allow the InfluxDB server time to recover and process in-flight writes. If a delay is in place on inch clients yet the WMA of response times is lower than the target latency, then inch will reduce the delays in an attempt to increase throughput.

The -report-host flag can be used to specify the location of an InfluxDB instance, to be used for reporting the results of inch. A local instance to inch would be specified as -report-host http://localhost:8086. Inch will provide appropriate tags where possible, but arbitrary tags can be set using the -report-tags flag. The format for -report-tags is a comma separated list of key value pairs. For example -report-tags instance=m4.2xlarge,index=tsi1.

When -report-host is set to a non-empty value, inch will report throughput, points and values written, as well as write latency statistics.

inch's People

Contributors

benbjohnson avatar davidby-influx avatar docmerlin avatar e-dard avatar gitirabassi avatar gshif avatar gwossum avatar jacobmarble avatar jeffreyssmith2nd avatar jsternberg avatar jwilder avatar lesam avatar lyondhill avatar mark-rushakoff avatar niksajakovljevic avatar stuartcarnie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inch's Issues

unexpected status code: 400

Influxdb is installed on Windows systems, and the version of Influxdb is 2.7,When I used inch to perform performance testing on Influxdb, the following error occurred. How should I handle it

E:\Program Files\Go\bin\inch-master\cmd\inch>inchinch -b 5000 -db "stress-stats" -token "EudZDMn-pLBzcRq8kAN7PH7v8VbyDy-7XBsjyKrJA5J_Ei9OWQyqpfsAn4XqGu7Xb0xLE0C99ZXzpcVRohp5rg==" -v2 -v
Host: http://localhost:8086
Concurrency: 1
Virtual Hosts: 0
Measurements: 1
Tag cardinalities: [10 10 10]
Points per series: 100
Total series: 1000
Total points: 100000
Total fields per point: 1
Randomized field values: false
Multiple writes per point: false
Batch Size: 5000
Database: stress-stats (Shard duration: 7d)
Write Consistency: any
Writing into InfluxDB 2.0: true
InfluxDB 2.0 Authorization Token: EudZDMn-pLBzcRq8kAN7PH7v8VbyDy-7XBsjyKrJA5J_Ei9OWQyqpfsAn4XqGu7Xb0xLE0C99ZXzpcVRohp5rg==
Content-Type:[application/x-www-form-urlencoded]
Authorization:[Token EudZDMn-pLBzcRq8kAN7PH7v8VbyDy-7XBsjyKrJA5J_Ei9OWQyqpfsAn4XqGu7Xb0xLE0C99ZXzpcVRohp5rg==]
unexpected status code: 400

The running logs of Influxdb are as follows
2024-06-10T11:02:14.489958Z info executing new query {"log_id": "0phObylW000", "query": "CREATE DATABASE stress-stats WITH DURATION 7d

connect: cannot assign requested address

Hi ,
inch -v -c 8 -b 100 -t 200 -db TestData -host http://18.188.109.199:8086 -f 1 -p 50000

So its should insert 10,000,000 records
after 9,000,000 records its throwing error like "Post http://18.188.109.199:8086/write?db=TestData&precision=ns&consistency=any: dial tcp 18.188.109.199:8086: connect: cannot assign requested address" but inserting all the 10,000,000 records in db.

came across below thread while searching for error :
golang/go#16012
Thanks,
Sharda

InfluxDB 2.0 Authorization Token: unexpected status code: 401

Hello people , thanks in advance.

I am trying to benchmark influxdb using inch benchmarking tool.

started influxdb with the command : "influxd"
then ran inch executable as following
./inch
Host: http://localhost:8086
Concurrency: 1
Virtual Hosts: 0
Measurements: 1
Tag cardinalities: [10 10 10]
Points per series: 100
Total series: 1000
Total points: 100000
Total fields per point: 1
Randomized field values: false
Batch Size: 5000
Database: stress (Shard duration: 7d)
Write Consistency: any
Writing into InfluxDB 2.0: false
InfluxDB 2.0 Authorization Token:
unexpected status code: 401

Wrong Total Number of Series

./inch -host http://localhost:8086 -t 2,2,3,3,3,3,3,3,3,3 -user abc -password abc-m 200 -p 1000000 -f 20

This should generate Total series: 5248800. But it is generating only 1312200.Show series cardinality on stress, Command is used.

influxdb 2.0 authorization token required mandatorily

environment

influxdb: 1.8  (auth disabled)
inch: latest

can't run inch without auth token

root@9df1bf7dfbc4:/# inch   -host  http://10.43.142.118:8086                            
Host: http://10.43.142.118:8086
Concurrency: 1
Virtual Hosts: 0
Measurements: 1
Tag cardinalities: [10 10 10]
Points per series: 100
Total series: 1000
Total points: 100000
Total fields per point: 1
Randomized field values: false
Multiple writes per point: false
Batch Size: 5000
Database: stress (Shard duration: 7d)
Write Consistency: any
Writing into InfluxDB 2.0: false
InfluxDB 2.0 Authorization Token:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.