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

perf(cache): Add a sharded map for global cache #9180

Open
wants to merge 8 commits into
base: harshil-goel/mutable-map
Choose a base branch
from

Conversation

harshil-goel
Copy link
Contributor

@harshil-goel harshil-goel commented Sep 27, 2024

Main without risteretto cache:

badger 2024/10/06 20:34:31 INFO: All 0 tables opened in 0s
badger 2024/10/06 20:34:31 INFO: Discard stats nextEmptySlot: 0
badger 2024/10/06 20:34:31 INFO: Set nextTxnTs to 0
goos: linux
goarch: amd64
pkg: github.com/dgraph-io/dgraph/v24/posting
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkTestCache-8     1673727               751.5 ns/op
PASS
ok      github.com/dgraph-io/dgraph/v24/posting 2.073s

Main with risteretto branch:

badger 2024/10/06 20:35:36 INFO: All 0 tables opened in 0s
badger 2024/10/06 20:35:36 INFO: Discard stats nextEmptySlot: 0
badger 2024/10/06 20:35:36 INFO: Set nextTxnTs to 0
goos: linux
goarch: amd64
pkg: github.com/dgraph-io/dgraph/v24/posting
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkTestCache-8     2333268               501.3 ns/op
PASS
ok      github.com/dgraph-io/dgraph/v24/posting 1.531s

This PR:

badger 2024/10/06 20:34:12 INFO: All 0 tables opened in 0s
badger 2024/10/06 20:34:12 INFO: Discard stats nextEmptySlot: 0
badger 2024/10/06 20:34:12 INFO: Set nextTxnTs to 0
goos: linux
goarch: amd64
pkg: github.com/dgraph-io/dgraph/v24/posting
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkTestCache-8     3668409               319.3 ns/op
PASS
ok      github.com/dgraph-io/dgraph/v24/posting 1.576s

@harshil-goel harshil-goel requested a review from a team as a code owner September 27, 2024 03:51
@github-actions github-actions bot added area/core internal mechanisms go Pull requests that update Go code labels Sep 27, 2024
posting/mvcc.go Outdated
@@ -1,7 +1,7 @@
/*
* Copyright 2017-2023 Dgraph Labs, Inc. and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, *CachePLersion 2.0 (the "License");
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo?

@github-actions github-actions bot added the area/testing Testing related issues label Sep 30, 2024
edgraph/server.go Fixed Show fixed Hide fixed
@harshil-goel harshil-goel changed the title perf(cache): Add a shared map for global cache perf(cache): Add a sharded map for global cache Oct 6, 2024
@harshil-goel harshil-goel force-pushed the harshil-goel/shared-map branch 4 times, most recently from ab8d9a6 to b566e13 Compare October 19, 2024 19:49
@harshil-goel harshil-goel changed the base branch from main to harshil-goel/mutable-map October 19, 2024 19:49
@harshil-goel harshil-goel changed the base branch from harshil-goel/mutable-map to main October 21, 2024 22:34
@harshil-goel harshil-goel changed the base branch from main to harshil-goel/mutable-map October 23, 2024 16:26
@harshil-goel harshil-goel force-pushed the harshil-goel/mutable-map branch 2 times, most recently from 8497e3d to 34d455d Compare November 1, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

2 participants