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/v20.03 - add --cache_mb and --cache_percentage flag #6287

Merged
merged 3 commits into from
Aug 27, 2020

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Aug 27, 2020

Badger now has 2 separate caches blockCache and indexCache (see dgraph-io/badger#1476).
This PR adds --cache_mb and --cache_percentage flags for alpha and zero. The
total cache is split among various caches used by zero and alpha based on
percentages defined. Cache size is in MBs and format of caches is as follows:
For alpha:
PostingListCache,PstoreBlockCache,PstoreIndexCache,WstoreBlockCache,WstoreIndexCache
For zero:
blockCache,indexCache


This change is Reviewable

Docs Preview: Dgraph Preview

@NamanJain8 NamanJain8 requested review from manishrjain, martinmr and a team as code owners August 27, 2020 07:49
@jarifibrahim jarifibrahim changed the title add --cache_mb and --cache_percentage flag release/v20.03 - add --cache_mb and --cache_percentage flag Aug 27, 2020
Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 12 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @martinmr, and @NamanJain8)


posting/lists.go, line 150 at r1 (raw file):

	var err error
	lCache, err = ristretto.NewCache(&ristretto.Config{

Why is this in this PR? We don't want posting list cache here.

@parasssh parasssh merged commit 9104512 into release/v20.03 Aug 27, 2020
@NamanJain8 NamanJain8 deleted the naman/v20.03-cp-cache-flags branch October 20, 2020 09:58
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.

3 participants