Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: mxnamvar on June 04, 2024, 07:15:43 PM



Title: IBD on new node is running poorly
Post by: mxnamvar on June 04, 2024, 07:15:43 PM
Hi there

I'm starting a new bitcoin node and the initial block download is going very slow (running v27). It seems like it connects to a handful of peers, downloads about 100 MB and then disconnect from all of the peers only to reconnect again to new/other peers after a couple hours or so.

I don't have any connection issues, but there might be something obvious I am missing in my set up, hardware wise it is a new MacBook Pro connected to gigabit ethernet and the blocks are being stored on a 5 TB external Winchester hard drive (Winchester black) connected via usbc.  The hard drive is not an SSD.

Any help would be greatly appreciated as nube here.

Thanks All.


Title: Re: IBD on new node is running poorly
Post by: nc50lc on June 05, 2024, 06:55:01 AM
-snip- and the blocks are being stored on a 5 TB external Winchester hard drive (Winchester black) connected via usbc.  The hard drive is not an SSD.
Just the blocks (--blocksdir) or the entire data directory?

If the latter, that is your bottleneck,
If the former and the internal drive is an SSD: set your database cache (dbcache) higher depending on your available RAM, but don't let Bitcoin Core use all.
I'd recommended to set that regardless of the datadir's location because the default is too low for your hardware.

Quote from: mxnamvar
It seems like it connects to a handful of peers, downloads about 100 MB and then disconnect from all of the peers only to reconnect again to new/other peers after a couple hours or so.
-snip-
hardware wise it is a new MacBook Pro
Peers disconnecting after a certain period seems normal but if consistent, there may be something forcing disconnection.
This sounds like your Firewall/AV software blocking connection to your peers after a certain period.
Try to add Bitcoin Core as an exception.


Title: Re: IBD on new node is running poorly
Post by: ABCbits on June 05, 2024, 09:25:35 AM
hardware wise it is a new MacBook Pro

@nc50lc already provide good answer. But i checked https://www.apple.com/shop/buy-mac/macbook-pro/ (https://www.apple.com/shop/buy-mac/macbook-pro/) and found out cheapest one only have 8GB RAM. So at some point (blocks created during 2023), IBD process will be much slower due if you happen to use Macbook Pro with only 8GB of RAM.


Title: Re: IBD on new node is running poorly
Post by: Cricktor on June 05, 2024, 08:44:45 PM
Having the whole datadir on the slow HDD will be a pain and later slow process when the UTXO set in chainstate directory grows bigger than your available RAM for Core. You can mitigate it partly if you leave the datadir on the internal SSD and symlink the blocks folder to an appropriate folder on the external HDD. That way the folders indexes and chainstate benefit from access speed of the SSD while the approx. 611GB needed space for folder blocks can grow on the slower HDD.

You can also specify explicitly the location of your blocks storage in the bitcoin.conf file (no symlinking necessary), see below and merge it with your own settings there. It is by no means complete, I just added what will speed up your initial block download.

Code:
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/

# This config should be placed in following path:
# $HOME/Library/Application Support/Bitcoin/bitcoin.conf

# [core]
# Specify a non-default location to store blockchain data.
blocksdir=<path to a blocks folder on your mounted external HDD>

# Only download and relay blocks - ignore unconfirmed transaction
blocksonly=1

# Set database cache size in MB; machines sync faster with a larger cache. Recommend setting to 4000 if RAM is available.
dbcache=4096

Of course you need to adjust the path for the blocksdir=<...> and replace <...> with the actual path to the external folder.


Title: Re: IBD on new node is running poorly
Post by: DaveF on June 06, 2024, 01:48:31 PM
... new MacBook Pro connected to gigabit ethernet...

New Pros don't have a gigabit ethernet port are you using an adapter? If so is it a 'name brand' or a $9.99 one from Amazon?
Are you running anything else while downloading or is anything else accessing the external drive?
If you go to https://bitnodes.io/#join-the-network do you see your public IP?

-Dave