title: How to setup Jmeter test to have a certain throughput?
body: <p>I am trying to perform a load test, and according to our stats (that I can't disclose) we expect peaks of 300 users per minute, uploading files of different sizes to our system.</p>
  <p>Now, I created a jmeter test, which works fine, but what I don't know how to fine tune is - aim for certain throughput.</p>
  <p>I create a test with 150 users 100 loops, expecting it to simulate 150 users coming and going, and in total upload 15000 files, but that never happened because at certain point tests started failing.</p>
  <p>Looking at our new relic monitoring, it seems that somehow I reached 1600 requests in a single minute. I am testing a microservice, running 12 instances, so that might play the role here for a higher number of requests, but even with it I expected tests to pass. My uploaded file was 600kb. In the end, I had 98% failure.</p>
  <p>I reduced the file size to 13kb, at that point, I got 17% failiure.</p>
  <p>So, there's obviously something with the time needed to upload the bigger file, but I don't understand what causes 150 thread/users in X loops to become 1600 at the same time. I'd expect Jmeter to never start a new loop with the same thread, unless the original user is finished. That being said - I'd expect tops 150 users in a given minute.</p>
  <p>Any clarification on how to get exact number of users/threads running at the same time is well appreciated.</p>
  <p>I tried to play with KeepAlive checkbox, I tried adding lifetime of request to 10 seconds (all them uploads get response earlier) - but then JMeter finished the Thread, and I had only 150 runs, no loops.</p>
  <p>Thanks!</p>