Skip to content

Commit

Permalink
feat: add BENCHMARK.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
cernicc committed Jun 18, 2024
1 parent 68744e3 commit e4ce64c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 57 deletions.
37 changes: 37 additions & 0 deletions storage/mater/BENCHMARK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
### How to run

Execute the benchmarks with `cargo bench`.

### Results

Tested on the machine with `Ryzen 9 5950X` and `64GB DDR4`.

#### read

Benchmark checks what is the time needed to fully read a content buffer into the `BlockStore`

| Size / Duplication | 0% | 10% | 20% | 40% | 80% |
| ------------------ | --------- | --------- | --------- | --------- | --------- |
| 10 MB | 4.6776 ms | 4.5806 ms | 4.6977 ms | 4.5534 ms | 4.5038 ms |
| 100 MB | 62.419 ms | 60.895 ms | 59.461 ms | 55.355 ms | 46.792 ms |
| 1 GB | 632.34 ms | 650.01 ms | 631.49 ms | 600.01 ms | 505.58 ms |

#### write

Checks the time needed to write the CARv2 to the buffer from `BlockStore`.

| Size / Duplication | 0% | 10% | 20% | 40% | 80% |
| ------------------ | --------- | --------- | --------- | --------- | --------- |
| 10 MB | 1.6516 ms | 1.0342 ms | 875.68 µs | 772.26 µs | 354.77 µs |
| 100 MB | 12.689 ms | 10.707 ms | 9.4533 ms | 6.7805 ms | 1.7487 ms |
| 1 GB | 123.34 ms | 102.39 ms | 91.712 ms | 69.273 ms | 23.140 ms |

#### filestore

Converts a source file to the CARv2 and writes it to the output file

| Size / Duplication | 0% | 10% | 20% | 40% | 80% |
| ------------------ | --------- | --------- | --------- | --------- | --------- |
| 10 MB | 15.145 ms | 15.179 ms | 15.162 ms | 14.501 ms | 14.836 ms |
| 100 MB | 203.85 ms | 210.14 ms | 220.38 ms | 216.34 ms | 211.12 ms |
| 1 GB | 1.7674 s | 1.8174 s | 1.8396 s | 1.8496 s | 1.8774 s |
58 changes: 1 addition & 57 deletions storage/mater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,63 +28,7 @@ change frequently, hence, there is no need to add complexity to the build proces

### Benchmarks

- `read` benchmark checks what is the time needed to fully read a content buffer into the `BlockStore`
- `write` checks the time needed to write the CARv2 to the buffer from `BlockStore`.
- `filestore` converts a source file to the CARv2 and writes it to the output file

Execute benchmarks with `cargo bench`.

Tested on the machine with `Ryzen 9 5950X` and `64GB DDR4`.

| Bench | Content Size | Duplicated content (%) | Median Estimate |
| --------- | ------------ | ---------------------- | --------------- |
| read | 10 MB | 0 | 4.6776 ms |
| read | 10 MB | 10 | 4.5806 ms |
| read | 10 MB | 20 | 4.6977 ms |
| read | 10 MB | 40 | 4.5534 ms |
| read | 10 MB | 80 | 4.5038 ms |
| read | 100 MB | 0 | 62.419 ms |
| read | 100 MB | 10 | 60.895 ms |
| read | 100 MB | 20 | 59.461 ms |
| read | 100 MB | 40 | 55.355 ms |
| read | 100 MB | 80 | 46.792 ms |
| read | 1 GB | 0 | 632.34 ms |
| read | 1 GB | 10 | 650.01 ms |
| read | 1 GB | 20 | 631.49 ms |
| read | 1 GB | 40 | 600.01 ms |
| read | 1 GB | 80 | 505.58 ms |
| | | | |
| write | 10 MB | 0 | 1.6516 ms |
| write | 10 MB | 10 | 1.0342 ms |
| write | 10 MB | 20 | 875.68 µs |
| write | 10 MB | 40 | 772.26 µs |
| write | 10 MB | 80 | 354.77 µs |
| write | 100 MB | 0 | 12.689 ms |
| write | 100 MB | 10 | 10.707 ms |
| write | 100 MB | 20 | 9.4533 ms |
| write | 100 MB | 40 | 6.7805 ms |
| write | 100 MB | 80 | 6.7805 ms |
| write | 1 GB | 0 | 123.34 ms |
| write | 1 GB | 10 | 102.39 ms |
| write | 1 GB | 20 | 91.712 ms |
| write | 1 GB | 40 | 69.273 ms |
| write | 1 GB | 80 | 23.140 ms |
| | | | |
| filestore | 10 MB | 0 | 15.145 ms |
| filestore | 10 MB | 10 | 15.179 ms |
| filestore | 10 MB | 20 | 15.162 ms |
| filestore | 10 MB | 40 | 15.162 ms |
| filestore | 10 MB | 80 | 14.836 ms |
| filestore | 100 MB | 0 | 203.85 ms |
| filestore | 100 MB | 10 | 210.14 ms |
| filestore | 100 MB | 20 | 220.38 ms |
| filestore | 100 MB | 40 | 216.34 ms |
| filestore | 100 MB | 80 | 211.12 ms |
| filestore | 1 GB | 0 | 1.7674 s |
| filestore | 1 GB | 10 | 1.8174 s |
| filestore | 1 GB | 20 | 1.8396 s |
| filestore | 1 GB | 40 | 1.8496 s |
| filestore | 1 GB | 80 | 1.8774 s |
[Read more](BENCHMARK.md)

## Acknowledgements

Expand Down

0 comments on commit e4ce64c

Please sign in to comment.