-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve disk queue performance by coalescing writes #31935
Conversation
fb292f3
to
930da1e
Compare
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
/test |
Tested with libbeat/publisher/queue/diskqueue/benchmark_test.go before change go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > baseline.txt after change go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > gather_w.txt benchstat baseline.txt gather_w.txt name old time/op new time/op delta 1M_10-16 38.7s ± 2% 21.8s ± 0% -43.58% (p=0.000 n=10+7) 1M_100-16 38.7s ± 1% 21.8s ± 1% -43.74% (p=0.000 n=10+10) 1M_1k-16 38.6s ± 1% 21.9s ± 1% -43.36% (p=0.000 n=10+10) 1M_10k-16 38.7s ± 2% 21.7s ± 0% -43.78% (p=0.000 n=10+10) name old alloc/op new alloc/op delta 1M_10-16 3.47GB ± 0% 3.43GB ± 0% -1.16% (p=0.000 n=8+10) 1M_100-16 3.47GB ± 0% 3.43GB ± 0% -1.17% (p=0.000 n=10+8) 1M_1k-16 3.47GB ± 0% 3.43GB ± 0% -1.18% (p=0.000 n=10+8) 1M_10k-16 3.47GB ± 0% 3.43GB ± 0% -1.18% (p=0.000 n=10+10) name old allocs/op new allocs/op delta 1M_10-16 43.4M ± 0% 40.6M ± 0% -6.32% (p=0.000 n=8+10) 1M_100-16 43.4M ± 0% 40.6M ± 0% -6.42% (p=0.000 n=10+9) 1M_1k-16 43.4M ± 0% 40.6M ± 0% -6.49% (p=0.000 n=10+10) 1M_10k-16 43.4M ± 0% 40.6M ± 0% -6.49% (p=0.000 n=10+10) Improves speed and lowers allocations
930da1e
to
0344595
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thank you!
Tested with libbeat/publisher/queue/diskqueue/benchmark_test.go before change go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > baseline.txt after change go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > gather_w.txt benchstat baseline.txt gather_w.txt name old time/op new time/op delta 1M_10-16 38.7s ± 2% 21.8s ± 0% -43.58% (p=0.000 n=10+7) 1M_100-16 38.7s ± 1% 21.8s ± 1% -43.74% (p=0.000 n=10+10) 1M_1k-16 38.6s ± 1% 21.9s ± 1% -43.36% (p=0.000 n=10+10) 1M_10k-16 38.7s ± 2% 21.7s ± 0% -43.78% (p=0.000 n=10+10) name old alloc/op new alloc/op delta 1M_10-16 3.47GB ± 0% 3.43GB ± 0% -1.16% (p=0.000 n=8+10) 1M_100-16 3.47GB ± 0% 3.43GB ± 0% -1.17% (p=0.000 n=10+8) 1M_1k-16 3.47GB ± 0% 3.43GB ± 0% -1.18% (p=0.000 n=10+8) 1M_10k-16 3.47GB ± 0% 3.43GB ± 0% -1.18% (p=0.000 n=10+10) name old allocs/op new allocs/op delta 1M_10-16 43.4M ± 0% 40.6M ± 0% -6.32% (p=0.000 n=8+10) 1M_100-16 43.4M ± 0% 40.6M ± 0% -6.42% (p=0.000 n=10+9) 1M_1k-16 43.4M ± 0% 40.6M ± 0% -6.49% (p=0.000 n=10+10) 1M_10k-16 43.4M ± 0% 40.6M ± 0% -6.49% (p=0.000 n=10+10) Improves speed and lowers allocations
Improves speed and lowers allocations
What does this PR do?
Improves speed and lowers allocations in disk queue by coalescing writes.
Why is it important?
lowers performance cost of using disk queue.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Tested with
libbeat/publisher/queue/diskqueue/benchmark_test.go
before change
go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > baseline.txt
after change
go test -bench=. -benchtime 1x -count 10 -timeout 120m -benchmem > gather_w.txt
Related issues