https://slatedb.io logo
@criccomini So I don’t work on this
# general
p
@criccomini So I don’t work on this for nothing, I I put up a PR that removes the block and local store, replaces both with foyer hybrid, or memory only when no disk path is provided and that the performance profile is better or similar, would you accept it?
r
I think we'd have to think through a good set of perf tests. There's lots of different workloads to consider. For my use case I always used the block level cache because it was all point lookups so the large part size made the object store cache wasteful (both in space usage and overhead on a miss). We can probably mitigate that with a small part size + foyer. But there's also the fact that the block/os cache are post/pre compression, respectively so there's a tradeoff there. As an aside it's also kind of nice that it models index/filter/data blocks explicitly so you tune the cache logic to try to retain just the meta blocks. I'm not as convinced about that benefit though. For the object store cache I think making it pluggable is reasonable, but I'm nervous about dropping the current impl for foyer. I had some problems with restart times in foyer. It also seems like a really good approach if you just want to cache the whole db on local disk. Why not just start with making the storage in the object store cache pluggable and supporting foyer?
p
Ok, that makes sense, then perhaps in this order: - bump default part size - Make the object store cache pluggable
I want to dig evening on the relationship between the part size and how it interacts with iterators, because if that translates to fewer requests that might be free performance on the table?
But perhaps I got this wrong, I barely looked 🙂
r
I think it depends on how many blocks the iterator ends up reading. If it's scanning lots of blocks then you'll need to read more parts, so a larger part size helps. If it's just scanning a subset of a part then you're potentially wasting bandwidth and cache space transferring a whole part
p
Wouldn’t 16-32 be not insane and better than 4 as the default?
r
yeah could be. I was thinking 4MB should be enough to utilize the network well and with a large part size the $ cost from GET shouldn't be much of a factor. Basically you probably get diminishing returns at some point but it could be that's at larger parts than 4MB
p
I think we might see a nice upside with higher latency object stores
Say R2
r
ah yeah that makes sense to me