Skip to content

Enable recall/percentile latency charts on results#300

Merged
maumueller merged 2 commits intoerikbern:masterfrom
RedisAI:recall.percentiles
Jul 11, 2022
Merged

Enable recall/percentile latency charts on results#300
maumueller merged 2 commits intoerikbern:masterfrom
RedisAI:recall.percentiles

Conversation

@filipecosta90
Copy link
Copy Markdown
Contributor

The following PR enables latency by percentile analysis for a set of common percentiles on the generated results website: p50, p95, p99, and p999 -- i.e. the median and and tail latencies. In other words, They are the latency thresholds at which 50%, 95%, 99%, and 99.9% of queries are faster than that particular presented value.

latency and qps analysis -- and why we need both

For distributions that are non-normal, such as the latency, many “basic rules” of normally distributed statistics are violated. Instead of computing just the mean (or a single number which is the inverse related toqps), which tries to express the whole distribution in a single result, we can use a sampling of the distribution at intervals -- percentiles, which tell you how many requests actually would experience that delay.

Further notes

I believe that as soon as this benchmark utility allows for extended latency tracking/analysis, further questions/requests will arise -- for example allowing for constant throughput benchmarks ( but first things first ).

If you want to dive deeper on extended latency analysis here's a list of further references for documentation, projects and presentations diving deeper in the discussed subject:

@maumueller
Copy link
Copy Markdown
Collaborator

Thanks!

Some general observations:

  1. The individual running times are part of the result hdf5 file. (It's the 'times' group.) I don't see why you should compute this during query time.
  2. I would prefer using numpy.percentile instead of another dependency. Am I missing why it doesn't work?

@filipecosta90
Copy link
Copy Markdown
Contributor Author

WRT:

1. The individual running times are part of the result hdf5 file. (It's the `'times'` group.) I don't see why you should compute this during query time.

I missed that. will do the change 👍

WRT:

2. I would prefer using `numpy.percentile` instead of another dependency. Am I missing why it doesn't work?

It will work, and for this case ( small number of total observations ) it might not compensate to use a sketching DS given as you mentioned above you already preserve all latencies. It makes sense to use the hdrhistogram or any other approximate computation sketch when you don't want to keep the entire data. Given the entire data is kept no reason to use it. Will swap to numpy.percentile over the times group.

@maumueller
Copy link
Copy Markdown
Collaborator

Thanks!

@filipecosta90
Copy link
Copy Markdown
Contributor Author

Thanks!

@maumueller I've updated the PR based upon your recommendations. Ready for review =)

@erikbern
Copy link
Copy Markdown
Owner

erikbern commented Jun 5, 2022

Interesting change!

Do you have results for this? My guess would be that you don't have the power-law type fat-tailed latencies you typically see in distributed systems, but that the tails are fairly thin. But I could be wrong!

Copy link
Copy Markdown

@GuyAv46 GuyAv46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One fix

@filipecosta90
Copy link
Copy Markdown
Contributor Author

Interesting change!

Do you have results for this? My guess would be that you don't have the power-law type fat-tailed latencies you typically see in distributed systems, but that the tails are fairly thin. But I could be wrong!

Given long tails might be related to resource saturation, queuing, etc... I believe we will still see longtails -- and there is no harm there :). However, one favorable thing I think we will avoid is the multi-modal latencies distribution given we're targeting the same type of operations, etc...

image

image

filipecosta90 added a commit to RedisAI/ann-benchmarks that referenced this pull request Jun 9, 2022
CP for erikbern#300: Enable recall/latency charts on results
@maumueller maumueller merged commit 4387b94 into erikbern:master Jul 11, 2022
@maumueller
Copy link
Copy Markdown
Collaborator

maumueller commented Jul 11, 2022

Sorry, @filipecosta90, I lost track of it. PR looks good and I merged it. Thanks for the contribution.

@filipecosta90 filipecosta90 deleted the recall.percentiles branch July 11, 2022 11:46
erikbern pushed a commit that referenced this pull request Apr 14, 2023
* Enable recall/latency charts on results

* Fixes per PR review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants