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

Massive amount of memory occupied by newPartitionStatus and newNodePartitions #421

Open
chengc-sa opened this issue Nov 9, 2023 · 5 comments
Labels

Comments

@chengc-sa
Copy link

chengc-sa commented Nov 9, 2023

We recently observed a huge memory difference between library v6.13.0 and v4.5.2, and we run a memory profiling, and found out that these two functions (newPartitionStatus and newNodePartitions) are taking up a lot of memory, is this expected and are these partition statuses fetched from server for each query request?

Screenshot 2023-11-02 at 2 51 37 PM
@khaf
Copy link
Collaborator

khaf commented Nov 10, 2023

This is expected, due to the fact that the new Query/Scans are stateful and can be resumed and retried. These values are not fetched from the server. It's just that the latest information regarding what key from what node and partition was fetched and which partitions were done vs partially finished are kept in these data structures as the Scan/Query progresses.

The question is what the numbers in your columns represent. Are these still in memory, or just the total allocated and later released by the GC?

@khaf khaf added the question label Nov 10, 2023
@chengc-sa
Copy link
Author

This is expected, due to the fact that the new Query/Scans are stateful and can be resumed and retried. These values are not fetched from the server. It's just that the latest information regarding what key from what node and partition was fetched and which partitions were done vs partially finished are kept in these data structures as the Scan/Query progresses.

The question is what the numbers in your columns represent. Are these still in memory, or just the total allocated and later released by the GC?

Thanks for some clarifications! This is total allocated. Is there any way to disable this stateful query/scan? This is increasing our client-side memory usage from 1x to 2-3x just due to this

@khaf
Copy link
Collaborator

khaf commented Nov 10, 2023

Unfortunately it is not, but if it's critical, we will discuss the feature in our product/engineering meeting.

@chengc-sa
Copy link
Author

OK thanks!

@khaf
Copy link
Collaborator

khaf commented Nov 10, 2023

Reopening to keep it in the ticket list.

@khaf khaf reopened this Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants