52

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?

user1071840
  • 3,522
  • 9
  • 48
  • 74

2 Answers2

99

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
Sergey Romanovsky
  • 4,216
  • 4
  • 25
  • 27
  • 8
    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. – sichinumi Oct 23 '15 at 17:36
  • I think it is maximum time. Not minimum time – Underoos Dec 29 '21 at 13:56
  • @Underoos you're right, I fixed the typo, thanks! – Sergey Romanovsky Jan 05 '22 at 18:24
2

Say if we are referring to in-terms of performance of an API, TP90 is the max time under which 90% of requests have been served.

TPx: Max response time taken by xth percentile of requests.

time taken by 10 requests in ms [2,1,3,4,5,6,7,8,9,10] - there are 10 response times

TP100 = 10   
TP90 = 9   
TP50 = 5   
src3369
  • 1,839
  • 2
  • 17
  • 18