-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use Badger4 as datastore #20
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,11 @@ | |
Value: 3000, | ||
Usage: "libp2p connection manager 'high' water mark", | ||
}, | ||
&cli.IntFlag{ | ||
Name: "inmem-block-cache", | ||
Value: 1 << 30, | ||
Usage: "Size of the in-memory block cache. 0 to disable (disables compression too)", | ||
}, | ||
Comment on lines
+59
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Total memory consumption would be something like block-cache + memtables + indexes + bloom filters + LSM. Now, I am not sure how much of the LSM lives in memory in badger. They seem to suggest that the LSM can live in memory, and in V0 LSM's open option was set to MemoryMap, so very probably it depends on the OS how many memory pages it keeps live. |
||
&cli.DurationFlag{ | ||
Name: "connmgr-grace", | ||
Value: time.Minute, | ||
|
@@ -81,17 +86,16 @@ | |
cdns := newCachedDNS(dnsCacheRefreshInterval) | ||
defer cdns.Close() | ||
|
||
gnd, err := Setup(cctx.Context, &Config{ | ||
ConnMgrLow: cctx.Int("connmgr-low"), | ||
ConnMgrHi: cctx.Int("connmgr-hi"), | ||
ConnMgrGrace: cctx.Duration("connmgr-grace"), | ||
Blockstore: filepath.Join(ddir, "blockstore"), | ||
Datastore: filepath.Join(ddir, "datastore"), | ||
Libp2pKeyFile: filepath.Join(ddir, "libp2p.key"), | ||
RoutingV1: cctx.String("routing"), | ||
KuboRPCURLs: getEnvs(EnvKuboRPC, DefaultKuboRPC), | ||
DHTSharedHost: cctx.Bool("dht-fallback-shared-host"), | ||
DNSCache: cdns, | ||
gnd, err := Setup(cctx.Context, Config{ | ||
ConnMgrLow: cctx.Int("connmgr-low"), | ||
ConnMgrHi: cctx.Int("connmgr-hi"), | ||
ConnMgrGrace: cctx.Duration("connmgr-grace"), | ||
InMemBlockCache: cctx.Int64("inmem-block-cache"), | ||
Libp2pKeyFile: filepath.Join(ddir, "libp2p.key"), | ||
RoutingV1: cctx.String("routing"), | ||
KuboRPCURLs: getEnvs(EnvKuboRPC, DefaultKuboRPC), | ||
DHTSharedHost: cctx.Bool("dht-fallback-shared-host"), | ||
DNSCache: cdns, | ||
}) | ||
if err != nil { | ||
return err | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending a tag when ipfs/github-mgmt#174 resolved.