Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disk volume for BSC node #1218

Closed
hejing opened this issue Nov 30, 2022 · 11 comments
Closed

Disk volume for BSC node #1218

hejing opened this issue Nov 30, 2022 · 11 comments
Assignees
Labels
question Further information is requested

Comments

@hejing
Copy link

hejing commented Nov 30, 2022

May I know the suitable volume of disk for BSC node? The node data size increased sharply in recent 2 months. Now it is exceeding 5T.

@kris-ss
Copy link

kris-ss commented Nov 30, 2022

Hello, the node disk storage size for optimal performance based on testing is ~1.5 TB, once your node reaches that, it is advised to perform some pruning.

Please refer to the following for storage optimization suggestions.

https://docs.bnbchain.org/docs/validator/node-maintenance/#storage
#875

@pythonberg1997 pythonberg1997 self-assigned this Nov 30, 2022
@pythonberg1997 pythonberg1997 added the question Further information is requested label Nov 30, 2022
@hejing
Copy link
Author

hejing commented Nov 30, 2022

Hello @kris-ss, I tried your instruction to prune the data but get following error after 1 mins packaging.

WARN [11-30|18:20:54.842] Snapshot is not continuous with chain    snaproot=4e4a39..d2ac5c chainroot=f31bb5..c8100a
ERROR[11-30|18:20:54.842] Failed to open snapshot tree             err="head doesn't match snapshot: have 0x4e4a3950567bdc622157849591145b11ecfb50c3f4cc08f4465a2bd244d2ac5c, want 0xf31bb5a11f34b1432d6e8f5c3e0356d1c68cd292eca91b3c1743d15a00c8100a"
INFO [11-30|18:20:56.381] Deep froze chain segment                 blocks=30001 elapsed=5.058s number=30000 hash=251b5b..f64695
INFO [11-30|18:20:56.381] Freezer shutting down 
head doesn't match snapshot: have 0x4e4a3950567bdc622157849591145b11ecfb50c3f4cc08f4465a2bd244d2ac5c, want 0xf31bb5a11f34b1432d6e8f5c3e0356d1c68cd292eca91b3c1743d15a00c8100a

@pythonberg1997
Copy link
Contributor

Hello @hejing. Your node didn't catch the latest block right?

@pythonberg1997
Copy link
Contributor

Download a snapshot and sync up first https://github.com/bnb-chain/bsc-snapshots

@hejing
Copy link
Author

hejing commented Nov 30, 2022

I think it stopped days back since no disk space. So I need to remove current data directory and sync from the snapshot first?

@pythonberg1997
Copy link
Contributor

I see. You can:

  • Expand your disk
    or
  • prune block first to make space, then prune state again.
    The cmd is like:
./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient --block-amount-reserved [amount of blocks to reserve]

@hejing
Copy link
Author

hejing commented Nov 30, 2022

prune-block (block-amount-reserved=128) succeeded, but the space didn't spared much.

INFO [11-30|19:38:21.460] the oldOffSet is                         oldOffSet=30001
INFO [11-30|19:38:21.460] new offset/new startBlockNumber is       new offset=59874
INFO [11-30|19:38:21.475] AncientDB item count                     items=0
INFO [11-30|19:38:21.475] Opened ancient database                  database=/coins/bsc_mainnet/bscdata/geth/chaindata/ancient_back readonly=false frozen=59874
INFO [11-30|19:38:21.477] prune info                               old offset=30001 number of items in ancientDB=30001 amount to reserve=128
INFO [11-30|19:38:21.477] new offset/new startBlockNumber recorded successfully  new offset=59874
INFO [11-30|19:38:21.498] block back up done                       current start blockNumber in ancientDB=59874
INFO [11-30|19:38:21.507] Block pruning BackUp successfully        time duration since start is=17.014s
INFO [11-30|19:38:21.507] backup block successfully 
INFO [11-30|19:38:21.509] Block prune successfully 

prune-state failed as before

INFO [11-30|19:39:14.304] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [11-30|19:39:14.305] Set global gas cap                       cap=50,000,000
INFO [11-30|19:39:14.305] Allocated cache and file handles         database=/coins/bsc_mainnet/bscdata/geth/chaindata cache=408.00MiB handles=512,000
INFO [11-30|19:39:31.744] AncientDB item count                     items=128
INFO [11-30|19:39:31.744] Opened ancient database                  database=/coins/bsc_mainnet/bscdata/geth/chaindata/ancient readonly=false frozen=60002
WARN [11-30|19:39:31.866] Snapshot is not continuous with chain    snaproot=4e4a39..d2ac5c chainroot=f31bb5..c8100a
ERROR[11-30|19:39:31.866] Failed to open snapshot tree             err="head doesn't match snapshot: have 0x4e4a3950567bdc622157849591145b11ecfb50c3f4cc08f4465a2bd244d2ac5c, want 0xf31bb5a11f34b1432d6e8f5c3e0356d1c68cd292eca91b3c1743d15a00c8100a"
INFO [11-30|19:39:37.587] Deep froze chain segment                 blocks=30001 elapsed=5.839s number=90002 hash=35d859..4c4d58
INFO [11-30|19:39:37.587] Freezer shutting down 
head doesn't match snapshot: have 0x4e4a3950567bdc622157849591145b11ecfb50c3f4cc08f4465a2bd244d2ac5c, want 0xf31bb5a11f34b1432d6e8f5c3e0356d1c68cd292eca91b3c1743d15a00c8100a

so I have to expand the disk and sync to the latest block now?

@mosinb
Copy link

mosinb commented Nov 30, 2022

so I have to expand the disk and sync to the latest block now?

Correct, I think the best option for you is to expand the disk and sync again.

@zhaoxiangjunupi
Copy link

请问BSC节点适合的磁盘容量是多少?最近两个月节点数据量急剧增加。现在已经超过5T了。

Hello, do you synchronize a fullnode?

@daica75
Copy link

daica75 commented Dec 5, 2022

I see. You can:

  • Expand your disk
    or
  • prune block first to make space, then prune state again.
    The cmd is like:
./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient --block-amount-reserved [amount of blocks to reserve]

I have tried to do the prune-block before but what it did was clear out the ancient folder... is that what prune-block is supposed to do? the ancient folder had more than 1TB and after pruning it was just a few MB.

@kris-ss
Copy link

kris-ss commented Dec 6, 2022

@daica75 prune-block will prune undesired ancient block data. It will discard block, receipt, and header in the ancient database to save space.

The value you specified in block-amount-reserved is how many ancient block data that will be left after pruning.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants