Code Monkey home page Code Monkey logo

Comments (2)

cjnolet avatar cjnolet commented on August 25, 2024

@pazzap123 your understanding of latency and throughput modes are mostly correct, except that both the latency and throughput mode can have a batch size > 1. As a result, we are in effect measuring the latency of each batch.

To make this comparison fair, we use a thread pool for the cpu-based algorithms, since the gpu-based algorithms will process a batch at a time by saturating the gpu.

from raft.

pazzap123 avatar pazzap123 commented on August 25, 2024

Thank you! I made a mistake by trying to use the command line -threads to control available threads for batching in the latency test even though the help says it is for the throughput test (I set -batch-size=10 and nthreads=1 and then nthreads=10, and assumed the batch would get serialized on case1 and all 10 would be sent together in case2). I have to use numThreads in the conf files instead for this.

When I compare the performance on a high core count system of
-> Throughput test with batch-size=10, -threads=10
-> Latency test with batch-size=10, numThreads=10

The throughput test performs better, i assume because of two effects:

  1. All queries have to complete in a batch for the latency test before it tries another iteration, so the longest leg impacts that batch's time; For throughput, as soon as any query is done, another can be jammed in (meaning if query 1 of those 10 finished, another query can be sent in from the next iteration)?

  2. Maybe a second overhead related to thread synchronization overhead (pthreads) at the boundaries of each batch since it has to wait for all to complete and synchronize.

I tried to illustrate it with a simple example of how things would work with some long running queries.
hnsw-lat-bw

from raft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.