Skip to content

release/v20.03 - add --cache_mb and --cache_percentage flag#6287

Merged
parasssh merged 3 commits intorelease/v20.03from
naman/v20.03-cp-cache-flags
Aug 27, 2020
Merged

release/v20.03 - add --cache_mb and --cache_percentage flag#6287
parasssh merged 3 commits intorelease/v20.03from
naman/v20.03-cp-cache-flags

Conversation

@NamanJain8
Copy link
Copy Markdown
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 a review from a team 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
Copy Markdown
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