Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.9k views
in Technique[技术] by (71.8m points)

performance testing - What is the ideal ratio between No of threads and ramp-up period in Jmeter for REST API

I need to design a very basic Performance test for REST API.

no of concurrent users=40, response time= less than 500ms

Usually what is ideal ratio between no of threads and ramp up period?

I read somewhere - Virtual users arrival rate should be something like 25-50 users per second. But I don't know its authenticity.

For my case shall I give ramp up period as 2 seconds?

Thanks in Advance!!!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The main purpose of the ramp-up period is that the load should be increased gradually (unless you're doing Spike Testing)

This way you will be able to correlate increasing load with increasing (hopefully) number of requests per second, response time, number of errors, etc. and if you will be kicking off threads without any ramp-up period - you will be able to state only that your application can (or cannot) support 40 concurrent users with (reasonable?) response time of 500 milliseconds.

As per JMeter documentation

Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).

Start with Ramp-up = number of threads and adjust up or down as needed.

So if you don't have better ideas you can go for the following setup:

  • 40 seconds of ramp-up
  • couple of minutes to hold the load
  • optionally 40 seconds of ramp-down (you might be interested in decreasing the load gradually as well to see whether application goes back to normal when the load decreases)

More information: JMeter Ramp-Up - The Ultimate Guide


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.4k users

...