I have the following JMeter context:
In one Concurrency Thread Group 1, I have a JSR223 Sampler which sends request messages to an MQ queue1 and always gets the JMSMessageID and an epochTimestamp (derived from JMS_IBM_PutDate JMS_IBM_PutTime) and puts them into one variable. Underneath this Sampler is an Inter-Thread Communication PostProcessor element which gets the data from this variable and puts it into a FIFO QUEUE.
In another Concurrency Thread Group 2, I have another JSR223 Sampler with code to get the response messages for all the messages sent on MQ queue 1 from an MQ queue2. To do this, (and be able to calculate the response time fore each message) before the JSR223 Sampler executes, I use the Inter-Thread Communication PreProcessor element which gets a message ID and a timestamp from the FIFO queue (60 seconds timeout) and passes it over to a variable with which the JSR223 Sampler can work to calculate the request-response time for each message.
I want to stress-test the system, which is why I am gradually dynamically increasing the Requests per second at every 1 minute (for script testing purposes) in both thread groups, like so:
I use the tstFeedback
function of Concurrency Thread Group for this:
${__tstFeedback(ThroughputShapingTimerIn,1,1000,10)}
My problem is this:
When I gradually increase the desired TPS load, during the first 4 target TPS steps, the Consumer threads keep up (synchronized) with the Producer threads, but as the time passes and load increases, the consumer threads seem to be taking more time to find and consume the messages. It's as though the load of the consumer treads is no longer able to keep up with the load of the producer threads, despite both thread groups having the same load pattern. This eventually causes the queue2 which is keeping the response messages to get full. Here is a visual representation of what I mean: The Consumer samples end up being much less than the producer samples. My expectation is that they should be more or less equal...
I need to understand how I can go about to debug this script and isolate the cause:
- I think that something happens at the inter-thread synchronization level because sometimes I am getting null values from the FIFO queue into the consumer threads - I need to understand what gets put into that FIFO queue and what gets taken off of that FIFO queue. How can I print what is present in the FIFO list at each iteration?
- Does anyone have any suggestions for what could be the cause of this behavior and how to mitigate it?
Any help/suggestion is greatly appreciated.
CodePudding user response: