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

hashtable insert / lookup stats #506

Closed
ThomasWaldmann opened this issue Dec 20, 2015 · 2 comments
Closed

hashtable insert / lookup stats #506

ThomasWaldmann opened this issue Dec 20, 2015 · 2 comments

Comments

@ThomasWaldmann
Copy link
Member

I recently improved the badly chosen load factor (old: 0.9, new: 0.75) and the table initial bucket count (old: 1024, new: 1031). Experiments have shown this gave a major speedup, but it is still unknown whether the hashtable works as it should (O(1) lookup speed) or just works much better as before, but still not at maximum performance.

Insert: statistics about how long the linear search usually is to find a free bucket.
Have: key x, bucket = hash(x), is it free? if not, how many buckets did we need to search until we found a free one?
also: how well did the hash function spread over all the buckets?

Lookup: statistics about how long the linear search usually is to find the correct bucket.
Wanted: key x, bucket = hash(x), is it there? if not, how many buckets did we need to visit until we found key x?

Implementation note: data gathering needs to be coded in C, analysis could by in Cython or Python.

@ThomasWaldmann ThomasWaldmann changed the title hashtable bucket collision / lookup search stats hashtable insert / lookup stats Dec 20, 2015
@ThomasWaldmann
Copy link
Member Author

See #1429 - maybe we get some stats or perf values related to that PR.

@ThomasWaldmann ThomasWaldmann self-assigned this Oct 21, 2024
@ThomasWaldmann ThomasWaldmann added this to the 2.0.0b13 milestone Oct 24, 2024
@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Oct 26, 2024

https://github.com/borgbackup/borghash

It has stats.

Using borghash since #8502.

Still missing: code in borg querying / showing the hashtable stats.

ThomasWaldmann added a commit that referenced this issue Oct 31, 2024
…tats

chunks index: show hashtable stats at debug log level, fixes #506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant