mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
save
This commit is contained in:
parent
515aedda7b
commit
31e5036985
@ -711,11 +711,12 @@ var (
|
||||
}
|
||||
DbPageSizeFlag = cli.StringFlag{
|
||||
Name: "db.pagesize",
|
||||
Usage: "set mdbx pagesize on db creation: must be power of 2 and '256b <= pagesize <= 64kb'. default: equal to OperationSystem's pageSize",
|
||||
Usage: "DB is splitted to 'pages' of fixed size. Can't change DB creation. Must be power of 2 and '256b <= pagesize <= 64kb'. Default: equal to OperationSystem's pageSize. Bigger pageSize causing: 1. More writes to disk during commit 2. Smaller b-tree high 3. Less fragmentation 4. Less overhead on 'free-pages list' maintainance (a bit faster Put/Commit) 5. If expecting DB-size > 8Tb then set pageSize >= 8Kb",
|
||||
Value: datasize.ByteSize(kv.DefaultPageSize()).String(),
|
||||
}
|
||||
DbSizeLimitFlag = cli.StringFlag{
|
||||
Name: "db.size.limit",
|
||||
Usage: "runtime limit of chandata db size. you can change value of this flag at any time",
|
||||
Value: (8 * datasize.TB).String(),
|
||||
}
|
||||
|
||||
@ -1157,7 +1158,7 @@ func setDataDir(ctx *cli.Context, cfg *nodecfg.Config) {
|
||||
}
|
||||
sz := cfg.MdbxPageSize.Bytes()
|
||||
if !isPowerOfTwo(sz) || sz < 256 || sz > 64*1024 {
|
||||
panic(fmt.Errorf("invalid --db.pagesize: %s=%d, see: %s", ctx.String(DbPageSizeFlag.Name), sz, DbPageSizeFlag.Usage))
|
||||
panic(fmt.Errorf("invalid --db.pageSize: %s=%d, see: %s", ctx.String(DbPageSizeFlag.Name), sz, DbPageSizeFlag.Usage))
|
||||
}
|
||||
szLimit := cfg.MdbxDBSizeLimit.Bytes()
|
||||
if !isPowerOfTwo(szLimit) || szLimit < 256 {
|
||||
|
Loading…
Reference in New Issue
Block a user