-
Notifications
You must be signed in to change notification settings - Fork 589
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
Oversized allocation: 299008 bytes in storage::kvstore::flush_and_apply_ops
#10744
Comments
Hmm, I guess even though we're using node_hash_map here, the sheer number of keys is sufficient to make the array of hash slots an oversized allocation. Maybe we have to use btree_map instead. Also, flush_and_apply_ops could have a similar batch builder issue to #10749, when many records are written within the flush interval, but that would be a different case to this stack trarce. We are kind of patching low level issues here without addressing a larger architectural issue, that kvstore was added as this "cheap" utility, but it is actually rather expensive to add keys here, as the footprint is multiplied by the peak partition count per shard. We could simplify our lives somewhat if we made the keys a little bit smarter, to group all the content for a particular NTP together. |
yeh, something that might work in the short term in an transparent-ish way is to make the flat_map be multi-level. first level is i don't know the sub-system key, then some prefix of the next part of the key. not sure this works, or if we should just add an ntp-aware interface. |
Some uses of `record_batch_builder` build very large batches, resulting in oversize allocations in `std::vector _records`. Remove the `std::vector` by serializing into an `iobuf` at the point of `add_raw_kv`. This requires storing an `int32_t` for the record count. Fixes redpanda-data#10744 Fixes redpanda-data#10749 Signed-off-by: Ben Pope <[email protected]> (cherry picked from commit 9c6e1ee)
This isn't fixed by #11837 |
Artifact URL: https://ci-artifacts.dev.vectorized.cloud:443/vtools/7520/01880eff-2a13-4369-b9c9-30fc45d70c74/vbuild/output/ducktape-release-clang-amd64.tgz
Test details:
Backtrace:
JIRA Link: CORE-1304
The text was updated successfully, but these errors were encountered: