Saw this topic pop up often. Should the -dbcache setting be a multiple of 1024? It's a common misunderstanding, but it’s not necessary. You can set -dbcache to any integer, like 8000 or 8192, and it works just fine.
I think you're right. Doesn't seem to matter what value you throw at dbcache, though I’m not totally clear on how Bitcoin Core handles memory for caches. But yeah, 4 KiB pages are not the only option, right? I’ve heard about larger page sizes too.
Exactly! Glad you brought that up. I was gonna mention it myself, but since 4 KiB is the standard, I figured I’d stick with that. As for Bitcoin Core, I’d love to get some input from someone who really knows the inner workings. But I get that the dbcache value is just the total it uses, then splits it for chainstate and UTXO.
True. Most systems default to 4 KiB pages, but they also deal with larger pages. Those can help with efficiency since managing loads of small pages can be a pain. Bitcoin Core doesn't specifically ask for large pages, it just uses the OS's default which is those 4 KiB pages, right?
450 MiB is definitely divisible by 1024. Like, 450 MiB equals 450 x 1024 KiB. That math checks out. Core devs mentioned in their docs that dbcache needs to be in MiB, which means we’re using binary units, not decimal.
Yeah, I remember seeing stuff about this with Docker and VMs. But AFAIK large pages aren’t always enabled by default on some OSes and Linux distros. If they are on Linux, then some apps can benefit from it without needing extra coding.