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

[DocDB] Tserver hits soft limit and not reclaiming back memory | Rejecting Write request: Soft memory limit exceeded #11723

Closed
shantanugupta-yb opened this issue Mar 11, 2022 · 1 comment · May be fixed by ryan-ally/yugabyte-db#213
Assignees
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@shantanugupta-yb
Copy link

shantanugupta-yb commented Mar 11, 2022

Jira Link: DB-1085

Description

While testing for yb cloud free tier(RF1, 2GB memory), tserver was hitting soft limit and Writes were getting rejected with error "Rejecting Write request: Soft memory limit exceeded (at 92.86% of capacity), score: 0.00"

Ideally when tserver has already hit memory soft limit with no active workload running, the background thread should reclaim back memory.

I also wanted to check the current allocation held in memory for which I took difference between to memory snapshots. Below are the top 5 allocation. The 1st snapshot had allocations of 270MB and the 2nd snapshot had allocation 610M. So out of the 310M below are the top 5 allocation:

  1. 148M - rocksdb::Arena::AllocateNewBlock
  2. 61.2M - std::__cxx11::basic_string::reserve  
  3. 42M. - rocksdb::UncompressBlockContents  
  4. 23.8M - std::__cxx11::basic_string::_M_construct  
  5. 13.2M. - yb::rpc::CircularReadBuffer::CircularReadBuffer  

The rocksdb version used by us seems to of v4.5 and I seen a bug "rocksdb::Arena::AllocateNewBlock allocate memory grows without limit #8371" recently got fixed which is missing from the rocksdb version we are using. facebook/rocksdb#8371

@shantanugupta-yb shantanugupta-yb added the area/docdb YugabyteDB core features label Mar 11, 2022
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 8, 2022
@bmatican
Copy link
Contributor

This is not a bug, this is just the memory overhead that we have, per tablet, from the rocksdb arena and metric histograms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants