-
Notifications
You must be signed in to change notification settings - Fork 164
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
Reduce locking for blob cache hit queries #140
Comments
I use cache in Get or Iterator path, but found it will fail the |
Actually I prefer the former implementation of |
The former |
/ping |
pong! I am challenge bot. |
I built the titan on the version in the demo, with rocksdb version 6.4.tikv.
Then I ran the benchmark command above, and got error as below:
Is it related to the rocksdb version I built with ? |
@Connor1996 is this related to the cache key fix? |
Yes, it's related to the rocksdb version you built with. It is based on a hack of rocksdb which allocates unique ids for directory, but 6.4.tikv branch will always return 0. |
I see. Is this issue still open? I want to have a try on this. It's so kind of you if you could give me the rocksdb branch you mentioned. @Connor1996 |
|
@rickif yes, the issue is still open. The benchmark used is posted in the issue summary above, and you can build it in Titan: |
OK. I wonder whether the the version |
Description
Currently we query blob cache in
BlobFileReader
. It is done after getting file metadata (BlobStorage::FindFile
) and getting the file reader fromBlobFileCache
, both of which require mutex lock. If we move blob cache query to before those two calls, we saves the two mutex lock and other overheads for a cache hit query. Demo can be find here: https://github.com/yiwu-arbug/titan/tree/cache titandb_bench shows 6% improvement in throughput for in-memory workload.Benchmark:
Result:
what's left to be done on top of the demo:
OwnedSlice
wrapper. Cache rawchar*
and use the deleter fromCacheAllocationPtr
as cache item deleterScore
3000
SIG slack channel(must):
#sig-engine
Mentor
@Connor1996
Recommended Skills:
c++
Learning Materials(optional)
The text was updated successfully, but these errors were encountered: