What do we mean by "top percentile" or TP based latency?

49,506

tp90 is a maximum time under which 90% of requests have been served. Imagine you have times:

10s
1000s
100s
2s

Calculating TP is very simple:

  • sort all times in ascending order: [2s, 10s, 100s, 1000s]
  • find latest item in portion you need to calculate. For TP50 it will ceil(4*.5)=2 requests. You need 2nd request. For TP90 it will be ceil(4*.9)=4. You need 4th request.
  • get time for the item found above. TP50=10s. TP90=1000s
Share:
49,506

Related videos on Youtube

user1071840
Author by

user1071840

Updated on July 09, 2022

Comments

  • user1071840
    user1071840 almost 2 years

    When we discuss performance of a distributed system we use the terms tp50, tp90, tp99.99 TPS. Could someone explain what do we mean by those?

  • sichinumi
    sichinumi over 8 years
    This doesn't seem to match with the statistical definition of a percentile. Instead of using a ceiling to find an index, you should be averaging the two closest indices. For example, in a 4-element list, TP50 is the average of the 2nd and 3rd elements, not just the 2nd element. (This is assuming TP50 means the 50th percentile.) The exact formula is i=(k/100)(n+1) to find your desired index, where k is your percentile and n is the number of elements in your list. If i is not a whole number, average the two nearest indices.
  • Underoos
    Underoos over 2 years
    I think it is maximum time. Not minimum time
  • Sergey Romanovsky
    Sergey Romanovsky over 2 years
    @Underoos you're right, I fixed the typo, thanks!