https://slatedb.io logo
šŸ‘‹ Hi all! I picked up one of the help_wanted iss...
# general
l
šŸ‘‹ Hi all! I picked up one of the help_wanted issues in https://github.com/slatedb/slatedb/pull/174 let me know if you have any thoughts or feedback
Just noticed that @dyedgreen. was already assigned - will coordinate with them
d
(Going to pick up something else instead šŸ˜…)
c
@loblob6095 thanks! I'm working with @dyedgreen. to find another issue. I'll take a look at your PR. šŸ™‚
l
Thanks for taking a look. Could you help me sanity-check something? You asked to include the per-block overhead, which makes sense, but if I'm reading this correctly, the number of blocks is a function of (target block size and key-value pair sizes), is that right? If so, we'd need to give this estimator a way to iterate over the size of each kv pair. How do you feel about including the bloom filter information and doing the per-block overhead in a follow-up feature? There's some minor re-shuffling* that needs to happen for the bloom filter bit anyway, so maybe that'd be better done in multiple steps. * de-duplicating the bytes-per-filter calculation, and factoring out the default bits-per-key which is currently hard-coded to 10 in two places.
(also turned the PR into a draft for now as it isn't quite ready given the new constraints)
c
Lemme take a look! I’m tied up today. Hopefully tomorrow. šŸ™‚
Thanks for following up
Catching up on this
> You asked to include the per-block overhead, which makes sense, but if I'm reading this correctly, the number of blocks is a function of (target I was thinking we would just do the memtable's
total_size_bytes
divided by the block size. So if we have
total_size_bytes = 40_960
and block size is 4096, we would estimate 10 blocks.
Not perfect, but should get us close (usually)
> factoring out the default bits-per-key which is currently hard-coded to 10 in two places. @Rohan is addressing this in #170 (https://github.com/slatedb/slatedb/pull/170). Given that he's traveling, I don't want to block your PR on that change, though. So treating the filter key bits as 10 is fine. > How do you feel about including the bloom filter information and doing the per-block overhead in a follow-up feature I am fine with etiher way. It looks like you made some progress, so I'm fine to merge here and do a follow-on if you like. What do you prefer?
l
(just wanted to explicitly ack this; I'll pick this up over the weekend at the latest. Please feel free to steal the feature if you'd like to release this earlier)
Alright, this is getting closer. Size estimate should be closer now, but serialization tests still show a delta especially for small memtables. Will have another look later in the week.
c
Thanks for the update!