Skip to content

Commit

Permalink
tune cache parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Nov 16, 2020
1 parent f825a1c commit 672669e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/modules/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func BareMonolithBlockstore(lc fx.Lifecycle, r repo.LockedRepo) (dtypes.BareMono
func StateBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, bs dtypes.BareMonolithBlockstore) (dtypes.StateBlockstore, error) {
sbs, err := blockstore.WrapFreecacheCache(helpers.LifecycleCtx(mctx, lc), bs, blockstore.FreecacheConfig{
Name: "state",
BlockCapacity: 1 << 28, // 256MiB.
ExistsCapacity: 1 << 25, // 32MiB.
BlockCapacity: 288 * 1024 * 1024, // 288MiB.
ExistsCapacity: 48 * 1024 * 1024, // 48MiB.
})
if err != nil {
return nil, err
Expand All @@ -55,8 +55,8 @@ func StateBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, bs dtypes.BareMon
func ChainBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, bs dtypes.BareMonolithBlockstore) (dtypes.ChainBlockstore, error) {
cbs, err := blockstore.WrapFreecacheCache(helpers.LifecycleCtx(mctx, lc), bs, blockstore.FreecacheConfig{
Name: "chain",
BlockCapacity: 1 << 27, // 128MiB.
ExistsCapacity: 1 << 24, // 16MiB.
BlockCapacity: 64 * 1024 * 1024, // 64MiB.
ExistsCapacity: 16 * 1024, // 16MiB.
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 672669e

Please sign in to comment.