Skip to content

Commit

Permalink
chore(storage): change default buffer sizes to kib [benchmarking] (#7804
Browse files Browse the repository at this point in the history
)
  • Loading branch information
BrennaEpp authored Apr 24, 2023
1 parent 4900851 commit f4c39aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions storage/internal/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ This runs 1000 iterations on 512kib to 2Gib files in the background, sending out
| -range_read_size | size of the range to read in bytes | any positive integer <br> <=0 reads the full object | `0` |
| -minimum_read_offset | minimum offset for the start of the range to be read in bytes | any integer >0 | `0` |
| -maximum_read_offset | maximum offset for the start of the range to be read in bytes | any integer >0 | `0` |
| -read_buffer_size | read buffer size in bytes | any positive integer | `4000` for HTTP <br> `32000` for GRPC |
| -write_buffer_size | write buffer size in bytes | any positive integer | `4000` for HTTP <br> `32000` for GRPC |
| -read_buffer_size | read buffer size in bytes | any positive integer | `4096` for HTTP <br> `32768` for GRPC |
| -write_buffer_size | write buffer size in bytes | any positive integer | `4096` for HTTP <br> `32768` for GRPC |
| -min_chunksize | minimum ChunkSize in bytes | any positive integer | `16 384` (16 MiB) |
| -max_chunksize | maximum ChunkSize in bytes | any positive integer | `16 384` (16 MiB) |
| -connection_pool_size | GRPC connection pool size | any positive integer | 4 |
Expand Down
10 changes: 5 additions & 5 deletions storage/internal/benchmarks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

const (
codeVersion = "0.8.1" // to keep track of which version of the code a benchmark ran on
codeVersion = "0.8.2" // to keep track of which version of the code a benchmark ran on
useDefault = -1
)

Expand Down Expand Up @@ -308,9 +308,9 @@ func (br *benchmarkResult) selectReadParams(opts benchmarkOptions, api benchmark
if opts.readBufferSize == useDefault {
switch api {
case xmlAPI, jsonAPI:
br.params.appBufferSize = 4000 // default for HTTP
br.params.appBufferSize = 4 << 10 // default for HTTP
case grpcAPI, directPath:
br.params.appBufferSize = 32000 // default for GRPC
br.params.appBufferSize = 32 << 10 // default for GRPC
}
}
}
Expand Down Expand Up @@ -342,9 +342,9 @@ func (br *benchmarkResult) selectWriteParams(opts benchmarkOptions, api benchmar
if opts.writeBufferSize == useDefault {
switch api {
case xmlAPI, jsonAPI:
br.params.appBufferSize = 4000 // default for HTTP
br.params.appBufferSize = 4 << 10 // default for HTTP
case grpcAPI, directPath:
br.params.appBufferSize = 32000 // default for GRPC
br.params.appBufferSize = 32 << 10 // default for GRPC
}
}
}
Expand Down

0 comments on commit f4c39aa

Please sign in to comment.