Workload modelling_JMeter Performance Testing

41 views Asked by At

I have "10 Scenarios" each having "10 transactions". overall Script execution time is "45 sec" without think time and pacing. According to littles law No of transactions in one iteration=? How many I have to give either 10 or 100

I want to achieve 20 TPS. Please help me

2

There are 2 answers

1
kenneth On

If you want to achieve 20 TPS with (10 scenarios * 10 transactions) = 100 transactions you would need a pacing of 20 sec. (pacing - responsetime = thinktime) with 4 threads per scenario:

enter image description here

My Excel calc's:

  1. Total transactions =VU*(Scenarios*Transactions)
  2. TPH =(3600/Pacing)*Total transactions
  3. TPS =TPH/3600

You would need 4 threads/VU per scenario with a pacing of 20 sec.

I calculate my thinktime in JMeter with a JSR223 PostProcessor:

def responsetime = prev.getTime()
def pacing_bool = Boolean.valueOf(vars.get("b_pacing"))
def pacing_ms = Long.valueOf(vars.get("n_pacing"))
def thinktime_ms = Long.valueOf(vars.get("n_thinkTime"))

if (responsetime < pacing_ms && pacing_bool) {
    thinktime_ms = (pacing_ms - responsetime)
} else {
    thinktime_ms = 0
}

vars.put("n_thinkTime", String.valueOf(thinktime_ms))
log.info("(${__threadGroupName} - ${__threadNum}) Think Time after " + prev.toString() + " is set to: " + thinktime_ms + "ms (pacing " + pacing_ms + ")")
1
Dmitri T On

You need to provide the sufficient amount of threads, the exact number depends on your application response time. If response time is 500ms 10 users will be sufficient, if response time is 1 second - you will need 20 users, etc.

If you want to create exactly 20 TPS load you can use i.e. Throughput Shaping Timer

enter image description here

Throughput Shaping Timer can be installed using JMeter Plugins Manager