[BTC-dev] (EXPERIMENTAL) Mempool Jettison Trigger

Stanislav Datskovskiy stas at loper-os.org
Tue Aug 4 03:41:13 UTC 2015


Name: readme_s.txt
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/readme_s_2c6c5f547275397d153b4ad1fa656568949074af.txt>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

- ---

Very alert folks may have noticed that runaway RAM-guzzling in TheRealBitcoin does not begin until the initial blockchain sync reaches well into 'modern' times.

The reason for this is the TX orphanage removal! Until the sync is mostly complete, just about all incoming TX go straight into the garbage, on account of no antecedent being found for them in a block. This is precisely as it should be.

And it reveals precisely how much of the RAM bloat is accounted for by the mempool: virtually all of it! See also the experiment where we learn the intrinsic footprint of the blockchain indices [1].

- ---

Now, you can test hypothesis concerning the effect of mempool on total RAM footprint - experimentally!

1) Apply 'asciilifeform_jettison_mempool.patch'
   (Depends on 'eatblock' and 'dumpblock', but only because 'diff' is dumb as a brick. Can, if you
    wish, apply by hand)
2) Use RPC command,
       ./bitcoind zapmempool
3) debug.log will display the number of TX in the mempool at the time of the purge.

- ---

Why bother?

1) Experiment, as described earlier
2) For the brave:
   ~~~~~~~~~~~~~~
   'Reactor scram' for long-running nodes. The jettison switch can be hooked to a low-RAM tripwire,
   and - though ugly - jettisoning the mempool is considerably less traumatic than crashing! In
   particular, the possibility of db corruption is avoided.

   This, of course, is until we get something like a rational mempool mechanism. [2]


[1] http://therealbitcoin.org/ml/btc-dev/2015-July/000107.html
[2] http://log.bitcoin-assets.com/?date=03-08-2015#1222814 and earlier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBCgAGBQJVwDNDAAoJELmCKKABq//H81gH/1p7kWgq5cHiOd7Q/KMAsIgo
2oHv5RRwoLWye8cVDIaj6qu+F69hY82xh3M7FR1A5f10WgnZguK0eXbWz4sV9sL/
DozbG7YSAkQLXygabXj7FRJorLtV5nyD+BVOjEarIcKenjsyi9K8wNzb12GVaH1z
0HKJ6hNtnzoVqoL0AMRQYC8TDf7cmu3bxH97Yfwk0Ns1ySDc5u+Avn8x8Yx56A5m
GkqNHBatJAoR8nnyRItTPDbfIN+CSDEoEMJaJHjoA5+/Bg1ii5Nm7RmpaEFr/95O
U2FV76nrTTIZ0uJZuhDqTtZ3beowRRbn0jjiWbN7rltI8Lqtu6npgqJB0QB/rbg=
=p3hk
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_jettison_mempool.patch
Type: text/x-patch
Size: 2283 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/asciilifeform_jettison_mempool_195c600991e7306b0f21eddd834b38b9301cf12b.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_jettison_mempool.patch.sig
Type: application/octet-stream
Size: 490 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/asciilifeform_jettison_mempool_4ea10893ee0d98b3bb3fc4d73369cbaa3d5669e6.patch.sig>


More information about the BTC-dev mailing list