From 8e45122576a034a957936450cdfc665358e82b32 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Tue, 26 Dec 2023 14:10:21 +0800 Subject: [PATCH] Added Build Infinity --- .history/docs/benchmark_20231226133852.md | 90 ++++++++++++++++++++++ .history/docs/benchmark_20231226140016.md | 92 +++++++++++++++++++++++ .history/docs/benchmark_20231226140905.md | 86 +++++++++++++++++++++ .history/docs/benchmark_20231226140937.md | 86 +++++++++++++++++++++ .history/docs/benchmark_20231226141001.md | 86 +++++++++++++++++++++ docs/benchmark.md | 36 ++++----- 6 files changed, 456 insertions(+), 20 deletions(-) create mode 100644 .history/docs/benchmark_20231226133852.md create mode 100644 .history/docs/benchmark_20231226140016.md create mode 100644 .history/docs/benchmark_20231226140905.md create mode 100644 .history/docs/benchmark_20231226140937.md create mode 100644 .history/docs/benchmark_20231226141001.md diff --git a/.history/docs/benchmark_20231226133852.md b/.history/docs/benchmark_20231226133852.md new file mode 100644 index 0000000000..a41223fcc3 --- /dev/null +++ b/.history/docs/benchmark_20231226133852.md @@ -0,0 +1,90 @@ +# Benchmark + +Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. + +## Get the Infinity binary file + +```sh +git clone https://github.com/infiniflow/infinity.git +cd infinity +``` + +## Download the benchmark files + +To obtain the benchmark files, you have the option to download them using the wget command. + +```sh +#download sift benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz +#download gist benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz + +``` + +Alternatively, you can manually download the benchmark files by visiting [http://corpus-texmex.irisa.fr/](http://corpus-texmex.irisa.fr/). + +```sh +# Unzip and move the SIFT1M benchmark file. +tar -zxvf sift.tar.gz +mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs +mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs +mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs + +# Unzip and move the GIST1M benchmark file. +tar -zxvf gist.tar.gz +mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs +mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs +mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs + +``` + +## Benchmark dependencies + +```sh +cd python + +pip install -r requirements.txt +python setup.py bdist_wheel +pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl +``` + +## Start Infinity + +See the [README.md](https://github.com/infiniflow/infinity/blob/main/README.md) to start Infinity. + +## Import data + +```sh +cd benchmark + +options: + -h, --help show this help message and exit + -d DATA_SET, --data DATA_SET + +python remote_benchmark_import.py -d sift_1m +python remote_benchmark_import.py -d gist_1m +``` + +## Run benchmark + +```sh +options: + -h, --help show this help message and exit + -t THREADS, --threads THREADS + -r ROUNDS, --rounds ROUNDS + -d DATA_SET, --data DATA_SET + +# ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run. + +# Perform a benchmark on the SIFT1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d sift_1m +# Perform a benchmark on the GIST1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d gist_1m +``` +## A SIFT benchmark report + +- **Hardware**: Intel i5-12500H, 16C, 16GB +- **Operating system**: Ubuntu 22.04 +- **Dataset**: SIFT1M; **topk**: 100; **recall**: 97%+ +- **QPS**: 10,305 +- **P99 Latency**: 0.3 ms \ No newline at end of file diff --git a/.history/docs/benchmark_20231226140016.md b/.history/docs/benchmark_20231226140016.md new file mode 100644 index 0000000000..174dd1059b --- /dev/null +++ b/.history/docs/benchmark_20231226140016.md @@ -0,0 +1,92 @@ +# Benchmark + +Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. + +## Build Infinity + +You can either build Infinity + +```sh +git clone https://github.com/infiniflow/infinity.git +cd infinity +``` + +## Download the Benchmark datasets + +To obtain the benchmark files, you have the option to download them using the wget command. + +```sh +#download sift benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz +#download gist benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz + +``` + +Alternatively, you can manually download the benchmark files by visiting [http://corpus-texmex.irisa.fr/](http://corpus-texmex.irisa.fr/). + +```sh +# Unzip and move the SIFT1M benchmark file. +tar -zxvf sift.tar.gz +mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs +mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs +mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs + +# Unzip and move the GIST1M benchmark file. +tar -zxvf gist.tar.gz +mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs +mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs +mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs + +``` + +## Benchmark dependencies + +```sh +cd python + +pip install -r requirements.txt +python setup.py bdist_wheel +pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl +``` + +## Start Infinity + +See the [README.md](https://github.com/infiniflow/infinity/blob/main/README.md) to start Infinity. + +## Import the Benchmark datasets + +```sh +cd benchmark + +options: + -h, --help show this help message and exit + -d DATA_SET, --data DATA_SET + +python remote_benchmark_import.py -d sift_1m +python remote_benchmark_import.py -d gist_1m +``` + +## Run Benchmark + +```sh +options: + -h, --help show this help message and exit + -t THREADS, --threads THREADS + -r ROUNDS, --rounds ROUNDS + -d DATA_SET, --data DATA_SET + +# ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run. + +# Perform a benchmark on the SIFT1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d sift_1m +# Perform a benchmark on the GIST1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d gist_1m +``` +## A SIFT benchmark report + +- **Hardware**: Intel i5-12500H, 16C, 16GB +- **Operating system**: Ubuntu 22.04 +- **Dataset**: SIFT1M; **topk**: 100; **recall**: 97%+ +- **QPS**: 10,305 +- **P99 Latency**: 0.3 ms \ No newline at end of file diff --git a/.history/docs/benchmark_20231226140905.md b/.history/docs/benchmark_20231226140905.md new file mode 100644 index 0000000000..11805eeac9 --- /dev/null +++ b/.history/docs/benchmark_20231226140905.md @@ -0,0 +1,86 @@ +# Benchmark + +Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. + +## Build Infinity + +You have two options for building Infinity. Choose the option that best fit your needs: + +- [Build Infinity using Docker](../README.md) +- [Build from source](./build_from_source.md) + +## Download the Benchmark datasets + +To obtain the benchmark files, you have the option to download them using the wget command. + +```sh +#download sift benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz +#download gist benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz + +``` + +Alternatively, you can manually download the benchmark files by visiting [http://corpus-texmex.irisa.fr/](http://corpus-texmex.irisa.fr/). + +```sh +# Unzip and move the SIFT1M benchmark file. +tar -zxvf sift.tar.gz +mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs +mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs +mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs + +# Unzip and move the GIST1M benchmark file. +tar -zxvf gist.tar.gz +mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs +mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs +mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs + +``` + +## Benchmark dependencies + +```sh +cd python + +pip install -r requirements.txt +python setup.py bdist_wheel +pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl +``` + +## Import the Benchmark datasets + +```sh +cd benchmark + +options: + -h, --help show this help message and exit + -d DATA_SET, --data DATA_SET + +python remote_benchmark_import.py -d sift_1m +python remote_benchmark_import.py -d gist_1m +``` + +## Run Benchmark + +```sh +options: + -h, --help show this help message and exit + -t THREADS, --threads THREADS + -r ROUNDS, --rounds ROUNDS + -d DATA_SET, --data DATA_SET + +# ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run. + +# Perform a benchmark on the SIFT1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d sift_1m +# Perform a benchmark on the GIST1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d gist_1m +``` +## A SIFT benchmark report + +- **Hardware**: Intel i5-12500H, 16C, 16GB +- **Operating system**: Ubuntu 22.04 +- **Dataset**: SIFT1M; **topk**: 100; **recall**: 97%+ +- **QPS**: 10,305 +- **P99 Latency**: 0.3 ms \ No newline at end of file diff --git a/.history/docs/benchmark_20231226140937.md b/.history/docs/benchmark_20231226140937.md new file mode 100644 index 0000000000..b6d8b2f98e --- /dev/null +++ b/.history/docs/benchmark_20231226140937.md @@ -0,0 +1,86 @@ +# Benchmark + +Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. + +## Build Infinity + +You have two options for building Infinity. Choose the option that best fit your needs: + +- [Build Infinity using Docker](../README.md) +- [Build from source](./build_from_source.md) + +## Download the Benchmark datasets + +To obtain the benchmark files, you have the option to download them using the wget command. + +```sh +#download sift benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz +#download gist benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz + +``` + +Alternatively, you can manually download the benchmark files by visiting [http://corpus-texmex.irisa.fr/](http://corpus-texmex.irisa.fr/). + +```sh +# Unzip and move the SIFT1M benchmark file. +tar -zxvf sift.tar.gz +mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs +mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs +mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs + +# Unzip and move the GIST1M benchmark file. +tar -zxvf gist.tar.gz +mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs +mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs +mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs + +``` + +## Benchmark dependencies + +```sh +cd python + +pip install -r requirements.txt +python setup.py bdist_wheel +pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl +``` + +## Import the Benchmark datasets + +```sh +cd benchmark + +# options: +# -h, --help show this help message and exit +# -d DATA_SET, --data DATA_SET + +python remote_benchmark_import.py -d sift_1m +python remote_benchmark_import.py -d gist_1m +``` + +## Run Benchmark + +```sh +# options: +# -h, --help show this help message and exit +# -t THREADS, --threads THREADS +# -r ROUNDS, --rounds ROUNDS +# -d DATA_SET, --data DATA_SET + +# ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run. + +# Perform a benchmark on the SIFT1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d sift_1m +# Perform a benchmark on the GIST1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d gist_1m +``` +## A SIFT benchmark report + +- **Hardware**: Intel i5-12500H, 16C, 16GB +- **Operating system**: Ubuntu 22.04 +- **Dataset**: SIFT1M; **topk**: 100; **recall**: 97%+ +- **QPS**: 10,305 +- **P99 Latency**: 0.3 ms \ No newline at end of file diff --git a/.history/docs/benchmark_20231226141001.md b/.history/docs/benchmark_20231226141001.md new file mode 100644 index 0000000000..0e223fbbdd --- /dev/null +++ b/.history/docs/benchmark_20231226141001.md @@ -0,0 +1,86 @@ +# Benchmark + +Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. + +## Build Infinity + +You have two options for building Infinity. Choose the option that best fits your needs: + +- [Build Infinity using Docker](../README.md) +- [Build from source](./build_from_source.md) + +## Download the Benchmark datasets + +To obtain the benchmark files, you have the option to download them using the wget command. + +```sh +#download sift benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz +#download gist benchmark +wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz + +``` + +Alternatively, you can manually download the benchmark files by visiting [http://corpus-texmex.irisa.fr/](http://corpus-texmex.irisa.fr/). + +```sh +# Unzip and move the SIFT1M benchmark file. +tar -zxvf sift.tar.gz +mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs +mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs +mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs + +# Unzip and move the GIST1M benchmark file. +tar -zxvf gist.tar.gz +mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs +mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs +mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs + +``` + +## Benchmark dependencies + +```sh +cd python + +pip install -r requirements.txt +python setup.py bdist_wheel +pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl +``` + +## Import the Benchmark datasets + +```sh +cd benchmark + +# options: +# -h, --help show this help message and exit +# -d DATA_SET, --data DATA_SET + +python remote_benchmark_import.py -d sift_1m +python remote_benchmark_import.py -d gist_1m +``` + +## Run Benchmark + +```sh +# options: +# -h, --help show this help message and exit +# -t THREADS, --threads THREADS +# -r ROUNDS, --rounds ROUNDS +# -d DATA_SET, --data DATA_SET + +# ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run. + +# Perform a benchmark on the SIFT1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d sift_1m +# Perform a benchmark on the GIST1M dataset using a single thread, running it only once. +python remote_benchmark.py -t 1 -r 1 -d gist_1m +``` +## A SIFT benchmark report + +- **Hardware**: Intel i5-12500H, 16C, 16GB +- **Operating system**: Ubuntu 22.04 +- **Dataset**: SIFT1M; **topk**: 100; **recall**: 97%+ +- **QPS**: 10,305 +- **P99 Latency**: 0.3 ms \ No newline at end of file diff --git a/docs/benchmark.md b/docs/benchmark.md index a41223fcc3..0e223fbbdd 100644 --- a/docs/benchmark.md +++ b/docs/benchmark.md @@ -2,14 +2,14 @@ Infinity provides a Python script for benchmarking the SIFT1M and GIST1M datasets. -## Get the Infinity binary file +## Build Infinity -```sh -git clone https://github.com/infiniflow/infinity.git -cd infinity -``` +You have two options for building Infinity. Choose the option that best fits your needs: + +- [Build Infinity using Docker](../README.md) +- [Build from source](./build_from_source.md) -## Download the benchmark files +## Download the Benchmark datasets To obtain the benchmark files, you have the option to download them using the wget command. @@ -48,31 +48,27 @@ python setup.py bdist_wheel pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl ``` -## Start Infinity - -See the [README.md](https://github.com/infiniflow/infinity/blob/main/README.md) to start Infinity. - -## Import data +## Import the Benchmark datasets ```sh cd benchmark -options: - -h, --help show this help message and exit - -d DATA_SET, --data DATA_SET +# options: +# -h, --help show this help message and exit +# -d DATA_SET, --data DATA_SET python remote_benchmark_import.py -d sift_1m python remote_benchmark_import.py -d gist_1m ``` -## Run benchmark +## Run Benchmark ```sh -options: - -h, --help show this help message and exit - -t THREADS, --threads THREADS - -r ROUNDS, --rounds ROUNDS - -d DATA_SET, --data DATA_SET +# options: +# -h, --help show this help message and exit +# -t THREADS, --threads THREADS +# -r ROUNDS, --rounds ROUNDS +# -d DATA_SET, --data DATA_SET # ROUNDS indicates the number of times Python executes the benchmark, and the result represents the average duration for each run.