<p>256 MiB seems extremely low; I very much doubt that will work.</p>
<p>Still, Bitcoin Core has documentation on how to run in low-memory environments: <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md</a></p>
<p>I suggest following the settings there (low dbcache, blocksonly, few connections, 1 allocation arena).</p>

CC BY-SA 4.0
2023-11-21T16:28:56.413Z
yeah, I thought the documentation suggesting that 256 MiB for a bare minimum config was ambitious as well.  I'll try the low-memory config manual suggested and see how it goes.  Thx
Dan
CC BY-SA 4.0
2023-11-21T14:47:46.900Z
2023-11-21T14:47:46.900Z
Pieter Wuille
<p>I was interested in using a <a href="https://www.raspberrypi.com/products/raspberry-pi-zero-w/" rel="nofollow noreferrer">Raspberry Pi Zero W</a> to run the claimed &quot;<a href="https://bitcoin.org/en/bitcoin-core/features/requirements#bare-minimum-with-custom-settings" rel="nofollow noreferrer">Bare Minimum (With Custom Settings)</a>&quot; install of <code>bitcoind</code> on either Gentoo or <a href="https://www.linuxfromscratch.org/lfs/" rel="nofollow noreferrer">Linux From Scratch</a>.  It was <a href="https://bitcoin.org/en/bitcoin-core/features/requirements#bare-minimum-with-custom-settings" rel="nofollow noreferrer">suggested</a> that it is POSSIBLE to get <code>bitcoind</code> up and running and synced on a 256 MiB memory  footprint (RAM not DISK).  I'd be thrilled to get it running on 450 MiB of memory (RAM not DISK).  Last I tried this (5+ years ago on Debian) it continually got killed by some kernel monitor... maybe the OOM daemon or something of the like.  I eventually gave up and deemed it impossible to run in a 512 MiB memory footprint (RAM not DISK).</p>
<p>Many (many) years later I see that the &quot;Bare Minimum&quot; config claims <code>bitcoind</code> can run in a 256 MiB memory footprint (RAM not DISK).  Anyone have the magic <code>CCFLAGS</code>, Kernel config.gz, make defines, or <code>bitcoin.conf</code> switches to get core running with such a low footprint.</p>
<p>I guess I assumed that at a minimum, the full UTXO set (7 GiB) needed to remain in memory on any synced full node.  Or, are these bare minimum configs referenced really SPV (thin) clients or something?  I'd prefer to avoid pruning if possible.</p>
<p>Obviously, I have no rational reason for wanting to do this on such an insanely anemic system other than the simple puzzle of the problem to solve.</p>
<p>Just to get over the obvious hurdles...  I intend to perform the full IBD on a robust (64GiB Mem / 12 Core / 5 TB SSD) system, then only hand control over to the Pi once fully synced.  I will also run the Pi off of SSD with whatever infinite swap config gets me across the finish line.  Killing the SSD via insane IO is fine by me.  It's just a proof of concept, though in truth, I am looking for the most optimal bare-minimum config.</p>
<p>To save the search query, my <a href="https://www.raspberrypi.com/products/raspberry-pi-zero-w/" rel="nofollow noreferrer">PiZeroW</a> has the following specs:</p>
<ol>
<li>Proc: BCM2835 single-core 32 bit ARMv6 (<a href="https://gadgetversus.com/processor/broadcom-bcm2835-vs-intel-pentium-d-805/" rel="nofollow noreferrer">&quot;comparable&quot; to 2005 Pentium D 805</a>)</li>
<li>Mem: 512 MiB</li>
<li>NIC: 802.11 b/g/n wireless LAN (450 Mbps)</li>
<li>DISK: 5 TiB USB SSD</li>
</ol>

<bitcoind><linux><bitcoin.conf><memory>
How to replicated the 256 MiB memory "Bare Minimum" setup of `bitcoind` from bitcoin.org
Dan
# How to replicated the 256 MiB memory "Bare Minimum" setup of `bitcoind` from bitcoin.org

(Asked by: username_0 on 2023-11-21)

I was interested in using a [Raspberry Pi Zero W](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) to run the claimed "[Bare Minimum (With Custom Settings)](https://bitcoin.org/en/bitcoin-core/features/requirements#bare-minimum-with-custom-settings)" install of `bitcoind` on either Gentoo or [Linux From Scratch](https://www.linuxfromscratch.org/lfs/). It was [suggested](https://bitcoin.org/en/bitcoin-core/features/requirements#bare-minimum-with-custom-settings) that it is POSSIBLE to get `bitcoind` up and running and synced on a 256 MiB memory footprint (RAM not DISK). I'd be thrilled to get it running on 450 MiB of memory (RAM not DISK). Last I tried this (5+ years ago on Debian) it continually got killed by some kernel monitor... maybe the OOM daemon or something of the like. I eventually gave up and deemed it impossible to run in a 512 MiB memory footprint (RAM not DISK).

Many (many) years later I see that the "Bare Minimum" config claims `bitcoind` can run in a 256 MiB memory footprint (RAM not DISK). Anyone have the magic `CCFLAGS`, Kernel config.gz, make defines, or `bitcoin.conf` switches to get core running with such a low footprint.

I guess I assumed that at a minimum, the full UTXO set (7 GiB) needed to remain in memory on any synced full node. Or, are these bare minimum configs referenced really SPV (thin) clients or something? I'd prefer to avoid pruning if possible.

Obviously, I have no rational reason for wanting to do this on such an insanely anemic system other than the simple puzzle of the problem to solve.

Just to get over the obvious hurdles... I intend to perform the full IBD on a robust (64GiB Mem / 12 Core / 5 TB SSD) system, then only hand control over to the Pi once fully synced. I will also run the Pi off of SSD with whatever infinite swap config gets me across the finish line. Killing the SSD via insane IO is fine by me. It's just a proof of concept, though in truth, I am looking for the most optimal bare-minimum config.

To save the search query, my [PiZeroW](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) has the following specs:

1. Proc: BCM2835 single-core 32 bit ARMv6 (["comparable" to 2005 Pentium D 805](https://gadgetversus.com/processor/broadcom-bcm2835-vs-intel-pentium-d-805/))
2. Mem: 512 MiB
3. NIC: 802.11 b/g/n wireless LAN (450 Mbps)
4. DISK: 5 TiB USB SSD

**Tags:** bitcoind, linux, bitcoin.conf, memory


---

## 1 answers

### Answer by username_1 on 2023-11-21. Score: 1

256 MiB seems extremely low; I very much doubt that will work.

Still, Bitcoin Core has documentation on how to run in low-memory environments: <https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md>

I suggest following the settings there (low dbcache, blocksonly, few connections, 1 allocation arena).

> **Comments:**
> **username_0**: yeah, I thought the documentation suggesting that 256 MiB for a bare minimum config was ambitious as well.  I'll try the low-memory config manual suggested and see how it goes.  Thx  

---

