Concurrency and ultimate thread group Setup - concurrency

I want to use Concurrency thread group, so I'm using this configuration
Why I'm expecting is to send 10 requests in 5 seconds, and hold them for 1 second but the result after running my script is this, more than 10 http request are send.
How can I control only send 10 requests?
Thank you.
A similar behaviour happens with Ultimate thread group

You're not sending 10 requests in 5 seconds, you're launching 5 threads (virtual users) in 5 seconds, to wit JMeter will add 2 virtual users each second for 5 seconds and then hold the load for 1 second.
The actual number of requests which will be made depends on your application response time, higher response time - less requests, lower response time - more requests.
If you want to send exactly 10 requests in 5 seconds evenly distributed go for the following configuration:
Normal Thread Group with users * loops = 10, to wit:
10 users - 1 loop
5 users - 2 loops
etc.
Throughput Controller in Total Executions mode and Throughput set to 10
HTTP Request
Throughput Shaping Timer configured to send 2 requests per second

Related

Cloud function, 2nd gen concurrency?

They saying 2nd gen is
Concurrency: Process up to 1000 concurrent requests with a single function instance,
minimizing cold starts and improving latency when scaling.
but as far as I know..
pre ver Cloud function`s maximum concurrent invocation of a single instance is 3000
so is it kinda downgrade??
Gen 1 functions can only handle 1 concurrent request at a time per instance. This means that while your code is processing one request, there is no possibility of a second request being routed to the same instance.
Gen 2 functions on the other hand can handle up to 1000 concurrent requests per function instance.

How can gunicorn handle hundreds of thousands of requests per second for django?

From the docs - How many workers,
DO NOT scale the number of workers to the number of clients you expect to have. Gunicorn should only need 4-12 worker processes to handle hundreds or thousands of requests per second.
Generally we recommend (2 x $num_cores) + 1 as the number of workers to start off with.
From threads,
The number of worker threads for handling requests.
Run each worker with the specified number of threads.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You’ll want to vary this a bit to find the best for your particular application’s workload.
Now the question is what no of threads and workers can serve hundreds or thousands of requests per second?
Let's say I have a dual-core machine and I set 5 workers and 8 threads. And I can serve 40 concurrent requests?
If I am going to serve hundreds or thousands of requests, I'll need a hundred cores?
this line is very hard to understand:
Gunicorn should only need 4-12 worker processes to handle hundreds or
thousands of requests per second.
Now the question is what no of threads and workers can serve hundreds or thousands of requests per second? Let's say I have a dual-core machine and I set 5 workers and 8 threads. And I can serve 40 concurrent requests?
Yes, with 5 worker processes, each with 8 threads, 40 concurrent requests can be served. How quickly they'll be served on a dual-core box is another question.
If I am going to serve hundreds or thousands of requests, I'll need a hundred cores?
Not quite. Requests per second is not the same as "concurrent requests".
If each request takes exactly 1 millisecond to handle, then a single worker can serve 1000 RPS. If each request takes 10 milliseconds, a single worker dishes out 100 RPS.
If some requests take 10 milliseconds, others take, say, up to 5 seconds, then you'll need more than one concurrent worker, so the one request that takes 5 seconds does not "hog" all of your serving capability.

Batch of notifications takes ~10 seconds

I'm performing batches of 50 notifications requests to facebook graph api using POSTMAN and cURL according to the docs: batch-api-docs
Entire batch completion takes from 7 to 10 seconds with 46 success and 4 errors which is very slow.
Single success request(without batch I mean) takes like 1 second so I expected batch will take similar time but it's not. Does anybody know the reason?
A batch request only reduces the number of HTTP requests you are making. It does not affect anything else that is going on in the background.
Sending a notification to a user and getting a success/error response will simply take a certain amount of time. And multiplying that amount by 1 or by 50 is just going to result in different numbers.

Concurrency Thread Group Showing more Samples then define

I am using Concurrency Thread group with the following values
Target Concurrency: 200,
Ramp-Up Time: 5 min,
Ramp-Up Step Count: 10,
Hold Target Rate Time : 0 min,
Thread Iteration Limit: 1.
I am Using Throughput Controller as a child to Concurrency Thread Group, Total Executions, Throughput = 1, per User selected.
I am 5 HTTP Request, What I am expected is each HTTP request should have 200 users but, it shows more than 300 users.
Can anyone tell me, that my expectation is wrong or my setup is wrong?
What is the best way to do?
Your expectation is wrong. With regards to your setup - we don't know what you're trying to achieve.
Concurrency Thread Group maintains the defined concurrency so
JMeter will start with 20 users
In 30 seconds another 20 users will be kicked off so you will have 40 users
In 60 seconds another 20 users will arrive so you will have 60 users
etc.
Once started the threads will begin executing Sampler(s) upside down (or according to Logic Controllers) and the actual number of requests will depend on your application response time.
Your "Thread Iteration Limit" setting allows the threads to loop only once so thread will be stopped once it executed all the samplers, however Concurrency Thread Group will kick off another thread to replace the ended one in order to maintain the defined concurrency
If you want to limit the total number of executions to 200 you can go for Throughput Controller
and this way you will have only 200 executions of its children
Be aware that in the above setup your test will still be running for 5 minutes, however the threads will not be executing samplers after 200 total executions.

Burp Suit attack every 10 minutes

I am in the intruder tab of Burp Suit Free Edition v1.7.03
I'm able to make an attack which is generally a HTTP request but what I want is HTTP request should be made every 10 minutes instead of default 3 seconds time interval (approx)
I don't know where the 3 seconds default came from, I think Burp tries as fast as possible by default. But anyways, I think you can set it with the Throttle settings under Intruder/Options/Request Engine. You need to set the Number of Threads to 1, and set Throttle to 600000, like this:
Setting throttle to 10 minutes