Skip to content
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

Speed up scan #916

Merged
merged 6 commits into from
Jan 15, 2025
Merged

Speed up scan #916

merged 6 commits into from
Jan 15, 2025

Conversation

badrishc
Copy link
Contributor

@badrishc badrishc commented Jan 15, 2025

Avoid buffer pool allocation per GetNext and reuse memory to speed up scan.
Avoid double counting for dbsize.

Fixes #858

Avoid buffer pool allocation per GetNext and reuse memory to speed up scan
@badrishc
Copy link
Contributor Author

Command:
time memtier_benchmark -s 192.168.192.1 -p6379 -Predis --hide-histogram --command="SCAN 0 MATCH * COUNT 1000" -c 10 -t 4

main:

==================================================================================================
Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec
--------------------------------------------------------------------------------------------------
Scans        1245.57        32.33031        33.40700        69.50300        81.79100     15778.88
Totals       1245.57        32.33031        33.40700        69.50300        81.79100     31557.77

real    5m25.291s
user    1m2.464s
sys     0m9.081s

PR:

==================================================================================================
Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec
--------------------------------------------------------------------------------------------------
Scans       21843.85         1.76293         1.55100         4.78300        14.59900    276717.20
Totals      21843.85         1.76293         1.55100         4.78300        14.59900    553434.40

real    0m19.247s
user    0m46.319s
sys     0m10.980s

@badrishc badrishc merged commit 373c4c3 into main Jan 15, 2025
21 checks passed
@badrishc badrishc deleted the badrishc/scan-avoid-allocation branch January 15, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow scan
2 participants