Skip to content

Commit

Permalink
Added Build Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
writinwaters committed Dec 26, 2023
1 parent 8731d13 commit 8e45122
Show file tree
Hide file tree
Showing 6 changed files with 456 additions and 20 deletions.
90 changes: 90 additions & 0 deletions .history/docs/benchmark_20231226133852.md
Original file line number Diff line number Diff line change
@@ -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
92 changes: 92 additions & 0 deletions .history/docs/benchmark_20231226140016.md
Original file line number Diff line number Diff line change
@@ -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
86 changes: 86 additions & 0 deletions .history/docs/benchmark_20231226140905.md
Original file line number Diff line number Diff line change
@@ -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
86 changes: 86 additions & 0 deletions .history/docs/benchmark_20231226140937.md
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 8e45122

Please sign in to comment.