mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
caplin: to use 1 worker for snapshots compression (#8892)
Erigon by default must use as minimum resources as possible to build snapshots. But cli commands - can go opposite and maximize.
This commit is contained in:
parent
fcb9fce5d0
commit
49890b38b7
@ -201,7 +201,7 @@ func (a *Antiquary) antiquate(from, to uint64) error {
|
||||
return nil // Just skip if we don't have a downloader
|
||||
}
|
||||
log.Info("[Antiquary]: Antiquating", "from", from, "to", to)
|
||||
if err := freezeblocks.DumpBeaconBlocks(a.ctx, a.mainDB, a.beaconDB, from, to, snaptype.Erigon2RecentMergeLimit, a.dirs.Tmp, a.dirs.Snap, 8, log.LvlDebug, a.logger); err != nil {
|
||||
if err := freezeblocks.DumpBeaconBlocks(a.ctx, a.mainDB, a.beaconDB, from, to, snaptype.Erigon2RecentMergeLimit, a.dirs.Tmp, a.dirs.Snap, 1, log.LvlDebug, a.logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ledgerwatch/erigon/eth/ethconfig/estimate"
|
||||
"github.com/ledgerwatch/erigon/turbo/debug"
|
||||
|
||||
lg "github.com/anacrolix/log"
|
||||
@ -456,7 +457,7 @@ func (c *DumpSnapshots) Run(ctx *Context) error {
|
||||
return
|
||||
})
|
||||
|
||||
return freezeblocks.DumpBeaconBlocks(ctx, db, beaconDB, 0, to, snaptype.Erigon2RecentMergeLimit, dirs.Tmp, dirs.Snap, 8, log.LvlInfo, log.Root())
|
||||
return freezeblocks.DumpBeaconBlocks(ctx, db, beaconDB, 0, to, snaptype.Erigon2RecentMergeLimit, dirs.Tmp, dirs.Snap, estimate.CompressSnapshot.Workers(), log.LvlInfo, log.Root())
|
||||
}
|
||||
|
||||
type CheckSnapshots struct {
|
||||
|
Loading…
Reference in New Issue
Block a user