Skip to content

Commit

Permalink
docs: add documentation for benchmarking stream density (#19)
Browse files Browse the repository at this point in the history
* docs: add documentation for benchmarking stream density

Signed-off-by: Jim Wang @ Intel <yutsung.jim.wang@intel.com>

* fix: address Neethu PR comments

Signed-off-by: Jim Wang @ Intel <yutsung.jim.wang@intel.com>

* Update docs_src/performance-tools/benchmark.md

accepted, ok

Co-authored-by: NeethuES <neethu.elizabeth.simon@intel.com>

---------

Signed-off-by: Jim Wang @ Intel <yutsung.jim.wang@intel.com>
Co-authored-by: NeethuES <neethu.elizabeth.simon@intel.com>
  • Loading branch information
jim-wang-intel and NeethuES-intel authored Apr 12, 2024
1 parent 98d872c commit f97eeb5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs_src/performance-tools/benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ consumption, and so on.
# Benchmark a CV Pipeline

1. Build the benchmark container and change into the benchmark-scripts directory.

```bash
make build-benchmark-docker
cd benchmark-scripts
Expand All @@ -39,6 +40,25 @@ consumption, and so on.
python benchmark.py --compose_file ../../use-cases/gst_capi/add_camera-simulator.yml --compose_file ../../use-cases/gst_capi/add_gst_capi_yolov5_ensemble.yml
```

## Benchmark Stream Density for CV Pipelines

Benchmarking a pipeline can also discover the maximum number of workloads or streams that can be run in parallel for a given target FPS. This information is useful to determine the hardware required to achieve the desired performance for CV pipelines.

To run the stream density functionality use `--target_fps` and/or `--density_increment` as inputs to the `benchmark.py` script:

```bash
python benchmark.py --retail_use_case_root ../../retail-use-cases --target_fps 14.95 --density_increment 1 --init_duration 40 --compose_file ../../retail-use-cases/use-cases/grpc_python/docker-compose_grpc_python.yml
```

where the parameters:
- `target_fps` is the given target frames per second (fps) to achive for maximum number of pipelines
- `density_increment` is to configure the benchmark logic to increase the number of pipelines each time while trying to find out the maximum number of pipelines before reaching the given target fps.
- `init_duration` is the initial duration period in second before pipeline performance metrics are taken


!!! Note
It is recommended to set --target_fps to a value lesser than your target FPS to account for real world variances in hardware readings.

# Modifying Additional Benchmarking Variables

## Change Power Profile
Expand All @@ -59,6 +79,7 @@ make python-test
```

To run the unit tests and determine the coverage:

```bash
cd benchmark-scripts
make python-coverage
Expand Down

0 comments on commit f97eeb5

Please sign in to comment.