Pages

Wednesday, 30 November 2016

What is Pacing in Performance Testing?


The content has been moved to PerfMatrix Site.




11 comments:

  1. Hi Gagan
    if we choose 3rd option at Fixed interval with 10 sec of pacing and suppose first iteration end at t=11 sec then how this 10 sec pacing will behave

    ReplyDelete
    Replies
    1. If the Vuser surpasses the specified interval, then it proceeds to next iteration without waiting. In such a case the log displays a message that says “Iteration pacing cannot be reached (pace time = 10.00, actual time = 11.00).”

      Delete
  2. Hi Gagan,

    To calculate Pacing as per formula, Think time is required. To calculate think time as per formula, Pacing is required.

    But, How to calculate both ?

    For ex :

    Target 1800 transactions per hr.
    1 script contains 30 transactions.
    1 Iteration is taking 30 seconds ?

    How to calculate both think time & Pacing for above ?

    ReplyDelete
  3. The ideal approach starts from TPS and Response Time, if you have both numbers then you can easily calculate/decide pacing, think time and number of users. Let's consider your case:

    Given That:
    TPS = 0.5
    Response Time (of 1 iteration) = 30 seconds

    Let's assume you will apply 100 Users load on the application
    so,

    No. of Users = TPS * (Response Time + Pacing + Think Time * (No. of Transaction - 1))

    100 = 0.5 * (30 + Pacing + Think Time * (30 - 1))
    => 100/0.5 = 30 + Pacing +Think Time * 29
    => 200 = 30 + Pacing + Think Time * 29
    => 200-30 = Pacing +Think Time * 29
    => 170 = Pacing + Think Time * 29

    here we have 2 unknown matrices. Now, think practically, how much time a user spent on a page (depends on your application). You need to assume one of the matrices and it would be recommended to assume think time, because practically you can predict human behaviour and decide an approx think time as per content available on the web page or with the help of user input on the particular page. I would assume 5 seconds:

    => 170 = Pacing + 5 * 29
    => 170 = Pacing + 145
    => 170 - 145 = Pacing
    => Pacing = 25

    Note: I assumed average think time, if you have different think time for all the transaction then sum the think time and use below formula:

    No. of Users = TPS * (Response Time + Pacing + Total Think Time)

    ReplyDelete
  4. Requirement is:

    I need to achieve 10000 transaction per hour.
    Need to do 1 hour execution.
    Need to specify think time and pacing time
    Note:

    My script "aircraft" contains 7 transactions.
    Overall Response time is 16 sec without think time.

    ReplyDelete
    Replies
    1. Given:
      TPH: 10000
      No of transactions in each Iteration: 7
      Iteration per hour: 1428
      End to End Response Time: 16 seconds

      Consider:
      No. of Users: 24

      Here is answer:
      Think time per transaction: 3 seconds
      (Between each transactions T1->TT->T2->TT->T3->TT->T4->TT->T5->TT->T6->TT->T7) = 6 * 3 = 18 seconds total think time in an itearation

      Pacing: 30 seconds

      Delete
    2. Hi Gagan,
      I have one doubt,
      there are 1428 iterations/hr,1 iteration is taking 16 sec,i think max we can achieve 225 iterations only per hr right.how can we achieve this tph?

      Delete
    3. Hi Harish,

      1428 iterations need to be achieved by 26 users (corrected from my previous reply) and each iteration will take 64 seconds (Response Time: 16, Think Time: 18 & Pacing: 30).

      Like wise 1 user will complete ~55 iterations per hour (or 384 transactions per hour)
      Hence 26 users will complete 384*26 = 9996 TPS (which is close to actual requirement).

      Kindly let me know if you still have any doubt.

      Delete
  5. Hi,

    I wanted to prepare WLM of having 14 scripts each having 6 transactions. And user would be 2200. While sleep time(resp time + TT+ Pacing) of each script is 5mins. How can I calculate the TPS?

    ReplyDelete
    Replies
    1. Hi Priyanka,

      Please use TPS calculator to find out the TPS of given scenario.

      http://perfmatrix.blogspot.com/2016/11/tps-calculator.html

      I can calculate for you but you have not given me the user distribution per script. Therefore I would suggest to calculate the TPS of each scenario using above given calculator and sum-up them to find out the Total TPS.

      Delete