Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
add map size setter (#1050)
Browse files Browse the repository at this point in the history
Add a bound the txpool db, rather than leaving it as the default of 2TB.
This is to reduce the page file profile when running multiple nodes from
around 3.5GB per txpool instance.

The current pool map side is set to 512MB - which seems reasonable with
16MB increments
  • Loading branch information
mh0lt authored and AskAlexSharov committed Sep 6, 2023
1 parent b134692 commit 2ad2db0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions txpool/txpooluitl/all_components.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func AllComponents(ctx context.Context, cfg txpoolcfg.Config, cache kvcache.Cach
txPoolDB, err := mdbx.NewMDBX(log.New()).Label(kv.TxPoolDB).Path(cfg.DBDir).
WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TxpoolTablesCfg }).
Flags(func(f uint) uint { return f ^ mdbx2.Durable | mdbx2.SafeNoSync }).
MapSize(512 * datasize.MB).
GrowthStep(16 * datasize.MB).
SyncPeriod(30 * time.Second).
Open()
Expand Down

0 comments on commit 2ad2db0

Please sign in to comment.