How to reduce the bandwidth size in Jmeter? - jmeter

I have to test performance of project with 20kbps and 40kbps using Jmeter.
I am digging how to set up bandwidth in Jmeter.
Please help me how to set up it in Jmeter.
Will the below configuration control bandwidth thing?
Or any other configuration is there?
# Define characters per second > 0 to emulate slow connections
httpclient.socket.http.cps=1024
httpclient.socket.https.cps=1024
Thanks.

From here.
To emulate a bandwidth of, say 100kbps, define a CPS of
( 100 * 1024 ) / 8, i.e. 100kB divided by 8, so, that would be
httpclient.socket.http.cps=12800.
Then refer to your summary listener for confirmation this is working.

We always used a 3rd party tool to throttle bandwidth during performance testing, as Jmeter doesn't have a good way to do this.

Related

How to get high rps with JMeter load testing https endpoint

I'm trying to test my https endpoint with JMeter. I want to make at least 10000 requests per second, but when I set the number of threads to 10000 I get way less rps, around 500.
I've tried setting the number of threads to 1000 and 100, surprisingly I get this same number of rps. I'm using HTTP Sampler and "use Keep-Alive" is set to true. When I look in the statistics I see that when using 100 threads, it makes use of Keep-Alive and connect_time is around 100 ms, but when the number of threads is higher connect_time grows, it's like it stops reusing the connections.
I know this isn't a server issue, because I've tried testing that same endpoint with Yandex.Tank and phantom and it can easily maintain 10 000 requests per second, the problem is it can't use response data to make furhter requests, that's why I have to use JMeter for this task.
This can be done by using "Stepping thread group". It will allow you to send 10000 request per second upto specified time. Refer below image.
Stepping Thread Group
Download jar from below link.
https://jmeter-plugins.org/wiki/SteppingThreadGroup/
I hope you are trying to achieve this using one machine. Try with multiple machine or jmeter distributed mode.
https://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf
https://www.blazemeter.com/blog/how-to-perform-distributed-testing-in-jmeter/
https://blazemeter.com/blog/3-common-issues-when-running-jmeter-scripts-and-how-solve-them/
I am assuming that it is the issue with machine which is not able to generate that much load. Usually, i have use max 300 threads per machine but it depend on the machine config. Just check if the machine is having issue and multiple machine is able to generate more load, considering server is not having any issue.
Hope this helps.
Update:-Usually 200-500 can be handled my modern machines.
Please check the below link to have some more info:-
1.How do threads and number of iterations impact test and what is JMeter’s max. thread limit
2.https://www.blazemeter.com/blog/what%e2%80%99s-the-max-number-of-users-you-can-test-on-jmeter/ .

How can we judge an application( For eg: the application is 90%/80% Good , Application is poor Performance) using Jmeter?

How can we judge an application( For eg: the application is 90%/80% Good ,
Application is poor Performance) using Jmeter?
Objective of jmeter is to validate the question "How much load can server handle at a instance" for that purpose you can use :
1) Listeners basically Graph Result which will clear measurement of your website performance.
2) Apart from that you can get the CPU usage and other factors for your servers.
Please go through the following :
Terminologies used for measurement of performance
CPU UTILIZATION CALCULATION USING JMETER
Ultimate Thread Group

open source Load testing tool for Parallel execution

I had used JMeter for load testing but was stuck at a point where had to execute parallel requests which does not seem possible with it.(if possible kindly explain)
So is there any open source tool which could help. Have to increase load upto at least 1000VU
Depending you your hardware you may need to consider remote (distributed) testing where one master host orchestrates multiple JMeter slaves to create immense load.
In regards to "concurrency" JMeter offers 2 test elements to control load pattern.
Synchronizing Timer - for firing X requests at the same moment of time
Constant Throughput Timer - to set exact load like X requests per second
which does not seem possible with it.(if possible kindly explain)
Increase the number of threads(users), that would be the number of simultaneous requests. The home page shows the exact example:
http://jmeter.apache.org/usermanual/build-web-test-plan.html
Hope this helps.
Feel free to try Yandex.Tank - https://github.com/yandex-load/yandex-tank. It can make to 80k parallel requests per second.
As Mr. Dmitri said, You can consider the distributed testing using jmeter.
Also consider the following points,
1.Use 64 bit JVM and increse the heap memory.
2.Run load testing in non gui mode and remove all listeners (you can add it after testing to display results)
3.Use latest version of Jmeter(2.11), because of optimal resource utilization (CPU,Memory). OR
Use Gatling load testing tool(http://gatling-tool.org/). You can find an comparative study of gatling Vs Jmeter

With JMeter, if we increase load,is it possible that our tested server crash?

If suppose I will run load testing with 5000 threads or may be more ,
Will the main server under test crash at a certain level.
As EJP said, it is JMeter purpose to find the limit of tested application and how it will react under performance.
So yes it is perfectly possible.
You should read JMeter Manual.
If you are doing any kind of performance tests (load, stress, soak etc) you will want to know at what point your application server falls over i.e. its breaking point.
Once you've found out what your upper limit is, start dialing back the number of threads until you find your application's "sweet spot" for example CPU usage <80% & >70%

JMeter Load test

I want to load test a URL by hitting it few hundred times at same millisecond . I tried JMeter but I could hit 2 request at same millisecond. This seems to be problem that my machine cant create threads fast enough . Is there any solution to the issue ?
In JMeter you can use synchronizing timer setting it to 100, this way all threads will wait until there are 100 available and hit the server:
http://jmeter.apache.org/usermanual/component_reference.html#Synchronizing_Timer
Another solution is to increase the number of Threads so that you hit this throughput.
In next coming version (2.8) of JMeter you will be able to create threads on demand (created once needed).
Anyway hitting few hundred times at same millisecond is a high load so you will have to tune JMeter correctly.
Regards
Philippe
JMeter uses blocking HTTP client, in order to hit the server at the exact same time with 100 reqeusts you need 100 threads in JMeter. Even providing that, you still don't have 100 cores to actually run such code at the same time. Even if you had 100 cores, it takes some time to start a thread, so you would have to start them in advance and synchronize on some sort of barrier. And that is not supported in JMeter.
Why do you really want to run your server "at same millisecond"? An ordinary load test just calls the server with as many connections as possible, but not necessarily at the same time. Moreover, sometimes you are even adding random sleep between requests to simulate so-called think time.
As per Philippe's answer, JMeter does in fact support synchronous requests. But maybe for what you want something like Apache Bench using -c100 (or tune it to whatever works) is a better option? It's pretty basic stuff but then the overhead is a lot smaller which might help in this situation.
But I would also steal from Tomasz's answer and echo his concern that perhaps this is not really the best way to approach load testing. If you're trying to replicate real life traffic then do you really need such a high level of concurrency?
You need to use Jmeter-server and a host of client machines for load generation. Your single machine is not enough to generate the load itself.

Resources