I am conducting stress testing for a upload functionality and need to determe the appropriate number of concurrent users to simulate on a single machine.
We do have multiple machines that we can use, however, each one machine may have a upload speed limit. So we can not let one machine simulate too many users, otherwise lots of timeouts would happen due to each simulated user not getting enough bandwidth.
Here are the relevant details:
The total upload speed of one machine is 20 MB/s. The size of the uploaded file is 1 MB. Users want to ensure that a file of this size is uploaded within a specific time frame, let's say 5 seconds.
Based on some rough estimations and assumptions, here is the formula I used:
File Size / Expected Upload Time * 1.5 = Required upload speed per thread
Total upload speed / Required upload speed per thread = Number of threads that can be simulated on a single machine
For example:
1 MB file / 5 s * 1.5 = Required upload speed per thread of at least 0.3 MB/s
20 MB/s / 0.3 MB/s = 66 threads
However, I would like to confirm if my approach is correct and if there are any other factors I should consider in determining the optimal number of concurrent users for this performance testing scenario. Any insights, suggestions, or alternative methods would be greatly appreciated.
reference formula: https://onedrive.live.com/view.aspx?resid=8518703D7F80A77C!1937&ithint=file%2cxlsx&authkey=!AGxCKFR5UWmFap8
20 MB/sdoesn't seem to me hitting the limit of your network card, most probably you have 1 gigabit which results into something like 125 megabytes per second.In general the approach should be following:
Set up monitoring of baseline OS health metrics (CPU, RAM, Network, Disk usage, etc.) If you don't have any better idea in mind you can go for JMeter PerfMon Plugin
Start with 1 virtual user and gradually increase the load until any of monitored metrics starts exceeding i.e. 90% of total available capacity. Once it reached - stop the test and check how many users were online using i.e. Active Threads Over Time plugin or JMeter Reporting Dashboard
This is how many users you can simulate from one machine.