Friday, September 18, 2015

COMPLAINS FOR MISSING STEP THREAD GROUP OR ULTIMATE THREAD GROUP In JMeter Remote Testing



If the JMeter test is using Stepping Thread Group or Ultimate Thread Group, So we need to make sure the slave machines are installed Jmeterplugin ,  without this plugin the Stepping Thread Group and Ultimate Thread Group won’t be support and Slave machine can’t run the Jmeter test.  If you don’t install the Plugin , from the menu, you can’t see the choices:

·         jp@gc – Stepping Thread Group
·         jp@gc – Ultimate Thread Group
And when you try to run remote Start… there will be an error message pops up for complaining can’t find the Stepping Thread Group…..

How to fix the memory leak problem in JMeter performance testing?

When JMeter is running heavy load testing with HTTP(S) sampler, sometimes, you will met some very painful issue, you test is freezed and no responding.  This could be the CPU and memory are consumed too much during your load test.  How to solve this issue:

  1. use non-GUI mode
  2.  remove or disable unnecessary listeners. Such as  “View Results Tree”
  3. Increase the JMeter heap memory:
  •  Open the ‘JMeter.bat’ file with a text editor
  •   Find “set HEAP”
  •  Modify the Heap value to whatever you like. Like this
       
 
this link is good for learning more.

Why the # of Threads in .jtl file are not matching with the actual threads count when using JMeter Distributed testing?



When we using JMeter Remote testing, more than one slave machines are running the same tests and the test results from all of the slave machines will record in the client machine. Aggregate.jtl file will save all of the test results and we can analyze the results from the .jtl file information. But I found one more issue at here.  The number of threads (Virtual Users) is not matching what we expect. For example,
We have 2 slave machines to run our test; each slave machine will run 100 threads, so we totally use 200 threads.  And after we run the remote tests in the two slave machine, we saw 200 samples but only 100 thread records in the .jtl file, rather than 200 samples and 200 threads.
 Why? 
This is because the 2 slave machines running the exactly the same test with the exact same Thread Group Name, so in the .jtl file, they can’t figure out which thread group is coming from slave machine 1 or slave machine 2, so it thinks they have the same thread group name, so they are the same thread, rather than two different threads. 
How to solve this issue and make the .jtl result file have the correct thread number?
The solution is we need to let the thread group name is different and .jtl will know it comes from which slave machines.  So we need to change the thread group name from the static name to be a dynamic name with slave machine ip or name.  The functions ${__machineName()} and ${__machineIP()} are our key to solve the problem. 


 If you are doing distributed tests, you should name the thread groups like this in your test plan:

${__machineName()}_My Threadgroup name


Or

${__machineIP()}_My Threadgroup name
 


 
After modified the thread group name in the test plan, in the active threads over time listener, we can see each test thread in the test plan are records according to the running slave machines like this 


The follwing link is helping to fix my # of threads issue. :)