Pages:
Author

Topic: Bitcoin Core IBD slow (Read 176 times)

sr. member
Activity: 406
Merit: 896
December 05, 2023, 08:05:18 AM
#32
Nope. A hdparm speed test doesn't care about the filesystem.

So the current speeds have gone up to:

Code:
/dev/sda:
 Timing cached reads:   1774 MB in  2.00 seconds = 887.85 MB/sec
 Timing buffered disk reads: 252 MB in  3.24 seconds =  77.85 MB/sec

I feel stupid, but here is what happened... I was using the USB 2.0 port and not the 3.0 port.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
December 05, 2023, 07:49:55 AM
#31
Perhaps a format will solve the issue...
Nope. A hdparm speed test doesn't care about the filesystem.
sr. member
Activity: 406
Merit: 896
December 05, 2023, 07:40:38 AM
#30

I can't find an English review for this exact model, but my Intenso USB stick is faster than what you get.


Perhaps a format will solve the issue...
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
December 05, 2023, 07:21:21 AM
#29
I can't find an English review for this exact model, but my Intenso USB stick is faster than what you get.

Quote
Could the format be an issue? My disk is exfat
The filesystem matters, but not for raw speed tests.
sr. member
Activity: 406
Merit: 896
December 05, 2023, 07:09:21 AM
#28
Which SSD do you have exactly?

This is my disk: https://www.amazon.de/-/en/Intenso-Internal-Inch-SATA-Black/dp/B0B63HPPG3

I'm just guessing here: is it possible you're using a very low quality USB cable?
Have you tried Gnome Disks? It has a Benchmark feature.
Or have a look at GSmartControl, see if it can give you a reason for the low speed.

No errors unfortunately... with GSmartControl

Could the format be an issue? My disk is exfat

EDIT: I think I will backup my drive and then format to ext4
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
December 05, 2023, 06:48:28 AM
#27
No my IBD is finished and my node is stopped. So essentially my RPi is connected to an SSD which has the whole bitcoin-core structure, but bitcoind is not running.
Which SSD do you have exactly?
I'm just guessing here: is it possible you're using a very low quality USB cable?
Have you tried Gnome Disks? It has a Benchmark feature.
Or have a look at GSmartControl, see if it can give you a reason for the low speed.

Quote
I also ran fstrim -v on the mounted directory and it trimmed some data, but it didn't work afterwards. I mean no amelioration was seen.
That shouldn't matter for "hdparm -tT", it doesn't use the file system.
sr. member
Activity: 406
Merit: 896
December 05, 2023, 06:36:47 AM
#26

Most microSD cards are faster than this nowadays. It should be 10 times faster:

Did you run your disk speed test during IBD? If so, that's probably why it's slow.

The type of SSD matters too: some perform just as you'd expect, and others are only fast "in short burst", and after writing the burst data, it gets much slower, up to the point that combined read and writes can make the entire system freeze for a while. That doesn't matter much for normal computer usage, but it matters a lot during heavy tasks (such as the IBD).

Hi Loyce.

No my IBD is finished and my node is stopped. So essentially my RPi is connected to an SSD which has the whole bitcoin-core structure, but bitcoind is not running.

I also ran fstrim -v on the mounted directory and it trimmed some data, but it didn't work afterwards. I mean no amelioration was seen.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
December 05, 2023, 06:30:22 AM
#25
Code:
/dev/sda:
 Timing buffered disk reads:  62 MB in  4.67 seconds =  13.28 MB/sec
Isn't it too slow for an SSD ? Especially the second timer.
Most microSD cards are faster than this nowadays. It should be 10 times faster:
Image loading...

Did you run your disk speed test during IBD? If so, that's probably why it's slow.

The type of SSD matters too: some perform just as you'd expect, and others are only fast "in short burst", and after writing the burst data, it gets much slower, up to the point that combined read and writes can make the entire system freeze for a while. That doesn't matter much for normal computer usage, but it matters a lot during heavy tasks (such as the IBD).
sr. member
Activity: 406
Merit: 896
December 05, 2023, 06:17:15 AM
#24

I wanted to test it further, so I did:

Code:
sudo hdparm -tT /dev/sda

To my surprise, I got:

Code:
/dev/sda:
 Timing cached reads:   1776 MB in  2.00 seconds = 888.80 MB/sec
 Timing buffered disk reads:  62 MB in  4.67 seconds =  13.28 MB/sec

Isn't it too slow for an SSD ? Especially the second timer.
sr. member
Activity: 406
Merit: 896
December 03, 2023, 04:44:47 AM
#23

To sum up:
The IBD went from 0 to 790,000 in 5 days, then from 790,000 to 810,000 in 3 days, then from 810,000 to 814,000 in 2 days and currently, from 814,000 to 816,000 in 10 hrs. I guess it will reach 819,000 soon enough.

Thank you all for the answers, apparently it was what Loyce said above regarding the ordinals and the larger transactions.

Now, I am at 816,000 and it moves quickly. It must be finished later during the day.

Finally, I did increase my dbcache to 6000 (from a total of 8GB RAM), as all of you suggested. However, I did not use the assumevalid directive, because I wanted to read more about it before using it, but unfortunately I didn't have the time.

legendary
Activity: 2856
Merit: 7410
Crypto Swap Exchange
December 02, 2023, 05:09:14 AM
#22
Edit: be careful with default linux swap behavior which perform some swap even though there are some free/unused RAM capacity.

I am sorry I don't follow you on this. You mean perhaps I should add less than 7000 and go for 6000 for example?

I was referring to swappiness value (each distro probably have different default value) which affect swap behavior. That means i suggest you to check that value and optionally reduce it. Here's an example guide, https://linuxize.com/post/how-to-change-the-swappiness-value-in-linux/.
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
November 30, 2023, 03:56:30 PM
#21
Have you done any checks on the SSD? I spent a couple of hours the other day trying to figure out why a PC was so slow and it turned out the almost new SSD was failing SMART checks.
Was looking for malware, was checking running apps, etc. Till I finally ran crystaldisk and poof. But neither the PC or Windows put up a smart error.

-Dave

Hi Dave, no I haven't checked the disk. I think it's an exFAT, but I am not sure. Also I run Raspbian and I am not aware of what crystal disk is. Is it a tool?


Crystaldiskinfo is a SMART https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology checker for drives for windows.
I don't know of an equivalent for RPi, will have to look.

But it does show what the drive thinks is going on it with it, not what Windows or what the PC itself thinks. They can for whatever reason hide / not report SMART issues.

-Dave
sr. member
Activity: 406
Merit: 896
November 30, 2023, 01:24:41 PM
#20
Have you done any checks on the SSD? I spent a couple of hours the other day trying to figure out why a PC was so slow and it turned out the almost new SSD was failing SMART checks.
Was looking for malware, was checking running apps, etc. Till I finally ran crystaldisk and poof. But neither the PC or Windows put up a smart error.

-Dave

Hi Dave, no I haven't checked the disk. I think it's an exFAT, but I am not sure. Also I run Raspbian and I am not aware of what crystal disk is. Is it a tool?
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
November 30, 2023, 12:03:05 PM
#19
Have you done any checks on the SSD? I spent a couple of hours the other day trying to figure out why a PC was so slow and it turned out the almost new SSD was failing SMART checks.
Was looking for malware, was checking running apps, etc. Till I finally ran crystaldisk and poof. But neither the PC or Windows put up a smart error.

-Dave
sr. member
Activity: 406
Merit: 896
November 30, 2023, 09:43:46 AM
#18
I am sorry I don't follow you on this. You mean perhaps I should add less than 7000 and go for 6000 for example?

Try 3/4ths of the total RAM. Your disk doesn't seem to be the problem I thought you had an internal SSD and externally-attached 2TB SSD... my bad.

Also combine it with the assumevalid directive that nc50lc posted about, maybe set it to 800000 blocks, to really speed up things, as these things must have been verified thousands of times by now.

I will set it to 800,000 and also set dbache to 6000 and I will see if it makes a difference.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
November 30, 2023, 09:21:00 AM
#17
I am sorry I don't follow you on this. You mean perhaps I should add less than 7000 and go for 6000 for example?

Try 3/4ths of the total RAM. Your disk doesn't seem to be the problem I thought you had an internal SSD and externally-attached 2TB SSD... my bad.

Also combine it with the assumevalid directive that nc50lc posted about, maybe set it to 800000 blocks, to really speed up things, as these things must have been verified thousands of times by now.
sr. member
Activity: 406
Merit: 896
November 30, 2023, 08:04:37 AM
#16
I'm curious if that helps. More dbcache also means less file cache for the OS.

Exactly, but I haven't found any explanation online, so I thought perhaps one would know in this forum. Feels like above 4GB doesn't help too much. It's like there is a soft-cap and then the return you get is diminishing. Perhaps I am wrong though.

Edit: be careful with default linux swap behavior which perform some swap even though there are some free/unused RAM capacity.

I am sorry I don't follow you on this. You mean perhaps I should add less than 7000 and go for 6000 for example?

It's not necessary bad, security-wise, because it's just the script verifications that are skipped.
Everything in the assumed valid blocks are still being verified by your node.

The topic is quite famous after its implementation so you may find a lot of helpful related topics across the internet.
For example: https://bitcoin.stackexchange.com/a/88666

Thanks mate, much appreciated!
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
November 30, 2023, 08:03:34 AM
#15
-snip-
It's not recommended but if you think it's necessary to speed up your node's IBD, you can set a custom assumevalid block by setting -assumevalid=.
Thanks, I will see the reference because it is something I ignored until today.

Wouldn't it be bad for security though? Is this why you say it is not recommended?
It's not necessary bad, security-wise, because it's just the script verifications that are skipped.
Everything in the assumed valid blocks are still being verified by your node.

The topic is quite famous after its implementation so you will find a lot of helpful related topics across the internet.
For example: https://bitcoin.stackexchange.com/a/88666
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
November 30, 2023, 07:58:02 AM
#14
Perhaps all of it? 8192?
That leaves nothing for other programs, so it's too much.

Quote
I set it to 7000 and let's see...
I'm curious if that helps. More dbcache also means less file cache for the OS.
legendary
Activity: 2856
Merit: 7410
Crypto Swap Exchange
November 30, 2023, 07:57:46 AM
#13
It leads to same result, although i find it's unusual to see configuration on multiple places. And since your device has 8GB RAM, you could set higher value for dbcache (assuming you don't run other memory-intensive software on that device).

Like how much? Perhaps all of it? 8192? I don't run anything else on this device. My plan, in general, is to run Bitcoin & Monero node on the same machine.

EDIT:
I set it to 7000 and let's see...

7000 sounds good since Raspbian typically use less than 0.5GB of RAM and certain amount of RAM (IIRC 256MB or less) reserved for GPU. But 8192 is definitely bad idea since i don't know the outcome if you do that. I would assume of those thing might happen,
1. Bitcoin Core crash after trying to over allocate memory.
2. Swap memory is used heavily which makes everything slower.
3. Bitcoin Core only allocate free/unused memory as allowed by the OS.

Edit: be careful with default linux swap behavior which perform some swap even though there are some free/unused RAM capacity.
Pages:
Jump to: