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

release/20.07- Rollup: Reduce memory consumption of the map (#5599) #5957

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Jul 13, 2020

The original PR #5731 was closed because I couldn't start CI on that PR.

FIXES - DGRAPH-1613

The incremental roll-up uses a map to keep track of the keys that should be
rolled up. The current implementation never clears the map which stores the
keys. The existing algorithm is

If key is present or key was rolled up 10 seconds ago, perform roll up

we never clean up the map in the existing algorithm and as a result the map
consumed a lot of memory

3.77GB 32.51% 32.51%     3.93GB 33.95%  github.com/dgraph-io/dgraph/posting.(*incrRollupi).Process

The proposed change will clean up the keys every 2 minutes and remove the keys
that have not changed in the last 10 seconds.

(cherry picked from commit b77c23c)


This change is Reviewable

Docs Preview: Dgraph Preview

FIXES - DGRAPH-1613

The incremental roll-up uses a `map` to keep track of the keys that should be
rolled up. The current implementation never clears the map which stores the
keys. The existing algorithm is
```
If key is present or key was rolled up 10 seconds ago, perform roll up
```
we never clean up the map in the existing algorithm and as a result the map
consumed a lot of memory 
```
3.77GB 32.51% 32.51%     3.93GB 33.95%  github.com/dgraph-io/dgraph/posting.(*incrRollupi).Process
```

The proposed change will clean up the keys every 2 minutes and remove the keys
that have not changed in the last 10 seconds.

(cherry picked from commit b77c23c)
@parasssh parasssh merged commit e27764c into release/v20.07 Jul 13, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/r20.07-incr-map-1 branch July 14, 2020 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants