Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Benchmark Support - setting concurrency, num-requests, & time-limit. #68

Open
HelloGrayson opened this issue Oct 8, 2015 · 11 comments
Open

Comments

@HelloGrayson
Copy link
Contributor

Their are lots of times where I've found myself wanting to do a quick and dirty stress test from tcurl. Let's add Apache Bench-like functionality so that we can easily run concurrent traffic from the command line.

Starting with a --concurrency flag would go a long ways towards this goal.

# issue 100k requests at 1k concurrency
tcurl hyperbahn --health --concurrency=1000 --num-requests=100000

# issue requests for 1m at 1k concurrency
tcurl hyperbahn --health --concurrency=1000 --time-limit=60
@HelloGrayson HelloGrayson changed the title Setting concurrency - quick & dirty stress tests ab-like stress testing functionality Oct 8, 2015
@HelloGrayson HelloGrayson changed the title ab-like stress testing functionality Set concurrency, num-requests, & time-limit. Oct 8, 2015
@Raynos
Copy link
Contributor

Raynos commented Oct 8, 2015

@HelloGrayson
Copy link
Contributor Author

Golang's sniper also has a nice interface: https://github.com/lubia/sniper

@Raynos
Copy link
Contributor

Raynos commented Oct 8, 2015

I would love to have this feature btw; if someone can bang it out then mega 👍 should be pretty easy if you steal the BatchClient from hyperbahn.

@HelloGrayson HelloGrayson changed the title Set concurrency, num-requests, & time-limit. Benchmark Support - setting concurrency, num-requests, & time-limit. Oct 8, 2015
@ShanniLi ShanniLi self-assigned this Oct 9, 2015
@ShanniLi
Copy link
Contributor

ShanniLi commented Oct 9, 2015

Do we want to also add a time interval between each burst?

@Raynos
Copy link
Contributor

Raynos commented Oct 9, 2015

What hyperbahn batch client does is:

  • N reqs in parallel;
  • wait M ms;
  • repeat.

I dont know how that measures with "concurrency"; you would probably be like "if concurrency 1000 then divide by 100; do batches of N=100reqs; M=100ms"

You probably also want a flag for "flushing/blocking" etc.

The BatchClient in hyperbahn does not wait; it will just slam you on an interval and not care about response or "maximum requests in flight".

@ShanniLi
Copy link
Contributor

ShanniLi commented Oct 9, 2015

I think @breerly means: concurrency == N.

The reason I ask about the time interval is that I want some way to send requests at a certain QPS. This will also be useful for testing rate limiting. I have my own private integration test for that now. :)

@Raynos
Copy link
Contributor

Raynos commented Oct 9, 2015

I think tests where we send Nk at the start are useless.

The dials you want is:

  • req/s
  • total reqs or total time
  • maximum reqs in flight
  • delay
tcurl --requests 100000 --rate 1000 #100k @ 1k req/s
tcurl --time 60 --rate 1000 #60s @ 1k req/s
tcurl --requests 100000 --rate 1000 --concurrency 1000 #100k @ 1k req/s bound concurrency to 1000
tcurl --requests 100000 --rate 1000 --delay 250 #100k @ 1k req/s with 250ms batching delay

Note: default concurrency of {rate} and default delay of 100ms

I may be completely wrong here.

@ShanniLi
Copy link
Contributor

ShanniLi commented Oct 9, 2015

@breerly I think rate is what you want. Do we also need concurrency?

@Raynos
Copy link
Contributor

Raynos commented Oct 9, 2015

we totally need concurrency :) but maybe not v0.

@ShanniLi
Copy link
Contributor

ShanniLi commented Oct 9, 2015

@Raynos Sounds good, I will start with v0 without concurrency, i.e., set concurrency = rate.

@HelloGrayson
Copy link
Contributor Author

Sounds good to me guys :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants