Skip to content
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

[BanyanDB-Server] Add Memory Usage Control for BanyanDB Queries #12798

Open
2 of 3 tasks
hanahmily opened this issue Nov 24, 2024 · 0 comments
Open
2 of 3 tasks

[BanyanDB-Server] Add Memory Usage Control for BanyanDB Queries #12798

hanahmily opened this issue Nov 24, 2024 · 0 comments
Labels
database BanyanDB - SkyWalking native database feature New feature

Comments

@hanahmily
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

BanyanDB queries can use significant memory, particularly when processing large datasets. This proposal introduces a mechanism to control the maximum memory consumption during query execution. By utilizing the statistical information available for each block, the system can summarize the total memory usage of ongoing queries and enforce limits to prevent out-of-memory (OOM) errors.

A configurable parameter, such as max_query_memory, should be introduced to set the maximum allowable memory usage. If the estimated memory consumption exceeds this limit, the query execution should be gracefully terminated or paused.

It is important to provide detailed error messages when a query is terminated due to memory constraints. Additionally, memory usage metrics should be made available, and memory usage details should be logged for debugging and optimization purposes.

Optionally, a backpressure mechanism could be implemented to slow down or queue queries when memory usage approaches the set limit.

Please note that series index queries should not be affected by this limitation.

Use case

No response

Related issues

No response

Are you willing to submit a pull request to implement this on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@hanahmily hanahmily added feature New feature database BanyanDB - SkyWalking native database labels Nov 24, 2024
@hanahmily hanahmily added this to the BanyanDB - 0.8.0 milestone Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database BanyanDB - SkyWalking native database feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant