Bitcoin full node and query server

Jun 28, 2026

View in context in the libbitcoin Slack #general mirror.

Kevin Ravensberg21:32
Something is going wrong I think
image.png
153 replies · pmienk, evoskuil, Kevin Ravensberg · last Jul 01, 2026
pmienk21:37
Looks like disk write to usb is the bottleneck. Would expect that
👍🏻 1
evoskuil21:40
Yes, and even on fast internal I'd expect to see that periodically on lower RAM machines.
evoskuil21:40
But what's up with the 0KB/s r/w ?
(edited)
evoskuil21:41
Memory at 95%, check, time to flush, gotta put those blocks somewhere.
(edited)
Kevin Ravensberg21:43
Yeah, I resorted to unplugging the drive as there was nothing happening anymore and even explorer.exe was struggling
evoskuil21:44
Everything's gonna struggle if there's no place to put the blocks.
Kevin Ravensberg21:44
Maybe I'll grab another internal nvme, or hopefully I get the chance to buy the Steam Machine and do it on there 😄
👍🏻 1
evoskuil21:45
What I/O bus type/speed was this over?
evoskuil21:46
I see 100Kb/s as the window max, which is 1,944 hrs best case.
Kevin Ravensberg21:46
USB-C, should have 1000 MB/s read and write
evoskuil21:46
Did you see it actually write anything?
Kevin Ravensberg21:46
Actually plenty to run Bitcoin Core on, it was used with a Pi5 before
Kevin Ravensberg21:47
Yeah it worked for a while, did 44GB of headers
evoskuil21:47
A thumb drive is plenty to run Core. If you want that speed you can just set one network thread.
😅 1
evoskuil21:48
There's nowhere close to 44GB of headers.
evoskuil21:48
What was the peak write rate when it was actually writing?
Kevin Ravensberg21:55
I don't think it was logged anywhere, now trying again with some memory cap on the process and logging with resource monitor
evoskuil21:55
a memory cap will just increase the disk I/O.
Kevin Ravensberg21:56
Yeah, but I just need it to not crash my desktop 😛
evoskuil21:56
Did it crash?
Kevin Ravensberg21:56
Well, after unplugging the SSD and stopping bs process I could restart explorer.exe and continue
evoskuil21:57
So it was unresponsive, but not crashed.
Kevin Ravensberg21:57
So not a hard computer crash, just software clog up
evoskuil21:58
If you want it to do less work you reduce the thread count and/or thread priority.
Kevin Ravensberg21:58
Yeah, I think claude did exactly that for this run
evoskuil21:59
It assumes you want to sync fast.
Kevin Ravensberg21:59
It wiped 178GB from previous sync that got corrupted
evoskuil22:00
Yep, you can't halt the process and reuse the store, unless you have taken a snapshot to recover to. That happens automatically once the node is current, and you can command it at any time.
evoskuil22:00
That doesn't mean you synced 178GB, that's just the initial file allocations at the time of halt.
Kevin Ravensberg22:01
I see 500MB/s write speeds coming by now
evoskuil22:01
That's a good rate.
evoskuil22:02
Not a great rate, but a lot better than 100KB/s
Kevin Ravensberg22:05
Yeah, is there a part that I can split off to the faster OS disc that is not the entire database?
evoskuil22:05
I see peaks around 1GB/sec on my pcie3 internal SSD.
🚀 1
evoskuil22:06
The store doesn't have configuration for independent file paths. Nothing too difficult about it tho.
evoskuil22:07
I considered putting the headers on their own path, they need high speed random access and the bodies need high speed write append (for milestone). Ahd the headers are much smaller.
(edited)
Kevin Ravensberg22:08
Yeah, maybe machines with a very fast nvme OS-disc can benefit if the headers live there whilst the block body data goes to a slower larger drive.
evoskuil22:09
Yeah, I'll look at that. Claude could prob knock it out for you in 1 minute.
😎 1
evoskuil22:09
It's all in libbitcoin-database, store.hpp/ipp
Kevin Ravensberg22:11
The DDR4 memory kit I currently have costs 1000eu now new, bought it for 400 or so. So upgrading to 128GB is quite expensive.
👍🏻 1
evoskuil22:11
Yeah, not a buyer's market. I just finally bought my next. Ugh
Kevin Ravensberg22:15
I do have 2.5GB ethernet on this machine, so networkwise I might set a record
🔥 1
evoskuil22:16
I hit 39.4 mins on my 2.5Gbps Internet for milestone sync to 950k last night. Tough to beat, almost the theoretical limit.
Kevin Ravensberg22:17
I need to buy an extra 10G network pcie card, because I have 8GB/s available on my fiber
Kevin Ravensberg22:17
Gbps
evoskuil22:18
Duh!
evoskuil22:19
Looks like we're getting down closer to 2 hrs for full validation sync... we'll see soon.
evoskuil22:19
If you have a decent GPU you might get close to that.
Kevin Ravensberg22:19
I've got a 5080 RTX 16GB
Kevin Ravensberg22:20
Does libbitcoin use GPU instead of CPU?
evoskuil22:20
It will shortly 🙂
Kevin Ravensberg22:20
🤯
evoskuil22:20
Had our first run with it 2 days ago. 5M sigs/sec
evoskuil22:21
There are 3.5B sigs on mainnet.
Kevin Ravensberg22:21
CUDA used for that?
👍🏻 1
evoskuil22:22
Your GPU can handle 3.5-6M sigs/sec.
Kevin Ravensberg22:23
That is much more than my 16-core 5950X will do
evoskuil22:26
My 64 thread 2.1GHz desktop consistently hits 360k sigs/sec on GPU, for comparison.
evoskuil22:27
It syncs and validates 950k (batched or otherwise) in 4.85 hrs.
(edited)
evoskuil22:28
That's 2.7 hours of nothing but sig verification.
🫠 1
evoskuil22:28
That drops to 19 mins at 5M sigs/sec
Kevin Ravensberg22:29
2 hours IBD coming soonTM
👍🏻 1
evoskuil22:29
This machine doesn't even have shani, 11 years old.
Kevin Ravensberg23:49
image.png
👍🏻 1
Kevin Ravensberg00:09
Hmm, ETA not looking so great
image.png
evoskuil00:12
that's not much to go on
evoskuil00:14
  • confirmed and validated are two distinct states.
  • archived and validated are not ordered.
  • confirmed can have long delays and then race ahead (not constant rate at all).
(edited)
👍 1
evoskuil00:19
If you give me some info I can let you know what's going on, but this doesn't tell me much.
Kevin Ravensberg00:38
New ETA after it finished filling up RAM is ~3h with 42 blocks/s
Kevin Ravensberg00:39
Will slow down when it hits full blocks
evoskuil01:06
~3h seems more reasonable 🙂
(edited)
evoskuil01:07
Yeah, txs are a much better rate predictor.
evoskuil04:55
Some thoughts on an operating system that doesn't perform its most basic function.
IMG_1754IMG_1755IMG_1756IMG_1757
evoskuil05:02
Overcommit is the operating system making promises it knows it cannot keep. OOM kill when swap is available is fundamental unreliability. That unreliability is a consequence of an ancient primitive that long ago lost its usefulness, and has corrupted every flavor of Unix that followed. It's so pervasive that people have entirely forgotten what is the fundamental contract of an operating system.
👀 1
Kevin Ravensberg19:53
Update: My PC 'froze' overnight, but this time after a successful snapshot, so it's continuing IBD now 😛 *froze as in the password field to login to winblows had disappeared and I could not force open a terminal window like I normally could.
image.png
evoskuil20:51
So it was still syncing but windows login was unresponsive?
Kevin Ravensberg22:11
Also sync was flat for the entire time windows login was unresponsive
Kevin Ravensberg22:11
But it did do a nice checkpoint that I could load back
👍🏻 1
evoskuil23:24
So you mean it took a snapshot on its own? You didn't tell it to?
(edited)
evoskuil00:02
Because if it did that, it means that the node was fully synced.
Kevin Ravensberg17:55
I told it to do half way or so, but turns out it's better not to snapshot half way IBD.
evoskuil18:37
I doesn't hurt, just takes a minute.
evoskuil18:37
How were you obtaining the above flatline plot if the machine was unresponsive?
Kevin Ravensberg18:39
Well, partially unresponsive. The terminal with libbitcoin is unresponsive and new terminals likewise. The snapshot tool worked, other running apps worked. Restarting seems to not work either in this state.
evoskuil18:40
If the terminal is unresponsive how do you know it's not progressing?
Kevin Ravensberg18:40
Plot was generated with a python script from a logfile that tracked the IBD
Kevin Ravensberg18:41
Last update was 22:00 last night
Kevin Ravensberg18:41
I think 1 day is a little long for a newline output
evoskuil18:41
which log file?
Kevin Ravensberg18:42
My personal log file of a monitoring script that periodically looked at the progress
evoskuil18:42
How does it obtain the progress?
Kevin Ravensberg18:43
I'll paste it here after reboot 🙃
evoskuil18:43
That's not my question. I'm just trying to understand from where you are getting the progress indications for the node.
(edited)
Kevin Ravensberg18:44
I'll look it up in the script, don’t remember if it is checking the localhost webinterface or terminal output
evoskuil18:46
the web interface is disabled by default until current, and the console does not emit block status by default, and emitting it would be far too verbose for IBD.
evoskuil18:46
It may be monitoring the event log file, but logging is also low thread priority and buffered.
Kevin Ravensberg18:48
2. Sampler: monitor-ibd.ps1 A PowerShell loop (meant to run continuously in the background) that every 60s:
  • Reads the tail ofevents.log
  • Takes themax height seenfor each of the 4 stage names (events log out of order under concurrency, so max-over-tail is the safe aggregation)
  • Appends one row toD:\libbitcoin\node\logs\ibd-progress.csvwith awall-clock UTC timestamp— this is what makes it survive node restarts, sinceevents.log's own elapsed-seconds column resets each time the node restarts.
evoskuil18:48
Furthermore confirmations will always back up against validation, so if you are monitoring the log for confirmations, there can be long delays. If you're in a situation where the node is barely making progress due to resource constraints, then there may be no such progress indications.
💯 1
Kevin Ravensberg18:48
These four are tracked: archived block_archived - downloaded + structural/PoW check validated block_validated - full script/signature validation (heavy) confirmed block_confirmed - validated AND confirmable organized block_organized - pushed onto the confirmed chain (height)
Kevin Ravensberg18:49
Nothing fancy I guess
Kevin Ravensberg18:49
I limited it to only use 24GB of RAM, as a mitigation of my PC getting sluggish
evoskuil18:49
Sure, that's a reasonable approach. The console log doesn't flush until its buffer is full, so the event log is the right place.
evoskuil18:50
At 24GB of RAM in full validation it's going to thrash.
Kevin Ravensberg18:50
Aha
evoskuil18:50
so you are just churning the disk, and it's a very slow disk.
Kevin Ravensberg18:50
That's whats going wrong here then
evoskuil18:51
Yes. I was just trying to isolate the question of process termination or hang, vs. expected behavior.
(edited)
evoskuil18:51
This is expected behavior. You need to give it at least 32GB for validation, and a fast disk.
evoskuil18:53
And it's still going to be slow under those conditions.
Kevin Ravensberg18:53
Working on that! And I probably should build from source once more to make use of the GPU validation?
evoskuil18:54
The process is not synchronous. It's highly concurrent and asynchronous. Things do not execute in lock step as you might intuit after using a single-threaded validator like Core. For example, a huge amount can be happening and nothing in the log.
Kevin Ravensberg18:55
Yeah, but for my machine I expected IBD with libbitcoin to not take 24h+
evoskuil18:55
GPU validation is still a bit experimental, and ufsecp is not currently useful on Windows.
Kevin Ravensberg18:56
*with a good nvme drive that is
evoskuil18:56
When you say IBD are you including full validation? At 24GB that is not an accurate expectation.
Kevin Ravensberg18:57
I think only syncing the blocks/bodies, not validation indeed
evoskuil18:57
Network speed?
Kevin Ravensberg18:58
2.5Gbps
evoskuil18:58
milestone sync (which is currently the default, at block 950k) with 32GB on 2.5 Gbps and 16 dual core decent threads takes 39 minutes.
(edited)
Kevin Ravensberg18:59
I've got 32 threads / 16 cores, should be able to get all withing 1 hour too then
evoskuil19:00
fast internal SSD?
Kevin Ravensberg19:00
Yeah, the Samsung 990 Pro is one of the fastest PCIe Gen4 (which I'm getting a second one off for libbitcoin storage)
evoskuil19:01
Then it's not clear to me what's happening on your machine. With those specs and a milestone run, even 24GB should be sufficient.
Kevin Ravensberg19:02
I think it will get better once I actually use an internal NVMe drive instead of the external USB-C drive
evoskuil19:02
And you are on Windows?
Kevin Ravensberg19:02
Yes, Windows 11
Kevin Ravensberg19:02
Version 10.0.26200 Build 26200
evoskuil19:03
So you are not on a "fast internal SSD" - that explains it.
(edited)
💯 1
Kevin Ravensberg19:03
not yet indeed
evoskuil19:04
It is likely that the node is simply trying to flush 20+ GB of data to the drive, and everything is just waiting on that.
(edited)
evoskuil19:05
What are the interface specs for the external drive over USB-C?
(edited)
Kevin Ravensberg19:08
Ah, looks like I chose the retarded 2.0 slot too... should have been 3.2
image.png
Kevin Ravensberg19:09
Which is strange for the only USB-C port at the backside of the motherboard
😂 1
evoskuil19:10
Assuming Gen 1 that's a ~1 min write to dump 24GB.
evoskuil19:10
Is it an old disk?
(edited)
evoskuil19:11
Actually I think it's just that it's external (which we have always told people is not supported).
(edited)
Kevin Ravensberg19:11
Not terribly old, SMART status is good, I'm benchmarking it now
evoskuil19:12
mmap writes dirty pages back as many tiny (~4 KB), scattered I/Os. Internal SSD doesn't care — low latency, deep queues, so it absorbs the pattern invisibly. USB external has high per-I/O latency and shallow queuing, so that same drizzle of small writes grinds along at single-digit MB/s, turning a ~1-minute transfer into hours.
(edited)
evoskuil19:12
External SSD not supported, it's an MMAP store.
Kevin Ravensberg19:13
image.png
🫣 1
Kevin Ravensberg19:13
Officially disqualified indeed
evoskuil19:14
External drive interface is optimized for backups/archives.
evoskuil19:15
We use the SSD as if it was RAM.
🔥 1
evoskuil19:15
With enough RAM, we don't use the SSD at all, just at startup and shutdown for persistence.
(edited)
Kevin Ravensberg19:16
Maybe once the RAMpocalypse is over I'll consider 1TB of RAM
👍🏻 1👍 1
Kevin Ravensberg19:16
This is what I will run it on instead:
image.png
evoskuil19:17
Eventually you 'll be able to sync and validate the whole chain over the network and store it in RAM with no persistence at all, just initialize it at every startup from the network - like many apps do today that never could have even a decade ago.
Kevin Ravensberg19:17
It's crazy what high bandwidth internet allows
👍🏻 1
Kevin Ravensberg19:18
Also the direct memory access links between servers is crazy, goes over an optical fiber
evoskuil19:18
I worked on 300 baud (bits per second) networks. With that kind of perspective you can see what's coming.
🤯 1
evoskuil19:20
Even at 14,400 baud ("fourteen four") loading a single lo res image required a coffee break (up to 4 mins). That was only 35 years ago. 😅
(edited)
🙌 1
Kevin Ravensberg19:25
I only experienced the dial up internet over phone lines as a kid, that was 4x faster already
👍🏻 1
evoskuil19:29
Now we can sync and index the entire bitcoin blockchain over home Internet in the time it took to transfer a single VGA image in 1984.
🚀 1