#AskNostr let's hear your opinions about this exasperating IBD process I'm going through with Bitcoin Core on Ubuntu.

As I mentioned, this is a laptop with an i7 7th gen 3.7 GHz processor, 8 Gb memory, and I've set my data folder and blocks folder to an external SSD (on a USB 3.0 port). I completely nuked the laptop's disk and did a 100% fresh exclusive install of Ubuntu 22.04. Nothing else on this computer other than the cleanly installed OS.

I don't know much about anything, but what I can see on my system monitor is:

- CPU cores working at 10-20%

- Memory working at 40%

- Swap working full capacity, at 100%

- Network working at laughable bandwidth

Interestingly, the network monitor shows bursts of incoming data coinciding with bursts of CPU work (50-60%). Paired with the 100% swap effort, I conclude that's the bottleneck. Am I onto something here?

In the Bitcoin Core options, I set the size of the database cache to 1000 vs the default 300 (or was it 450? can't recall). Is there any point to further tweaking it?

nostr:nevent1qythwumn8ghj7un9d3shjtnswf5k6ctv9ehx2ap0qythwumn8ghj7cnfw33k76twv4ezuum0vd5kzmp0qyv8wumn8ghj7un9d3shjtnsd3jkyum5wghxxmmd9uq3wamnwvaz7tmjv4kxz7fwdehhxarj9e3xzmny9uq36amnwvaz7tmwdaehgu3dxqcjucn0d36zummzwdjhyan9wghsz9thwden5te0wfjkccte9ehx7um5wghxyee0qyd8wumn8ghj7mn0wd68ytnsd3jkycmgv95kutn0wfnj7qgmwaehxw309ahx7um5wghx7unpdenk2urfd3kzuer9wchsz9thwden5te0wfjkccte9ejxzmt4wvhxjme0qywhwumn8ghj7mn0wd68ytnzd96xxmmfdejhytnnda3kjctv9uq3samnwvaz7tmjv4kxz7fwvd6hyun9de6zuenedyhszxnhwden5te0v9j82mr59ccnsurvw4ejuum0vd5kzmp0qyt8wumn8ghj7mn0wd68ytndd9kx7afwd3hkctcprdmhxue69uhhyetvv9ujummjv9hxwetsd9kxctnyv4mz7qghwaehxw309aex2mrp0yhxummnw3ezu6twvehj7qghwaehxw309ahx7um5wghx7mnnv968xtn0wfnj7qg6waehxw309ahx7um5wgh85etzv4jx2efwvdkx7aty9uqsuamnwvaz7tmwdaejumr0dshszythwden5te0dehhxarj9emkjmn99uq3vamnwvaz7tmjv4kxz7fwd4hhxarj9ec82c30qy08wumn8ghj7mn0wd68yttsw43zuam9d3kx7unyv4ezumn9wshsz9nhwden5te0vfjhvmewdehhxarjxyhxxmmd9uq3jamnwvaz7tmjv4kxz7fwd4hk6mmnw3ezuurfde4j7qpqdfut8y8keee6dh95clky9pqqkh3kd8s9j7pevqf9n3k852jfyj2sujkhxn

Reply to this note

Please Login to reply.

Discussion

Ubuntu will sometimes start using a ton of system resources. It's usually gnome doing something stupid in the background.

I'm running Bitcoin core on Ubuntu 20.04 with an electric server and lightning server on default settings. Works great. Been humming along for almost 2 years.

Electrum server*

I have no doubt *once it's running* it will work beautifully. The problem is bootstrapping the bloody thing.

It's not the CPU, it's not the RAM, it's not bandwidth, it's not SSD writing speed (the monitor says bitcoin-qt is writing at a mere 20 MiB/s). The only thing I see totally at full capacity is the swap, at 2.1 Gb.

Do you think tweaking the db cache setting will help? Is there any other setting to tweak?

Man, idk. Are you still syncing to the network?

85%, progressing at 0.x% hourly. Sometimes less than 0.01%.

I am having trouble keeping my computer awake while running bitcoin core on Ubuntu, I have all the settings I can see for keeping it awake and have even tried caffeine, what am I missing ?

I'm no expert in any of these areas; but it's often been my experience that upgrading the RAM (if upgradable) will relieve swapping pressure.

Even though your RAM doesn't appear to be even close to maxing out, that doesn't necessarily mean that the memory manager isn't constantly swapping in an attempt to leave as much RAM available for what it can't know might be coming next.

My understanding is that the process of verifying the blockchain is a memory hog and constantly growing worse. A cursory search suggests 8GB is the absolute minimum recommended for syncing a node - and that recommendation could easily already be outdated.

Alternatively - if a RAM upgrade isn't an option - you might want to look at the ubuntu swappiness parameter. Lowering it from the default 60 to more like 20 should increase the RAM usage to swap ratio - for a faster (albeit technically with a potential for being less stable) overall memory space.

Before any of this, however, you might want to use a disk i/o monitor just to verify that your swap drive speed is indeed maxing out.

That's the line of investigation I'm currently following.

I was this close to just buying a couple of sticks and upgrade the RAM and see if I just like that could get it done faster. 40-50 bucks to upgrade the RAM is not going to break the bank, but the whole idea is that once I get passed this ordeal, Bitcoin Core is fairly light to run, right?

How do I determine it's actually Bitcoin Core the one causing such load on the swap? The system monitor does show the process reading heavily, not just writing (which it does lightly only, in comparison).

But why would it not just use the 60% of the RAM that's still available instead of whatever is in the swap?

Going down the swappiness rabbit hole now...

I checked that the swappiness was 60, and set it to 30 first. Nothing, RAM usage stayed at 40%, swap at 100%. So I set it at 10 -- same result, no change after a few minutes have already passed.

Increasing/adding swap space would only make it worse, right?