Indexers Benchmark
In this page we show the performance capabilities of the different Indexers available in Jina Hub.
Results
In the below graphs you can see the performance, in terms of speed and evaluation. Speed is reported for query time, in total seconds. Evaluation is provided as recall, out of the top_k
100. The tables are sorted by time_search
.
gist
Table
name | config | time_search | recall |
---|---|---|---|
Hnsw |
| 10.115 | 0.857 |
Rii |
| 10.238 | 0.671 |
Hnsw |
| 10.266 | 0.878 |
Hnsw |
| 10.280 | 0.879 |
Hnsw |
| 10.475 | 0.914 |
Hnsw |
| 10.515 | 0.858 |
Hnsw |
| 10.663 | 0.943 |
Hnsw |
| 10.693 | 0.939 |
Rii |
| 10.872 | 0.561 |
Hnsw |
| 10.890 | 0.911 |
Hnsw |
| 10.893 | 0.914 |
Rii |
| 11.065 | 0.561 |
Rii |
| 11.068 | 0.561 |
Hnsw |
| 11.090 | 0.939 |
Rii |
| 11.244 | 0.768 |
Rii |
| 11.286 | 0.611 |
Hnsw |
| 11.306 | 0.942 |
Hnsw |
| 11.324 | 0.911 |
Rii |
| 11.476 | 0.611 |
Rii |
| 11.494 | 0.737 |
Rii |
| 11.672 | 0.649 |
Faiss |
| 11.987 | 0.499 |
Rii |
| 12.102 | 0.736 |
Rii |
| 12.108 | 0.649 |
Rii |
| 12.128 | 0.697 |
Rii |
| 12.303 | 0.736 |
Faiss |
| 12.377 | 0.583 |
Faiss |
| 12.391 | 0.510 |
Rii |
| 12.539 | 0.736 |
Rii |
| 12.566 | 0.736 |
Rii |
| 13.361 | 0.802 |
Rii |
| 13.549 | 0.802 |
Rii |
| 13.746 | 0.838 |
Faiss |
| 13.781 | 0.599 |
Rii |
| 13.854 | 0.611 |
Rii |
| 13.854 | 0.561 |
Rii |
| 13.946 | 0.838 |
Rii |
| 14.659 | 0.689 |
Rii |
| 14.734 | 0.649 |
Rii |
| 15.036 | 0.689 |
Rii |
| 15.058 | 0.649 |
Faiss |
| 15.182 | 0.617 |
Rii |
| 15.293 | 0.697 |
Rii |
| 15.488 | 0.689 |
Rii |
| 15.681 | 0.689 |
Rii |
| 15.795 | 0.697 |
Faiss |
| 16.567 | 0.693 |
Rii |
| 16.810 | 0.802 |
Faiss |
| 17.420 | 0.601 |
Rii |
| 17.559 | 0.838 |
Faiss |
| 18.035 | 0.765 |
Rii |
| 18.488 | 0.611 |
Faiss |
| 21.598 | 0.832 |
Faiss |
| 23.483 | 0.788 |
Faiss |
| 30.475 | 0.862 |
Faiss |
| 31.892 | 0.911 |
Faiss |
| 42.589 | 0.861 |
Faiss |
| 48.416 | 0.926 |
Faiss |
| 51.615 | 0.802 |
Faiss |
| 51.866 | 0.959 |
Faiss |
| 69.125 | 0.956 |
Faiss |
| 85.781 | 0.988 |
Faiss |
| 85.789 | 0.981 |
Faiss |
| 86.327 | 0.862 |
Faiss |
| 148.602 | 1.000 |
Faiss |
| 241.103 | 1.000 |
Table
name | config | time_search | recall |
---|---|---|---|
Rii |
| 9.639 | 0.381 |
Rii |
| 10.052 | 0.458 |
Rii |
| 10.241 | 0.482 |
Hnsw |
| 10.260 | 0.786 |
Hnsw |
| 10.271 | 0.785 |
Rii |
| 10.456 | 0.413 |
Rii |
| 10.460 | 0.538 |
Hnsw |
| 10.464 | 0.807 |
Rii |
| 10.478 | 0.490 |
Rii |
| 10.685 | 0.422 |
Hnsw |
| 10.712 | 0.807 |
Hnsw |
| 10.862 | 0.867 |
Rii |
| 10.865 | 0.576 |
Rii |
| 10.869 | 0.495 |
Hnsw |
| 10.893 | 0.874 |
Hnsw |
| 11.052 | 0.903 |
Hnsw |
| 11.095 | 0.868 |
Rii |
| 11.211 | 0.530 |
Hnsw |
| 11.280 | 0.910 |
Hnsw |
| 11.297 | 0.874 |
Rii |
| 11.306 | 0.518 |
Hnsw |
| 11.306 | 0.910 |
Rii |
| 11.320 | 0.452 |
Hnsw |
| 11.523 | 0.903 |
Rii |
| 11.656 | 0.601 |
Rii |
| 11.891 | 0.569 |
Rii |
| 12.490 | 0.641 |
Rii |
| 13.155 | 0.455 |
Rii |
| 13.702 | 0.681 |
Faiss |
| 14.883 | 0.408 |
Rii |
| 15.369 | 0.608 |
Rii |
| 15.470 | 0.596 |
Faiss |
| 15.670 | 0.500 |
Rii |
| 15.958 | 0.608 |
Rii |
| 15.966 | 0.654 |
Rii |
| 16.701 | 0.455 |
Faiss |
| 16.733 | 0.415 |
Rii |
| 16.917 | 0.508 |
Rii |
| 17.995 | 0.508 |
Rii |
| 18.159 | 0.554 |
Rii |
| 18.497 | 0.554 |
Faiss |
| 18.524 | 0.512 |
Rii |
| 19.309 | 0.736 |
Rii |
| 19.466 | 0.654 |
Rii |
| 20.501 | 0.786 |
Faiss |
| 22.263 | 0.589 |
Rii |
| 22.674 | 0.736 |
Rii |
| 24.885 | 0.786 |
Faiss |
| 27.338 | 0.676 |
Faiss |
| 27.682 | 0.741 |
Faiss |
| 39.996 | 0.779 |
Faiss |
| 42.739 | 0.828 |
Faiss |
| 61.930 | 0.856 |
Faiss |
| 65.994 | 0.910 |
Faiss |
| 86.940 | 0.854 |
Faiss |
| 106.795 | 0.926 |
Faiss |
| 108.918 | 0.956 |
Faiss |
| 116.630 | 0.778 |
Faiss |
| 169.056 | 0.952 |
Faiss |
| 193.191 | 0.974 |
Faiss |
| 205.614 | 0.989 |
Faiss |
| 218.027 | 0.836 |
Faiss |
| 337.916 | 0.999 |
Faiss |
| 578.059 | 1.000 |
Table
name | config | time_search | recall |
---|---|---|---|
Rii |
| 10.266 | 0.324 |
Rii |
| 10.451 | 0.353 |
Hnsw |
| 10.454 | 0.726 |
Rii |
| 10.475 | 0.271 |
Rii |
| 10.650 | 0.388 |
Rii |
| 10.681 | 0.303 |
Hnsw |
| 10.695 | 0.706 |
Rii |
| 10.870 | 0.375 |
Rii |
| 10.886 | 0.304 |
Rii |
| 10.905 | 0.361 |
Rii |
| 11.049 | 0.415 |
Hnsw |
| 11.055 | 0.812 |
Hnsw |
| 11.072 | 0.821 |
Hnsw |
| 11.098 | 0.725 |
Hnsw |
| 11.309 | 0.813 |
Rii |
| 11.314 | 0.344 |
Hnsw |
| 11.323 | 0.707 |
Rii |
| 11.465 | 0.409 |
Hnsw |
| 11.468 | 0.864 |
Hnsw |
| 11.473 | 0.853 |
Hnsw |
| 11.494 | 0.821 |
Rii |
| 11.510 | 0.450 |
Rii |
| 11.643 | 0.424 |
Hnsw |
| 11.933 | 0.853 |
Hnsw |
| 12.096 | 0.864 |
Rii |
| 12.266 | 0.458 |
Rii |
| 13.087 | 0.511 |
Rii |
| 13.294 | 0.545 |
Rii |
| 16.971 | 0.367 |
Rii |
| 20.023 | 0.464 |
Faiss |
| 20.409 | 0.337 |
Rii |
| 20.663 | 0.464 |
Rii |
| 20.772 | 0.367 |
Rii |
| 20.828 | 0.522 |
Rii |
| 21.248 | 0.417 |
Rii |
| 21.335 | 0.508 |
Rii |
| 21.450 | 0.417 |
Faiss |
| 22.162 | 0.429 |
Faiss |
| 22.224 | 0.342 |
Rii |
| 22.509 | 0.572 |
Rii |
| 24.615 | 0.522 |
Rii |
| 25.297 | 0.508 |
Faiss |
| 26.422 | 0.438 |
Rii |
| 26.527 | 0.572 |
Rii |
| 29.036 | 0.671 |
Rii |
| 31.064 | 0.727 |
Faiss |
| 32.628 | 0.573 |
Rii |
| 33.497 | 0.671 |
Rii |
| 36.443 | 0.727 |
Faiss |
| 44.005 | 0.675 |
Faiss |
| 46.694 | 0.730 |
Faiss |
| 68.386 | 0.772 |
Faiss |
| 70.265 | 0.828 |
Faiss |
| 108.011 | 0.847 |
Faiss |
| 123.070 | 0.901 |
Faiss |
| 156.673 | 0.845 |
Faiss |
| 201.969 | 0.745 |
Faiss |
| 207.494 | 0.950 |
Faiss |
| 207.639 | 0.927 |
Faiss |
| 306.423 | 0.945 |
Faiss |
| 366.850 | 0.988 |
Faiss |
| 372.286 | 0.977 |
Faiss |
| 400.682 | 0.801 |
Faiss |
| 723.329 | 0.999 |
Faiss |
| 1087.499 | 1.000 |
sift
Table
name | config | time_search | recall |
---|---|---|---|
Rii |
| 17.097 | 0.851 |
Hnsw |
| 18.920 | 0.988 |
Hnsw |
| 18.964 | 0.996 |
Hnsw |
| 19.120 | 0.993 |
Hnsw |
| 19.130 | 0.996 |
Hnsw |
| 19.140 | 0.993 |
Hnsw |
| 19.153 | 0.987 |
Hnsw |
| 19.354 | 0.988 |
Hnsw |
| 19.389 | 0.986 |
Hnsw |
| 19.587 | 0.996 |
Hnsw |
| 19.742 | 0.993 |
Hnsw |
| 19.802 | 0.993 |
Hnsw |
| 20.222 | 0.996 |
Rii |
| 20.706 | 0.830 |
Rii |
| 20.730 | 0.830 |
Rii |
| 21.184 | 0.861 |
Rii |
| 21.759 | 0.918 |
Faiss |
| 21.931 | 0.845 |
Rii |
| 21.931 | 0.940 |
Rii |
| 21.983 | 0.940 |
Rii |
| 22.063 | 0.940 |
Rii |
| 22.155 | 0.972 |
Rii |
| 22.212 | 0.918 |
Faiss |
| 22.584 | 0.843 |
Faiss |
| 22.835 | 0.794 |
Rii |
| 23.079 | 0.940 |
Faiss |
| 23.150 | 0.896 |
Faiss |
| 23.151 | 0.935 |
Faiss |
| 23.214 | 0.894 |
Faiss |
| 23.707 | 0.913 |
Faiss |
| 23.921 | 0.864 |
Faiss |
| 24.132 | 0.942 |
Rii |
| 24.177 | 0.978 |
Rii |
| 24.504 | 0.988 |
Faiss |
| 24.761 | 0.947 |
Rii |
| 24.870 | 0.978 |
Faiss |
| 25.208 | 0.968 |
Rii |
| 25.416 | 0.988 |
Rii |
| 26.157 | 0.830 |
Rii |
| 26.456 | 0.861 |
Rii |
| 26.466 | 0.830 |
Rii |
| 26.518 | 0.861 |
Faiss |
| 27.352 | 0.990 |
Faiss |
| 27.546 | 0.945 |
Rii |
| 27.580 | 0.918 |
Rii |
| 27.856 | 0.918 |
Faiss |
| 28.396 | 0.980 |
Faiss |
| 29.578 | 0.891 |
Faiss |
| 30.087 | 0.786 |
Rii |
| 30.393 | 0.978 |
Rii |
| 31.381 | 0.978 |
Rii |
| 31.918 | 0.988 |
Faiss |
| 34.857 | 0.987 |
Faiss |
| 36.722 | 0.996 |
Faiss |
| 37.934 | 0.999 |
Faiss |
| 38.875 | 0.916 |
Faiss |
| 46.228 | 1.000 |
Faiss |
| 70.977 | 1.000 |
SimpleIndexer |
| 266.892 | 1.000 |
Table
name | config | time_search | recall |
---|---|---|---|
Rii |
| 44.418 | 0.754 |
Rii |
| 45.446 | 0.785 |
Hnsw |
| 46.897 | 0.957 |
Rii |
| 47.004 | 0.717 |
Hnsw |
| 47.037 | 0.960 |
Hnsw |
| 47.297 | 0.957 |
Hnsw |
| 47.597 | 0.978 |
Hnsw |
| 47.936 | 0.979 |
Hnsw |
| 48.202 | 0.960 |
Hnsw |
| 48.769 | 0.986 |
Hnsw |
| 48.872 | 0.979 |
Hnsw |
| 48.937 | 0.986 |
Hnsw |
| 49.309 | 0.986 |
Rii |
| 50.132 | 0.849 |
Hnsw |
| 50.298 | 0.986 |
Hnsw |
| 50.750 | 0.978 |
Rii |
| 51.353 | 0.862 |
Rii |
| 52.172 | 0.824 |
Rii |
| 54.128 | 0.891 |
Rii |
| 55.139 | 0.940 |
Rii |
| 57.199 | 0.885 |
Rii |
| 57.658 | 0.763 |
Rii |
| 58.818 | 0.890 |
Rii |
| 59.657 | 0.763 |
Rii |
| 60.307 | 0.803 |
Rii |
| 61.121 | 0.949 |
Rii |
| 64.772 | 0.882 |
Rii |
| 67.142 | 0.912 |
Faiss |
| 68.208 | 0.749 |
Faiss |
| 68.521 | 0.788 |
Faiss |
| 69.216 | 0.873 |
Faiss |
| 72.808 | 0.826 |
Rii |
| 73.895 | 0.763 |
Faiss |
| 74.120 | 0.893 |
Faiss |
| 75.032 | 0.887 |
Rii |
| 75.734 | 0.803 |
Faiss |
| 76.672 | 0.930 |
Faiss |
| 78.513 | 0.805 |
Rii |
| 79.814 | 0.970 |
Faiss |
| 80.495 | 0.914 |
Rii |
| 81.776 | 0.882 |
Rii |
| 82.068 | 0.970 |
Rii |
| 83.783 | 0.912 |
Rii |
| 83.940 | 0.982 |
Faiss |
| 84.118 | 0.944 |
Faiss |
| 84.434 | 0.638 |
Faiss |
| 88.011 | 0.969 |
Faiss |
| 103.199 | 0.941 |
Rii |
| 106.225 | 0.982 |
Faiss |
| 110.428 | 0.982 |
Faiss |
| 112.318 | 0.990 |
Faiss |
| 120.859 | 0.855 |
Faiss |
| 141.645 | 0.985 |
Faiss |
| 146.081 | 0.999 |
Faiss |
| 146.651 | 0.997 |
Faiss |
| 164.157 | 0.879 |
Faiss |
| 221.713 | 1.000 |
Faiss |
| 361.638 | 1.000 |
SimpleIndexer |
| 1324.322 | 1.000 |
Table
name | config | time_search | recall |
---|---|---|---|
Rii |
| 94.363 | 0.677 |
Hnsw |
| 94.770 | 0.923 |
Rii |
| 94.798 | 0.719 |
Hnsw |
| 95.335 | 0.926 |
Hnsw |
| 95.673 | 0.926 |
Hnsw |
| 96.769 | 0.963 |
Hnsw |
| 96.972 | 0.973 |
Rii |
| 96.997 | 0.658 |
Hnsw |
| 97.110 | 0.974 |
Hnsw |
| 97.228 | 0.963 |
Hnsw |
| 97.376 | 0.962 |
Rii |
| 97.391 | 0.620 |
Hnsw |
| 97.518 | 0.923 |
Hnsw |
| 97.880 | 0.962 |
Rii |
| 100.554 | 0.724 |
Hnsw |
| 101.271 | 0.974 |
Hnsw |
| 103.660 | 0.973 |
Rii |
| 105.981 | 0.744 |
Rii |
| 110.398 | 0.799 |
Rii |
| 110.678 | 0.829 |
Rii |
| 112.749 | 0.872 |
Rii |
| 115.281 | 0.878 |
Rii |
| 115.651 | 0.771 |
Rii |
| 116.964 | 0.775 |
Rii |
| 141.953 | 0.720 |
Rii |
| 149.069 | 0.768 |
Rii |
| 167.034 | 0.860 |
Rii |
| 176.633 | 0.768 |
Faiss |
| 177.007 | 0.748 |
Rii |
| 180.531 | 0.720 |
Faiss |
| 181.653 | 0.832 |
Faiss |
| 184.510 | 0.756 |
Faiss |
| 185.060 | 0.878 |
Faiss |
| 193.135 | 0.763 |
Faiss |
| 203.210 | 0.869 |
Faiss |
| 207.564 | 0.932 |
Faiss |
| 208.289 | 0.895 |
Rii |
| 209.611 | 0.896 |
Faiss |
| 211.001 | 0.616 |
Rii |
| 212.089 | 0.860 |
Rii |
| 215.622 | 0.896 |
Rii |
| 224.690 | 0.961 |
Faiss |
| 227.490 | 0.894 |
Rii |
| 234.007 | 0.957 |
Faiss |
| 250.604 | 0.968 |
Faiss |
| 259.265 | 0.946 |
Rii |
| 281.552 | 0.977 |
Rii |
| 282.742 | 0.977 |
Faiss |
| 322.146 | 0.941 |
Faiss |
| 332.204 | 0.990 |
Faiss |
| 359.077 | 0.982 |
Faiss |
| 383.529 | 0.832 |
Faiss |
| 468.810 | 0.983 |
Faiss |
| 504.964 | 0.996 |
Faiss |
| 535.492 | 0.999 |
Faiss |
| 562.634 | 0.854 |
Faiss |
| 834.854 | 1.000 |
Faiss |
| 1437.081 | 1.000 |
SimpleIndexer |
| 4843.714 | 1.000 |
sift 1 billion
This has only been run with sub-samples, not with the full dataset.
Table
name | config | time_search | recall |
---|---|---|---|
Hnsw |
| 95.291 | 0.971 |
Hnsw |
| 97.240 | 0.972 |
Hnsw |
| 97.672 | 0.972 |
Hnsw |
| 100.603 | 0.992 |
Hnsw |
| 105.235 | 0.995 |
Faiss |
| 1156.892 | 0.966 |
Faiss |
| 1359.404 | 0.936 |
Faiss |
| 1638.537 | 0.983 |
Faiss |
| 2323.912 | 0.994 |
Faiss |
| 3543.806 | 0.990 |
Faiss |
| 3866.858 | 0.998 |
Faiss |
| 6918.610 | 1.000 |
Table
name | config | time_search | recall |
---|---|---|---|
Hnsw |
| 95.436 | 0.927 |
Hnsw |
| 99.769 | 0.976 |
Faiss |
| 2745.310 | 0.908 |
Faiss |
| 6902.018 | 0.988 |
Indexers
The purpose is to compare how they each scale, both with the amount of Documents indexed and with the embedding dimensionality. We have restricted our selection to the following:
SimpleIndexer
is based on doing exhaustive search across all the Documents. However, FAISS, HNSW and Rii are based on different approximate nearest neighbor approaches. For each of these, we provide several configurations of parameters, in order to ascertain which behaves best.
Datasets
We use three different datasets, each with different number of samples or dimensionality of vectors. They are all based at the IRISA website. The datasets are:
dataset | index vectors | dimensionality | query vectors | top_k |
---|---|---|---|---|
sift | 1 million | 128 | 10k | 100 |
gist | 1 million | 960 | 1k | 100 |
sift1b | 1 billion | 128 | 10k | 1000 |
Note that out of the 1 billion dataset, we have only run a sub-sample of 10 and 20 million. We have also only used a top_k
value of 100. The datasets provide ground-truths for the query vectors.
Methodology
For each combination of configuration and dataset, we index a gradual subsampling of the dataset into the specific Indexer. Indexing batch size is set to 1000
. The FAISS Indexer requires training. This is done with a further sub-sampling of the index set. This depended on the configuration parameters for the FAISS model. Then we search with the respective search set, using a batch size of 1
, to mimic single query operations.