In-memory caching for indexes #505
Replies: 3 comments 5 replies
-
Since #503 is working now we can think about different loading and caching strategies inside of the persistent set. We have not been able to get there yet for the hitchhiker-tree (just cached the most used tree fragments). So hopefully we can significantly reduce this access time. @MrEbbinghaus Can you isolate which index access calls cause the latency? Ideally for many databases you want to keep everything in memory and only have a copy on disk in case of cold reboots, but it will really depend on the use case. I think it would be good to use this opportunity to discuss a few caching policies and how to expose them to users. |
Beta Was this translation helpful? Give feedback.
-
@whilo I would also like to know the reason behind the layout change with konserve 0.6. |
Beta Was this translation helpful? Give feedback.
-
I recently noticed that the latency of my pulls aren't that great on my NVMe SSD equipped machine with the file backend.
A
pull-many
with 9 entities and 8 Attributes (one join) takes 40ms.I investigated and found out that roughly half of that time is spent on resolving a lookup-ref to the
eid
.I propose adding more in-memory caching to datahike. At least for the
aevt
index, but I think in many cases datahike could benefit from memory caches for other data as well.In my case (a small web-application), I am not so much interested in batch write performance, but retrieval latency.
Tests with a simple cache:
Beta Was this translation helpful? Give feedback.
All reactions