https://github.com/pseitz/bench_riddle
Repo To Blogpost https://quickwit.io/blog/performance-investigation
https://github.com/pseitz/bench_riddle
Last synced: 8 months ago
JSON representation
Repo To Blogpost https://quickwit.io/blog/performance-investigation
- Host: GitHub
- URL: https://github.com/pseitz/bench_riddle
- Owner: PSeitz
- Created: 2024-05-21T07:28:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T07:57:28.000Z (about 2 years ago)
- Last Synced: 2025-05-07T22:45:35.494Z (about 1 year ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GH repo to blogpost https://quickwit.io/blog/performance-investigation
## Prequisite
* Rust https://www.rust-lang.org/tools/install
* https://github.com/bazhenov/cargo-export
* Linux for the `strace` calls and glibc parameters (`ALLOC_MMAP_THRESHOLD_`)
## Run
```
cargo export target/bench -- bench
# Run SLOW
target/bench/bench_riddle
# Run FAST
FAST=TRUE target/bench/bench_riddle
# Set The number of bytes allocated before the bench
FAST=TRUE NUM_BYTES=4000000 target/bench/bench_riddle
# Trace System Calls
FAST=TRUE strace -e trace=mmap,munmap,mremap,brk target/bench/bench_riddle
# Set glibc parameters
ALLOC_MMAP_THRESHOLD_=4000000 MALLOC_TRIM_THRESHOLD_=-1 target/bench/bench_riddle
```