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

Total memory allocation is much higher than mem_tracker_Read_Buffer_Inbound_RPC_Sending in case it is flooded with queued RPC messages #3041

Closed
ttyusupov opened this issue Nov 28, 2019 · 0 comments
Assignees
Labels
kind/enhancement This is an enhancement of an existing feature

Comments

@ttyusupov
Copy link
Contributor

In the case of RPC sending queue is flooded with small messages (like in #2964) total memory allocated is much higher than mem_tracker_Read_Buffer_Inbound_RPC_Sending and there are no other noticeable tracked memory allocations.
For example, in one scenario mem_tracker_Read_Buffer_Inbound_RPC_Sending was taking up to ~250MB and everything else is less than ~10MB, but total memory allocation was more than 6GB.

@ttyusupov ttyusupov added the kind/enhancement This is an enhancement of an existing feature label Nov 28, 2019
ttyusupov added a commit that referenced this issue Dec 16, 2019
Summary:
We only accounted serialized message size when tracking `TcpStream::sending_` queue memory consumption,
but for example, for 4-bytes heartbeat message, overall memory consumption was roughly about 120
bytes. And in a scenario when we had sending queue flooded with heartbeats we were tracking only
4*N instead of ~120*N. This also would give us unreliable memory tracking results when we have a
lot of other small enough messages sitting in `TcpStream::sending_` queue.

Added `TestRpc.SendingQueueMemoryUsage`.

Test Plan: Jenkins

Reviewers: mikhail, bogdan, sergei

Reviewed By: sergei

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D7629
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This is an enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant